/** * Simple helper which references all important members to the request data listing * for usage within the style listing. */ private function _prepare_request_data() { $this->_request_data['product'] =& $this->_product; $this->_view_toolbar->add_item(array(MIDCOM_TOOLBAR_URL => "product/edit/{$this->_product->guid}/", MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('edit'), MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/edit.png', MIDCOM_TOOLBAR_ENABLED => $this->_product->can_do('midgard:update'), MIDCOM_TOOLBAR_ACCESSKEY => 'e')); $this->_view_toolbar->add_item(array(MIDCOM_TOOLBAR_URL => "product/delete/{$this->_product->guid}/", MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('delete'), MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/trash.png', MIDCOM_TOOLBAR_ENABLED => $this->_product->can_do('midgard:delete'))); if ($this->_config->get('enable_productlinks') && $this->_request_data['is_linked_from'] != '') { $product_link_guid = $this->_request_data['is_linked_from']; $this->_view_toolbar->add_item(array(MIDCOM_TOOLBAR_URL => "productlink/{$product_link_guid}/", MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('view productlink'), MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/view.png', MIDCOM_TOOLBAR_ENABLED => $this->_product->can_do('midgard:update'))); $this->_view_toolbar->add_item(array(MIDCOM_TOOLBAR_URL => "productlink/edit/{$product_link_guid}/", MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('edit productlink'), MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/edit.png', MIDCOM_TOOLBAR_ENABLED => $this->_product->can_do('midgard:update'))); $this->_view_toolbar->add_item(array(MIDCOM_TOOLBAR_URL => "productlink/delete/{$product_link_guid}/", MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('delete productlink'), MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/trash.png', MIDCOM_TOOLBAR_ENABLED => $this->_product->can_do('midgard:delete'))); } if (midcom::get('componentloader')->is_installed('org.openpsa.relatedto')) { org_openpsa_relatedto_plugin::add_button($this->_view_toolbar, $this->_product->guid); } }
/** * Simple helper which references all important members to the request data listing * for usage within the style listing. */ private function _prepare_request_data() { $this->_request_data['productlink'] =& $this->_productlink; $this->_view_toolbar->add_item(array(MIDCOM_TOOLBAR_URL => "productlink/edit/{$this->_productlink->guid}/", MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('edit'), MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/edit.png', MIDCOM_TOOLBAR_ENABLED => $this->_productlink->can_do('midgard:update'), MIDCOM_TOOLBAR_ACCESSKEY => 'e')); $this->_view_toolbar->add_item(array(MIDCOM_TOOLBAR_URL => "productlink/delete/{$this->_productlink->guid}/", MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('delete'), MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/trash.png', MIDCOM_TOOLBAR_ENABLED => $this->_productlink->can_do('midgard:delete'))); }