Index: branches/RC/core/units/categories/categories_tag_processor.php =================================================================== diff -u -N -r11760 -r11823 --- branches/RC/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 11760) +++ branches/RC/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 11823) @@ -1999,4 +1999,44 @@ return $json_helper->encode($ret); } + + /** + * Checks, that "view in browse mode" functionality available + * + * @param Array $params + * @return bool + */ + function BrowseModeAvailable($params) + { + $valid_special = $params['Special'] != 'user'; + $not_selector = $this->Application->GetVar('type') != 'item_selector'; + + return $valid_special && $not_selector; + } + + /** + * Returns a link for editing product + * + * @param Array $params + * @return string + */ + function ItemEditLink($params) + { + $object =& $this->getObject(); + /* @var $object kDBList */ + + $edit_template = $this->Application->getUnitOption($this->Prefix, 'AdminTemplatePath') . '/' . $this->Application->getUnitOption($this->Prefix, 'AdminTemplatePrefix') . 'edit'; + + $url_params = Array ( + 'm_opener' => 'd', + $this->Prefix.'_mode' => 't', + $this->Prefix.'_event' => 'OnEdit', + $this->Prefix.'_id' => $object->GetID(), + 'm_cat_id' => $object->GetDBField('ParentId'), + 'pass' => 'all,'.$this->Prefix, + 'no_pass_through' => 1, + ); + + return $this->Application->HREF($edit_template,'', $url_params); + } } \ No newline at end of file