Changeset 556:391a00fa22a6 for plugins/simpleMenu/index.php
- Timestamp:
- 07/10/11 10:43:48 (14 years ago)
- Branch:
- themes
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/simpleMenu/index.php
r555 r556 88 88 89 89 # Liste des types d'item de menu 90 $items = array('home' => array(__('Home'), 0));90 $items = array('home' => array(__('Home'),false)); 91 91 92 92 if (count($langs_combo) > 1) { 93 $items['lang'] = array(__('Language'), 1);93 $items['lang'] = array(__('Language'),true); 94 94 } 95 95 if (count($categories_combo)) { 96 $items['category'] = array(__('Category'), 1);96 $items['category'] = array(__('Category'),true); 97 97 } 98 98 if (count($months_combo) > 1) { 99 $items['archive'] = array(__('Archive'), 1);99 $items['archive'] = array(__('Archive'),true); 100 100 } 101 101 if ($core->plugins->moduleExists('pages')) { 102 102 if(count($pages_combo)) 103 $items['pages'] = array(__('Page'), 1);103 $items['pages'] = array(__('Page'),true); 104 104 } 105 105 if ($core->plugins->moduleExists('tags')) { 106 106 if (count($tags_combo) > 1) 107 $items['tags'] = array(__('Tags'), 1);107 $items['tags'] = array(__('Tags'),true); 108 108 } 109 109 110 110 # --BEHAVIOR-- adminSimpleMenuAddType 111 # Should add an item to $items as an array(<label>,<optional step (true or false)>) 111 112 $core->callBehavior('adminSimpleMenuAddType',$items); 112 113 113 $items['special'] = array(__('User defined'), 0);114 $items['special'] = array(__('User defined'),false); 114 115 115 116 $items_combo = array(); … … 146 147 break; 147 148 case 2: 148 if ($items[$item_type][1] > 0) {149 if ($items[$item_type][1]) { 149 150 // Second step (optional), menu item sub-type to be selected 150 151 $item_select = ''; … … 205 206 break; 206 207 case 'special': 208 break; 209 default: 210 # --BEHAVIOR-- adminSimpleMenuBeforeEdit 211 # Should modify if necessary $item_label, $item_descr and $item_url 212 # Should set if necessary $item_select_label (displayed on further admin step only) 213 $core->callBehavior('adminSimpleMenuBeforeEdit',$item_type,$item_select, 214 $item_label,$item_descr,$item_url,$item_select_label); 207 215 break; 208 216 } … … 430 438 break; 431 439 case 2: 432 if ($items[$item_type][1] > 0) {440 if ($items[$item_type][1]) { 433 441 // Choix à faire 434 442 echo '<form id="additem" action="'.$p_url.'&add=3" method="post">'; … … 455 463 form::combo('item_select',$tags_combo,''); 456 464 break; 465 default: 466 echo 467 # --BEHAVIOR-- adminSimpleMenuSelect 468 # Optional step once $item_type known : should provide a field using 'item_select' as id 469 $core->callBehavior('adminSimpleMenuSelect',$item_type,'item_select'); 457 470 } 458 471 echo form::hidden('item_type',$item_type);
Note: See TracChangeset
for help on using the changeset viewer.