Changeset 768 for trunk/includes/Page.php
- Timestamp:
- Jan 27, 2014, 10:55:37 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/Page.php
r765 r768 12 12 $this->System = &$System; 13 13 $this->Database = &$System->Database; 14 $this->RawPage = false; 14 $this->RawPage = false; 15 15 } 16 16 … … 40 40 $this->ItemActions = array( 41 41 array('Name' => T('View'), 'URL' => '?action=view&id=#Id'), 42 array('Name' => T('Delete'), 'URL' => '?action=remove&id=#Id'),43 42 ); 43 $this->AllowEdit = false; 44 if($this->AllowEdit) $this->ItemActions[] = array('Name' => T('Delete'), 'URL' => '?action=remove&id=#Id'); 44 45 } 45 46 … … 75 76 '</table>'; 76 77 } else $Output = ShowMessage(T('Item not found'), MESSAGE_CRITICAL); 77 $Output .= '<a href="?action=add">'.T('Add').'</a> '; 78 $Output .= '<a href="?action=edit&id='.$_GET['id'].'">'.T('Edit').'</a> '; 79 $Output .= '<a href="?action=delete&id='.$_GET['id'].'">'.T('Add').'</a> '; 78 if($this->AllowEdit) 79 { 80 $Output .= '<a href="?action=add">'.T('Add').'</a> '; 81 $Output .= '<a href="?action=edit&id='.$_GET['id'].'">'.T('Edit').'</a> '; 82 $Output .= '<a href="?action=delete&id='.$_GET['id'].'">'.T('Add').'</a> '; 83 } 80 84 $Output .= '<a href="?">'.T('List').'</a><br/>'; 81 85 return($Output); … … 120 124 } 121 125 $Output .= '</td>'; 122 } 126 } 123 127 $Output .= '</tr>'; 124 128 } 125 129 $Output .= '</table>'; 126 $Output .= '<a href="?action=add">'.T('Add').'</a><br/>';130 if($this->AllowEdit) $Output .= '<a href="?action=add">'.T('Add').'</a><br/>'; 127 131 return($Output); 128 132 }
Note:
See TracChangeset
for help on using the changeset viewer.