/** * * @param mixed $handler_id The ID of the handler. * @param array &$data The local request data. */ public function _show_delete($handler_id, array &$data) { $this->_request_data['wikipage_view'] = $this->_datamanager->get_content_html(); // Replace wikiwords if (array_key_exists('content', $this->_request_data['wikipage_view'])) { $parser = new net_nemein_wiki_parser($this->_page); $this->_request_data['wikipage_view']['content'] = $parser->get_markdown($this->_request_data['wikipage_view']['content']); } midcom_show_style('view-wikipage-delete'); }
/** * Shows the loaded article. * * @param mixed $handler_id The ID of the handler. * @param array &$data The local request data. */ public function _show_view($handler_id, array &$data) { if ($this->_config->get('enable_ajax_editing')) { // For AJAX handling it is the controller that renders everything $this->_request_data['view_article'] = $this->_request_data['controller']->get_content_html(); } else { $this->_request_data['view_article'] = $this->_datamanager->get_content_html(); } midcom_show_style('view'); }
/** * Shows the object to delete. * * @param mixed $handler_id The ID of the handler. * @param array &$data The local request data. */ public function _show_delete($handler_id, array &$data) { $data['view_object'] = $this->_datamanager->get_content_html(); midcom_show_style('midgard_admin_asgard_header'); midcom_show_style('midgard_admin_asgard_middle'); // Initialize the tree $data['tree'] = new midgard_admin_asgard_copytree($this->_object, $data); $data['tree']->copy_tree = false; $data['tree']->inputs = false; midcom_show_style('midgard_admin_asgard_object_delete'); midcom_show_style('midgard_admin_asgard_footer'); }
/** * * @param mixed $handler_id The ID of the handler. * @param array &$data The local request data. */ public function _show_whatlinks($handler_id, array &$data) { if ($this->_controller) { $data['wikipage_view'] = $this->_controller->get_content_html(); } else { $data['wikipage_view'] = $this->_datamanager->get_content_html(); } // Replace wikiwords $parser = new net_nemein_wiki_parser($this->_page); $data['wikipage_view']['content'] = $parser->get_markdown($data['wikipage_view']['content']); midcom_show_style('view-wikipage-whatlinks'); }
/** * Shows the loaded contact. * * @param mixed $handler_id The ID of the handler. * @param array &$data The local request data. */ public function _show_view($handler_id, array &$data) { $data['contact_view'] = $this->_datamanager->get_content_html(); midcom_show_style('show-person'); }
/** * Shows the loaded message. */ public function _show_delete($handler_id, array &$data) { $data['view_message'] = $this->_datamanager->get_content_html(); midcom_show_style('show-message-delete'); }
/** * * @param mixed $handler_id The ID of the handler. * @param array &$data The local request data. */ public function _show_edit($handler_id, array &$data) { $data['controller'] =& $this->_controller; $data['preview_mode'] = $this->_preview; if ($this->_preview) { // Populate preview page with values from form $data['preview_page'] = $this->_page; foreach ($this->_controller->datamanager->schema->fields as $name => $type_definition) { if (!is_a($this->_controller->datamanager->types[$name], 'midcom_helper_datamanager2_type_text')) { // Skip fields of other types continue; } switch ($type_definition['storage']) { case 'parameter': case 'configuration': case 'metadata': // Skip continue; default: $location = $type_definition['storage']['location']; } $data['preview_page']->{$location} = $this->_controller->datamanager->types[$name]->convert_to_storage(); } // Load DM for rendering the page $datamanager = new midcom_helper_datamanager2_datamanager($this->_schemadb); $datamanager->autoset_storage($data['preview_page']); $data['wikipage_view'] = $datamanager->get_content_html(); $data['wikipage'] =& $data['preview_page']; $data['autogenerate_toc'] = false; $data['display_related_to'] = false; // Replace wikiwords // TODO: We should somehow make DM2 do this so it would also work in AJAX previews $parser = new net_nemein_wiki_parser($data['preview_page']); $data['wikipage_view']['content'] = $parser->get_markdown($data['wikipage_view']['content']); } midcom_show_style('view-wikipage-edit'); }
/** * Shows the loaded deliverable. * * @param mixed $handler_id The ID of the handler. * @param array &$data The local request data. */ public function _show_delete($handler_id, array &$data) { $data['deliverable_view'] = $this->_datamanager->get_content_html(); midcom_show_style('show-deliverable-delete'); }
/** * Shows the loaded article. * * @param mixed $handler_id The ID of the handler. * @param array &$data The local request data. */ public function _show_delete($handler_id, array &$data) { $this->_request_data['view_article'] = $this->_datamanager->get_content_html(); midcom_show_style('admin-delete'); }
/** * Shows a delete dialog with an object preview. * * @param mixed $handler_id The ID of the handler. * @param array &$data The local request data. */ public function _show_delete($handler_id, array &$data) { $prefix = $this->_get_style_prefix(); $data['object_view'] = $this->_datamanager->get_content_html(); midcom_show_style($prefix . 'admin-delete'); }