diff --git a/app/plugins/helpMenu/controllers/ShowController.php b/app/plugins/helpMenu/controllers/ShowController.php index d86ab31f2e..2adb370e89 100755 --- a/app/plugins/helpMenu/controllers/ShowController.php +++ b/app/plugins/helpMenu/controllers/ShowController.php @@ -26,6 +26,20 @@ * ---------------------------------------------------------------------- */ class ShowController extends ActionController { + public function __construct(&$po_request, &$po_response, $pa_view_paths=null) { + // Set view path for plugin views directory + if (!is_array($pa_view_paths)) { $pa_view_paths = array(); } + $pa_view_paths[] = __CA_APP_DIR__."/plugins/helpMenu/themes/".__CA_THEME__."/views"; + + // Load plugin configuration file + $this->config = Configuration::load(__CA_APP_DIR__.'/plugins/helpMenu/conf/helpMenu.conf'); + + + parent::__construct($po_request, $po_response, $pa_view_paths); + + // Load plugin stylesheet + //MetaTagManager::addLink('stylesheet', __CA_URL_ROOT__."/app/plugins/ArtefactsCanada/themes/".__CA_THEME__."/css/ArtefactsCanada.css",'text/css'); + } # ------------------------------------------------------- /** * @@ -45,5 +59,13 @@ public function __call($ps_method, $pa_path) { return; } } - # ------------------------------------------------------- + # ------------------------------------------------------- + public function Info(){ + $current_page = new ca_site_pages($this->request->getAction()); + + $this->view->setVar('current_page', $current_page ); + + return $this->render('widget_helpmenu_info_html.php',true); + + } } diff --git a/app/plugins/helpMenu/helpMenuPlugin.php b/app/plugins/helpMenu/helpMenuPlugin.php index 78bf299159..1cbdce7d4c 100644 --- a/app/plugins/helpMenu/helpMenuPlugin.php +++ b/app/plugins/helpMenu/helpMenuPlugin.php @@ -86,4 +86,18 @@ public function hookRenderMenuBar($pa_menu_bar) { return $pa_menu_bar; } # ------------------------------------------------------- + /** + * Inserts a quick access menu to other help pages + * This could be replaced if a Menu Sidebar hook is ever implemented + */ + public function hookRenderWidgets($pa_widgets_config){ + $pa_widgets_config['helpMenuInfo'] = array( + "domain" => array("module" => "helpMenu", "controller" => "Show"), + "handler" => array("module" => "helpMenu", "controller" => "Show", "action" => "Info", "isplugin" => true), + "requires" => array(), + "parameters" => array() + ); + return $pa_widgets_config; + +} } diff --git a/app/plugins/helpMenu/themes/default/views/widget_helpmenu_info_html.php b/app/plugins/helpMenu/themes/default/views/widget_helpmenu_info_html.php new file mode 100644 index 0000000000..b6c0d6c184 --- /dev/null +++ b/app/plugins/helpMenu/themes/default/views/widget_helpmenu_info_html.php @@ -0,0 +1,19 @@ +getVar("current_page"); +$current_page_id = $current_page->get('ca_site_pages.page_id'); + +$pages = ca_site_pages::getPageList(['type' => 'PROVIDENCE_HELP_TEXT']); + +if(is_array($pages) && sizeof($pages)){ + print ""; +} +?> \ No newline at end of file