From ca36fce9a74a92318e6f5cbbc341210e994db2df Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 10 May 2015 21:17:37 +0200 Subject: provide drop down submenu suggestions in edit mode --- mod/mitem.php | 7 ++++--- view/tpl/mitemedit.tpl | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mod/mitem.php b/mod/mitem.php index 333568eec..e4a4b7030 100644 --- a/mod/mitem.php +++ b/mod/mitem.php @@ -159,7 +159,7 @@ function mitem_content(&$a) { '$permdesc' => t("\x28click to open/close\x29"), '$aclselect' => populate_acl($perm_defaults,false), '$mitem_desc' => array('mitem_desc', t('Link Name'), '', 'Visible name of the link','*'), - '$mitem_link' => array('mitem_link', t('Link Target or Submenu'), '', 'Enter URL of the link or select a menu name to create a submenu', '*', 'list="menu-names"'), + '$mitem_link' => array('mitem_link', t('Link or Submenu Target'), '', 'Enter URL of the link or select a menu name to create a submenu', '*', 'list="menu-names"'), '$usezid' => array('usezid', t('Use RedMatrix magic-auth if available'), true, ''), '$newwin' => array('newwin', t('Open link in new window'), false,''), '$mitem_order' => array('mitem_order', t('Order in list'),'0',t('Higher numbers will sink to bottom of listing')), @@ -230,12 +230,13 @@ function mitem_content(&$a) { '$aclselect' => populate_acl($mitem,false), '$mitem_id' => intval(argv(2)), '$mitem_desc' => array('mitem_desc', t('Link text'), $mitem['mitem_desc'], '','*'), - '$mitem_link' => array('mitem_link', t('URL of link'), $mitem['mitem_link'], '', '*'), + '$mitem_link' => array('mitem_link', t('Link or Submenu Target'), $mitem['mitem_link'], 'Enter URL of the link or select a menu name to create a submenu', '*', 'list="menu-names"'), '$usezid' => array('usezid', t('Use RedMatrix magic-auth if available'), (($mitem['mitem_flags'] & MENU_ITEM_ZID) ? 1 : 0), ''), '$newwin' => array('newwin', t('Open link in new window'), (($mitem['mitem_flags'] & MENU_ITEM_NEWWIN) ? 1 : 0),''), '$mitem_order' => array('mitem_order', t('Order in list'),$mitem['mitem_order'],t('Higher numbers will sink to bottom of listing')), '$submit' => t('Submit'), - '$lockstate' => $lockstate + '$lockstate' => $lockstate, + '$menu_names' => $menu_names )); return $o; diff --git a/view/tpl/mitemedit.tpl b/view/tpl/mitemedit.tpl index 305aeb2bf..8b8afa24c 100644 --- a/view/tpl/mitemedit.tpl +++ b/view/tpl/mitemedit.tpl @@ -11,11 +11,13 @@ {{/if}} {{include file="field_input.tpl" field=$mitem_desc}} {{include file="field_input.tpl" field=$mitem_link}} + {{if $menu_names}} {{foreach $menu_names as $menu_name}} + {{/if}} {{include file="field_input.tpl" field=$mitem_order}} {{include file="field_checkbox.tpl" field=$usezid}} {{include file="field_checkbox.tpl" field=$newwin}} -- cgit v1.2.3