diff options
author | Mario Vavti <mario@mariovavti.com> | 2015-05-10 21:17:37 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2015-05-10 21:17:37 +0200 |
commit | ca36fce9a74a92318e6f5cbbc341210e994db2df (patch) | |
tree | 41ab1b35d40b05f2c7658d9a3c207106b2ebd7f7 | |
parent | fad37eb6d0a8fdae8ee3e0082df53f1562ca1e23 (diff) | |
download | volse-hubzilla-ca36fce9a74a92318e6f5cbbc341210e994db2df.tar.gz volse-hubzilla-ca36fce9a74a92318e6f5cbbc341210e994db2df.tar.bz2 volse-hubzilla-ca36fce9a74a92318e6f5cbbc341210e994db2df.zip |
provide drop down submenu suggestions in edit mode
-rw-r--r-- | mod/mitem.php | 7 | ||||
-rw-r--r-- | 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}} <datalist id="menu-names"> {{foreach $menu_names as $menu_name}} <option value="{{$menu_name}}"> {{/foreach}} </datalist> + {{/if}} {{include file="field_input.tpl" field=$mitem_order}} {{include file="field_checkbox.tpl" field=$usezid}} {{include file="field_checkbox.tpl" field=$newwin}} |