Commit 91747fb7 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1782954: Adding new menu layout



behatnotneeded

Change-Id: I523b7989df426670690b0a086c553149dba26d84
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 0401ddc9
......@@ -10,7 +10,7 @@
*/
define('INTERNAL', 1);
define('MENUITEM', 'groups/institutions');
define('MENUITEM', 'engage/institutions');
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'account');
define('SECTION_PAGE', 'institutions');
......
......@@ -275,6 +275,7 @@ JS;
}
$smarty = smarty(array('paginator','js/chartjs/Chart.min.js'));
setpageicon($smarty, 'icon-pie-chart');
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('institutiondata', $institutiondata);
$smarty->assign('type', $type);
......
......@@ -69,7 +69,7 @@ class PluginArtefactBlog extends PluginArtefact {
define('MENUITEM', 'groups/blogs');
}
else {
define('MENUITEM', 'content/blogs');
define('MENUITEM', 'create/blogs');
}
}
......@@ -80,12 +80,12 @@ class PluginArtefactBlog extends PluginArtefact {
public static function menu_items() {
global $USER;
$tab = array(
'path' => 'content/blogs',
'weight' => 40,
'path' => 'create/blogs',
'weight' => 30,
'url' => 'artefact/blog/index.php',
'title' => get_string('Blogs', 'artefact.blog'),
);
return array('content/blogs' => $tab);
return array('create/blogs' => $tab);
}
public static function get_cron() {
......
......@@ -10,7 +10,7 @@
*/
define('INTERNAL', 1);
define('MENUITEM', 'content/files');
define('MENUITEM', 'create/files');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
safe_require('artefact', 'file');
......
......@@ -10,7 +10,7 @@
*/
define('INTERNAL', 1);
define('MENUITEM', 'content/files');
define('MENUITEM', 'create/files');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'file');
define('SECTION_PAGE', 'index');
......
......@@ -37,17 +37,23 @@ class PluginArtefactFile extends PluginArtefact {
public static function menu_items() {
return array(
'content/files' => array(
'path' => 'content/files',
'create/files' => array(
'path' => 'create/files',
'url' => 'artefact/file/index.php',
'title' => get_string('Files', 'artefact.file'),
'weight' => 30,
'weight' => 20,
),
'content/profileicons' => array(
'path' => 'content/profileicons',
);
}
public static function right_nav_menu_items() {
return array(
'profileicons' => array(
'path' => 'profileicons',
'url' => 'artefact/file/profileicons.php',
'title' => get_string('profileicons', 'artefact.file'),
'weight' => 20,
'weight' => 15,
'iconclass' => 'id-badge',
),
);
}
......
......@@ -10,7 +10,7 @@
*/
define('INTERNAL', 1);
define('MENUITEM', 'content/profileicons');
define('MENUITEM', 'profileicons');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'file');
define('SECTION_PAGE', 'profileicons');
......
......@@ -38,7 +38,7 @@ else if ($institution = $artefact->get('institution')) {
$goto .= '?institution=' . $institution;
}
else {
define('MENUITEM', 'content/notes');
define('MENUITEM', 'create/notes');
}
$folder = param_integer('folder', 0);
......
......@@ -10,7 +10,7 @@
*/
define('INTERNAL', 1);
define('MENUITEM', 'content/profile');
define('MENUITEM', 'profile');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'internal');
define('SECTION_PAGE', 'index');
......
......@@ -112,19 +112,25 @@ class PluginArtefactInternal extends PluginArtefact {
return get_field('artefact_installed', 'active', 'name', 'internal');
}
public static function menu_items() {
public static function right_nav_menu_items() {
return array(
'content/profile' => array(
'path' => 'content/profile',
'profile' => array(
'path' => 'profile',
'url' => 'artefact/internal/index.php',
'title' => get_string('profile', 'artefact.internal'),
'weight' => 10,
'iconclass' => 'id-card-o',
),
'content/notes' => array(
'path' => 'content/notes',
);
}
public static function menu_items() {
return array(
'create/notes' => array(
'path' => 'create/notes',
'url' => 'artefact/internal/notes.php',
'title' => get_string('Notes', 'artefact.internal'),
'weight' => 60,
'weight' => 40,
),
);
}
......
......@@ -56,7 +56,7 @@ else if ($institution = param_alpha('institution', null)) {
$params['institution'] = $institution;
}
else {
define('MENUITEM', 'content/notes');
define('MENUITEM', 'create/notes');
$pageheading = get_string('mynotes', 'artefact.internal');
$where = 'owner = ?';
$values = array($USER->get('id'));
......
......@@ -56,7 +56,7 @@ else if ($institution = param_alpha('institution', null)) {
$params['institution'] = $institution;
}
else {
define('MENUITEM', 'content/notes');
define('MENUITEM', 'create/notes');
$pageheading = get_string('mynotes', 'artefact.internal');
$where = 'owner = ?';
$values = array($USER->get('id'));
......
......@@ -10,7 +10,7 @@
*/
define('INTERNAL', true);
define('MENUITEM', 'content/plans');
define('MENUITEM', 'create/plans');
require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/init.php');
safe_require('artefact','plans');
......
......@@ -10,7 +10,7 @@
*/
define('INTERNAL', true);
define('MENUITEM', 'content/plans');
define('MENUITEM', 'create/plans');
require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/init.php');
safe_require('artefact','plans');
......
......@@ -10,7 +10,7 @@
*/
define('INTERNAL', true);
define('MENUITEM', 'content/plans');
define('MENUITEM', 'create/plans');
require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/init.php');
require_once('pieforms/pieform/elements/calendar.php');
......
......@@ -10,7 +10,7 @@
*/
define('INTERNAL', true);
define('MENUITEM', 'content/plans');
define('MENUITEM', 'create/plans');
require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/init.php');
require_once('pieforms/pieform/elements/calendar.php');
......
......@@ -11,7 +11,7 @@
define('INTERNAL', 1);
define('MENUITEM', 'content/plans');
define('MENUITEM', 'create/plans');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'plans');
define('SECTION_PAGE', 'index');
......
......@@ -34,11 +34,11 @@ class PluginArtefactPlans extends PluginArtefact {
public static function menu_items() {
return array(
'content/plans' => array(
'path' => 'content/plans',
'create/plans' => array(
'path' => 'create/plans',
'url' => 'artefact/plans/index.php',
'title' => get_string('Plans', 'artefact.plans'),
'weight' => 60,
'weight' => 50,
),
);
}
......
......@@ -10,7 +10,7 @@
*/
define('INTERNAL', 1);
define('MENUITEM', 'content/plans');
define('MENUITEM', 'create/plans');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'plans');
......
......@@ -11,7 +11,7 @@
define('INTERNAL', 1);
define('MENUITEM', 'content/plans');
define('MENUITEM', 'create/plans');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'plans');
define('SECTION_PAGE', 'plans');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment