Changeset View
Changeset View
Standalone View
Standalone View
core/units/categories/categories_tag_processor.php
Show First 20 Lines • Show All 1538 Lines • ▼ Show 20 Line(s) | |||||
// show "EditPage" button only for pages, that exists in structure | // show "EditPage" button only for pages, that exists in structure | ||||
if ($display_mode != 'end') { | if ($display_mode != 'end') { | ||||
$edit_btn = $edit_url = ''; | $edit_btn = $edit_url = ''; | ||||
if ( EDITING_MODE == EDITING_MODE_CONTENT ) { | if ( EDITING_MODE == EDITING_MODE_CONTENT ) { | ||||
$item_prefix = isset($params['item_prefix']) ? $params['item_prefix'] : ''; | $item_prefix = isset($params['item_prefix']) ? $params['item_prefix'] : ''; | ||||
unset($params['item_prefix']); | unset($params['item_prefix']); | ||||
$default_params = array( | |||||
'button_icon' => 'section_properties.png', | |||||
'button_class' => 'cms-section-properties-btn', | |||||
'button_title' => 'la_btn_SectionProperties', | |||||
); | |||||
$params = array_merge($default_params, $params); | |||||
if ( $item_prefix ) { | if ( $item_prefix ) { | ||||
$params['button_class'] = 'cms-section-properties-btn'; | $params['button_class'] = 'cms-section-properties-btn'; | ||||
$edit_btn = $this->Application->ProcessParsedTag($item_prefix, 'AdminEditButton', $params) . "\n"; | $edit_btn = $this->Application->ProcessParsedTag($item_prefix, 'AdminEditButton', $params) . "\n"; | ||||
} | } | ||||
else { | else { | ||||
$edit_btn = $this->AdminEditButton($params) . "\n"; // "st" object must be loaded before this | $edit_btn = $this->AdminEditButton($params) . "\n"; // "st" object must be loaded before this | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 187 Lines • ▼ Show 20 Line(s) | |||||
* @access protected | * @access protected | ||||
*/ | */ | ||||
protected function AdminEditButton($params) | protected function AdminEditButton($params) | ||||
{ | { | ||||
if ( EDITING_MODE != EDITING_MODE_CONTENT ) { | if ( EDITING_MODE != EDITING_MODE_CONTENT ) { | ||||
return ''; | return ''; | ||||
} | } | ||||
$object = $this->getObject($params); | |||||
/* @var $object kDBItem */ | |||||
$params['item_prefix'] = 'c'; | $params['item_prefix'] = 'c'; | ||||
if ( $this->Prefix == 'st' ) { | |||||
$params['button_icon'] = 'section_properties.png'; | |||||
$params['button_class'] = 'cms-section-properties-btn'; | |||||
$params['button_title'] = 'la_btn_SectionProperties'; | |||||
} | |||||
return parent::AdminEditButton($params); | return parent::AdminEditButton($params); | ||||
} | } | ||||
/** | /** | ||||
* Builds site menu | * Builds site menu | ||||
* | * | ||||
* @param Array $params | * @param Array $params | ||||
* @return string | * @return string | ||||
▲ Show 20 Lines • Show All 491 Lines • Show Last 20 Lines |