menu page cleanup
This commit is contained in:
parent
d5d1f655d9
commit
2e695d1da2
32
mod/menu.php
32
mod/menu.php
@ -52,25 +52,27 @@ function menu_content(&$a) {
|
|||||||
if(argc() == 1) {
|
if(argc() == 1) {
|
||||||
// list menus
|
// list menus
|
||||||
$x = menu_list(local_user());
|
$x = menu_list(local_user());
|
||||||
|
if($x) {
|
||||||
|
for($y = 0; $y < count($x); $y ++) {
|
||||||
|
$x[$y]['bookmark'] = (($x[$y]['menu_flags'] & MENU_BOOKMARK) ? true : false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$o = replace_macros(get_markup_template('menulist.tpl'),array(
|
$o = replace_macros(get_markup_template('menulist.tpl'),array(
|
||||||
'$title' => t('Manage Menus'),
|
'$title' => t('Manage Menus'),
|
||||||
'$menus' => $x,
|
'$menus' => $x,
|
||||||
'$edit' => t('Edit'),
|
'$edit' => t('Edit'),
|
||||||
'$drop' => t('Drop'),
|
'$drop' => t('Drop'),
|
||||||
'$new' => t('New'),
|
'$new' => t('New'),
|
||||||
'$hintnew' => t('Create a new menu'),
|
'$bmark' => t('Bookmarks allowed'),
|
||||||
'$hintdrop' => t('Delete this menu'),
|
'$hintnew' => t('Create a new menu'),
|
||||||
'$hintcontent' => t('Edit menu contents'),
|
'$hintdrop' => t('Delete this menu'),
|
||||||
'$hintedit' => t('Edit this menu')
|
'$hintcontent' => t('Edit menu contents'),
|
||||||
));
|
'$hintedit' => t('Edit this menu')
|
||||||
|
));
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
3
view/css/mod_menu.css
Normal file
3
view/css/mod_menu.css
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#menulist > li {
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
@ -9,7 +9,7 @@
|
|||||||
{{if $menus }}
|
{{if $menus }}
|
||||||
<ul id="menulist">
|
<ul id="menulist">
|
||||||
{{foreach $menus as $m }}
|
{{foreach $menus as $m }}
|
||||||
<li><a href="menu/{{$m.menu_id}}" title="{{$hintedit}}"><i class="icon-pencil design-icons design-edit-icon"></i></a> <a href="menu/{{$m.menu_id}}/drop" title={{$hintdrop}}><i class="icon-remove drop-icons design-icons design-remove-icon"></i></a> <a href="mitem/{{$m.menu_id}}/new" title="{{$hintcontent}}">{{$m.menu_name}}</a></li>
|
<li><a href="menu/{{$m.menu_id}}" title="{{$hintedit}}"><i class="icon-pencil design-icons design-edit-icon btn btn-default"></i></a> <a href="menu/{{$m.menu_id}}/drop" title="{{$hintdrop}}"><i class="icon-remove drop-icons design-icons design-remove-icon btn btn-default"></i></a> {{if $m.bookmark}}<i class="icon-bookmark" title="{{$bmark}}" ></i> {{/if}}<a href="mitem/{{$m.menu_id}}/new" title="{{$hintcontent}}">{{$m.menu_name}}</a></li>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</ul>
|
</ul>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
Reference in New Issue
Block a user