Exemplo n.º 1
0
 private function _prepare_request_data()
 {
     org_openpsa_relatedto_plugin::add_header_files();
     $object_url = midcom::get('permalinks')->create_permalink($this->_object->guid);
     if ($object_url) {
         $this->_view_toolbar->add_item(array(MIDCOM_TOOLBAR_URL => $object_url, MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('back'), MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/stock_left.png'));
     }
     // Load "Create X" buttons for all the related info
     $relatedto_button_settings = org_openpsa_relatedto_plugin::common_toolbar_buttons_defaults();
     $ref = midcom_helper_reflector::get($this->_object);
     $class_label = $ref->get_class_label();
     $object_label = $ref->get_object_label($this->_object);
     $relatedto_button_settings['wikinote']['wikiword'] = str_replace('/', '-', sprintf(midcom::get('i18n')->get_string('notes for %s %s on %s', 'org.openpsa.relatedto'), $class_label, $object_label, strftime('%x %H:%M')));
     org_openpsa_relatedto_plugin::common_node_toolbar_buttons($this->_view_toolbar, $this->_object, $this->_request_data['topic']->component, $relatedto_button_settings);
     org_openpsa_relatedto_plugin::add_journal_entry_button($this->_view_toolbar, $this->_object->guid);
     $this->_request_data['object'] =& $this->_object;
     $this->_request_data['show_title'] = false;
     if ($this->_mode == 'both' || $this->_mode == 'both-paged') {
         $this->_request_data['show_title'] = true;
     }
     if ($object_url) {
         $this->add_breadcrumb($object_url, $object_label);
     }
     $this->add_breadcrumb("", $this->_l10n->get('view related information'));
 }