make menu creation for sys channel work
This commit is contained in:
parent
138e0fe445
commit
d8f03450e7
@ -137,7 +137,7 @@ function menu_content(&$a) {
|
||||
|
||||
$o = replace_macros(get_markup_template('menuedit.tpl'), array(
|
||||
'$header' => t('Edit Menu'),
|
||||
'$menu_id' => intval(argv(1)),
|
||||
'$menu_edit_link' => 'mitem/' . intval(argv(1)) . (($a->is_sys) ? '?f=&sys=1' : ''),
|
||||
'$hintedit' => t('Add or remove entries to this menu'),
|
||||
'$editcontents' => t('Edit menu contents'),
|
||||
'$menu_name' => array('menu_name', t('Menu name'), $m['menu_name'], t('Must be unique, only seen by you'), '*'),
|
||||
|
@ -44,9 +44,6 @@ function mitem_post(&$a) {
|
||||
if(! $a->data['menu'])
|
||||
return;
|
||||
|
||||
|
||||
$channel = $a->get_channel();
|
||||
|
||||
if(!$_REQUEST['mitem_desc'] || !$_REQUEST['mitem_link']) {
|
||||
notice( t('Unable to create element.') . EOL);
|
||||
return;
|
||||
@ -90,9 +87,6 @@ function mitem_post(&$a) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -155,6 +149,7 @@ function mitem_content(&$a) {
|
||||
|
||||
$create = replace_macros(get_markup_template('mitemedit.tpl'), array(
|
||||
'$menu_id' => $a->data['menu']['menu_id'],
|
||||
'$action' => 'mitem/' . $a->data['menu']['menu_id'] . (($a->is_sys) ? '?f=&sys=1' : ''),
|
||||
'$permissions' => t('Menu Item Permissions'),
|
||||
'$permdesc' => t("\x28click to open/close\x29"),
|
||||
'$aclselect' => populate_acl($perm_defaults,false),
|
||||
|
@ -1,9 +1,9 @@
|
||||
{{if $header}}
|
||||
<div class="generic-content-wrapper">
|
||||
<div class="section-title-wrapper">
|
||||
{{if $menu_id}}
|
||||
{{if $menu_edit_link}}
|
||||
<div class="pull-right">
|
||||
<a href="mitem/{{$menu_id}}" title="{{$hintedit}}" class="btn btn-xs btn-success"><i class="icon-edit"></i> {{$editcontents}}</a>
|
||||
<a href="{{$menu_edit_link}}" title="{{$hintedit}}" class="btn btn-xs btn-success"><i class="icon-edit"></i> {{$editcontents}}</a>
|
||||
</div>
|
||||
{{/if}}
|
||||
<h2>{{$header}}</h2>
|
||||
|
@ -5,7 +5,7 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
<div id="menu-element-creator" class="section-content-tools-wrapper" style="display: {{$display}};">
|
||||
<form id="mitemedit" action="mitem/{{$menu_id}}{{if $mitem_id}}/{{$mitem_id}}{{/if}}" method="post" >
|
||||
<form id="mitemedit" action="{{$action}}" method="post" >
|
||||
<input type="hidden" name="menu_id" value="{{$menu_id}}" />
|
||||
{{if $mitem_id}}
|
||||
<input type="hidden" name="mitem_id" value="{{$mitem_id}}" />
|
||||
|
Reference in New Issue
Block a user