Skip to content

Commit

Permalink
Ticket #3514
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLV committed Sep 21, 2021
1 parent b4d21dc commit 2ca927e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions install/sql/system.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4178,6 +4178,7 @@ CREATE TABLE IF NOT EXISTS `sys_menu_items` (
`visible_for_levels` int(11) NOT NULL DEFAULT '2147483647',
`visibility_custom` text NOT NULL,
`hidden_on` varchar(255) NOT NULL DEFAULT '',
`primary` tinyint(4) NOT NULL DEFAULT '0',
`active` tinyint(4) NOT NULL DEFAULT '1',
`copyable` tinyint(4) NOT NULL DEFAULT '1',
`editable` tinyint(4) NOT NULL DEFAULT '1',
Expand Down
1 change: 1 addition & 0 deletions modules/boonex/english/data/langs/system/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,7 @@
<string name="_adm_nav_txt_items_onclick"><![CDATA[OnClick]]></string>
<string name="_adm_nav_txt_items_parent_id"><![CDATA[Parent Item]]></string>
<string name="_adm_nav_txt_items_parent_id_empty"><![CDATA[No Parent Item]]></string>
<string name="_adm_nav_txt_items_primary"><![CDATA[Primary]]></string>
<string name="_adm_nav_txt_items_show_to_popup"><![CDATA[Show "{0}" menu item to: ]]></string>
<string name="_adm_nav_txt_items_submenu"><![CDATA[Submenu]]></string>
<string name="_adm_nav_txt_items_submenu_empty"><![CDATA[No Submenu]]></string>
Expand Down
1 change: 1 addition & 0 deletions modules/boonex/russian/data/langs/system/ru.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,7 @@
<string name="_adm_nav_txt_items_onclick"><![CDATA[OnClick]]></string>
<string name="_adm_nav_txt_items_parent_id"><![CDATA[Родительский пункт]]></string>
<string name="_adm_nav_txt_items_parent_id_empty"><![CDATA[Нет родительского пункта]]></string>
<string name="_adm_nav_txt_items_primary"><![CDATA[Основная]]></string>
<string name="_adm_nav_txt_items_show_to_popup"><![CDATA[Отображать "{0}" элемент меню для: ]]></string>
<string name="_adm_nav_txt_items_submenu"><![CDATA[Подменю]]></string>
<string name="_adm_nav_txt_items_submenu_empty"><![CDATA[Без подменю]]></string>
Expand Down
1 change: 1 addition & 0 deletions studio/classes/BxDolStudioNavigationQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ function getItems($aParams, &$aItems, $bReturnCount = true)
`tmi`.`submenu_popup` AS `submenu_popup`,
`tmi`.`visible_for_levels` AS `visible_for_levels`,
`tmi`.`visibility_custom` AS `visibility_custom`,
`tmi`.`primary` AS `primary`,
`tmi`.`active` AS `active`,
`tmi`.`copyable` AS `copyable`,
`tmi`.`editable` AS `editable`,
Expand Down
19 changes: 15 additions & 4 deletions studio/template/scripts/BxBaseStudioNavigationItems.php
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,17 @@ protected function _getFormObject($sAction, $aItem = array())
'caption' => _t('_adm_nav_txt_items_icon_image_old'),
'content' => ''
),
'primary' => array(
'type' => 'switcher',
'name' => 'primary',
'caption' => _t('_adm_nav_txt_items_primary'),
'info' => '',
'value' => '1',
'checked' => isset($aItem['primary']) && (int)$aItem['primary'] == 1,
'db' => array (
'pass' => 'Int',
)
),
'controls' => array(
'name' => 'controls',
'type' => 'input_set',
Expand All @@ -774,10 +785,10 @@ protected function _getFormObject($sAction, $aItem = array())
)
);

$aItems = array();
$this->oDb->getItems(array('type' => 'by_set_name', 'value' => $this->sSet), $aItems, false);
foreach($aItems as $aItem)
$aForm['inputs']['parent_id']['values'][$aItem['id']] = _t(!empty($aItem['title_system']) ? $aItem['title_system'] : $aItem['title']);
$aSetItems = array();
$this->oDb->getItems(array('type' => 'by_set_name', 'value' => $this->sSet), $aSetItems, false);
foreach($aSetItems as $aSetItem)
$aForm['inputs']['parent_id']['values'][$aSetItem['id']] = _t(!empty($aSetItem['title_system']) ? $aSetItem['title_system'] : $aSetItem['title']);

$aMenus = array();
$this->oDb->getMenus(array('type' => 'all'), $aMenus, false);
Expand Down

0 comments on commit 2ca927e

Please sign in to comment.