Commit b28387e5 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1792263: Fixing up some nav menu mapping



Includes converting the RESUME_SUBPAGE to MENUITEM_SUBPAGE

And getting the group subnav to use the same structure

behatnotneeded

Change-Id: Ia3bcb02030b5fe4deae47f20ff497dda55667d95
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent e129f687
......@@ -66,7 +66,8 @@ class PluginArtefactBlog extends PluginArtefact {
}
else if ($groupid) {
define('GROUP', $groupid);
define('MENUITEM', 'groups/blogs');
define('MENUITEM', 'engage/mygroups');
define('MENUITEM_SUBPAGE', 'blogs');
}
else {
define('MENUITEM', 'create/blogs');
......
......@@ -10,7 +10,8 @@
*/
define('INTERNAL', 1);
define('MENUITEM', 'groups/files');
define('MENUITEM', 'engage/mygroups');
define('MENUITEM_SUBPAGE', 'files');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'file');
define('SECTION_PAGE', 'groupfiles');
......
......@@ -14,7 +14,7 @@ define('MENUITEM', 'create/resume');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'resume');
define('SECTION_PAGE', 'index');
define('RESUME_SUBPAGE', 'achievements');
define('MENUITEM_SUBPAGE', 'achievements');
require_once(dirname(dirname(dirname(__FILE__))) . '/init.php');
......
......@@ -34,7 +34,7 @@ $a = artefact_instance_from_id($artefact);
$type = $a->get('artefacttype');
$tabs = PluginArtefactResume::composite_tabs();
define('RESUME_SUBPAGE', $tabs[$type]);
define('MENUITEM_SUBPAGE', $tabs[$type]);
define('SUBSECTIONHEADING', get_string($type, 'artefact.resume'));
if ($a->get('owner') != $USER->get('id')) {
......
......@@ -13,7 +13,7 @@ define('INTERNAL', true);
define('MENUITEM', 'create/resume');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'resume');
define('RESUME_SUBPAGE', 'goalsandskills');
define('MENUITEM_SUBPAGE', 'goalsandskills');
require_once(dirname(dirname(dirname(__FILE__))) . '/init.php');
require_once('pieforms/pieform/elements/calendar.php');
......
......@@ -14,7 +14,7 @@ define('MENUITEM', 'create/resume');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'resume');
define('SECTION_PAGE', 'index');
define('RESUME_SUBPAGE', 'employment');
define('MENUITEM_SUBPAGE', 'employment');
require_once(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('resume', 'artefact.resume'));
......
......@@ -13,7 +13,7 @@ define('MENUITEM', 'create/resume');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'resume');
define('SECTION_PAGE', 'index');
define('RESUME_SUBPAGE', 'goalsandskills');
define('MENUITEM_SUBPAGE', 'goalsandskills');
require_once(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('resume', 'artefact.resume'));
......
......@@ -14,7 +14,7 @@ define('MENUITEM', 'create/resume');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'resume');
define('SECTION_PAGE', 'index');
define('RESUME_SUBPAGE', 'index');
define('MENUITEM_SUBPAGE', 'index');
require_once(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('resume', 'artefact.resume'));
......
......@@ -14,7 +14,7 @@ define('MENUITEM', 'create/resume');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'resume');
define('SECTION_PAGE', 'index');
define('RESUME_SUBPAGE', 'interests');
define('MENUITEM_SUBPAGE', 'interests');
require_once(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('resume', 'artefact.resume'));
......
......@@ -95,8 +95,8 @@ class PluginArtefactResume extends PluginArtefact {
if (!get_config('licensemetadata')) {
unset($tabs['license']);
}
if (defined('RESUME_SUBPAGE') && isset($tabs[RESUME_SUBPAGE])) {
$tabs[RESUME_SUBPAGE]['selected'] = true;
if (defined('MENUITEM_SUBPAGE') && isset($tabs[MENUITEM_SUBPAGE])) {
$tabs[MENUITEM_SUBPAGE]['selected'] = true;
}
return $tabs;
}
......
......@@ -14,7 +14,7 @@ define('MENUITEM', 'create/resume');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'resume');
define('SECTION_PAGE', 'index');
define('RESUME_SUBPAGE', 'license');
define('MENUITEM_SUBPAGE', 'license');
require_once(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('resume', 'artefact.resume'));
......
......@@ -27,9 +27,11 @@ $groupid = $collection->get('group');
$institutionname = $collection->get('institution');
$urlparams = array();
if (!empty($groupid)) {
define('MENUITEM', 'groups/views');
define('MENUITEM', 'engage/mygroups');
define('MENUITEM_SUBPAGE', 'views');
define('GROUP', $groupid);
define('SUBSECTIONHEADING', get_string('Collections', 'collection'));
$group = group_current_group();
define('TITLE', $group->name . ' - ' . get_string('deletecollection', 'collection'));
$baseurl = get_config('wwwroot') . 'view/groupviews.php';
$urlparams['group'] = $groupid;
}
......@@ -44,13 +46,15 @@ else if (!empty($institutionname)) {
define('MENUITEM', 'manageinstitutions/institutionviews');
$baseurl = get_config('wwwroot') . 'view/institutionviews.php';
}
define('TITLE', get_string('deletecollection', 'collection'));
$urlparams['institution'] = $institutionname;
}
else {
define('MENUITEM', 'create/views');
define('TITLE', get_string('deletecollection', 'collection'));
$baseurl = get_config('wwwroot') . 'view/index.php';
}
define('TITLE', $collection->get('name'));
define('SUBSECTIONHEADING', $collection->get('name'));
if ($urlparams) {
$baseurl .= '?' . http_build_query($urlparams);
......@@ -75,6 +79,7 @@ $form = pieform(array(
));
$smarty = smarty();
setpageicon($smarty, 'icon-folder-open');
$smarty->assign('subheading', get_string('deletespecifiedcollection', 'collection', $collection->get('name')));
$smarty->assign('message', get_string('collectionconfirmdelete', 'collection'));
$smarty->assign('form', $form);
......
......@@ -49,7 +49,8 @@ if ($collection->is_submitted()) {
$urlparams = array();
if (!empty($groupid)) {
require_once('group.php');
define('MENUITEM', 'groups/views');
define('MENUITEM', 'engage/mygroups');
define('MENUITEM_SUBPAGE', 'views');
define('GROUP', $groupid);
$group = group_current_group();
define('TITLE', $group->name . ' - ' . get_string('editcollection', 'collection'));
......
......@@ -57,7 +57,8 @@ $groupid = $collection->get('group');
$institutionname = $collection->get('institution');
$urlparams = array();
if (!empty($groupid)) {
define('MENUITEM', 'groups/views');
define('MENUITEM', 'engage/mygroups');
define('MENUITEM_SUBPAGE', 'views');
define('GROUP', $groupid);
$group = group_current_group();
define('TITLE', $group->name . ' - ' . get_string('editviews', 'collection'));
......
......@@ -11,10 +11,11 @@
define('PUBLIC', 1);
define('INTERNAL', 1);
define('MENUITEM', 'groups/members');
define('MENUITEM', 'engage/mygroups');
define('MENUITEM_SUBPAGE', 'members');
require(dirname(dirname(__FILE__)) . '/init.php');
require_once('group.php');
define('SUBSECTIONHEADING', get_string('members'));
define('GROUP', param_integer('id'));
$group = group_current_group();
......
......@@ -10,11 +10,12 @@
*/
define('INTERNAL', 1);
define('MENUITEM', 'groups/members');
define('MENUITEM', 'engage/mygroups');
define('MENUITEM_SUBPAGE', 'members');
require(dirname(dirname(__FILE__)) . '/init.php');
require_once('group.php');
require_once(get_config('docroot') . 'interaction/lib.php');
define('SUBSECTIONHEADING', get_string('members'));
define('GROUP', param_integer('group'));
$group = group_current_group();
......
......@@ -10,7 +10,8 @@
*/
define('INTERNAL', 1);
define('MENUITEM', 'groups/groupsiown');
define('MENUITEM', 'engage/mygroups');
define('MENUITEM_SUBPAGE', 'info');
require(dirname(dirname(__FILE__)) . '/init.php');
require_once('group.php');
require_once(get_config('libroot') . 'antispam.php');
......
......@@ -11,7 +11,8 @@
define('PUBLIC', 1);
define('INTERNAL', 1);
define('MENUITEM', 'groups/members');
define('MENUITEM', 'engage/mygroups');
define('MENUITEM_SUBPAGE', 'members');
require(dirname(dirname(__FILE__)) . '/init.php');
require_once('group.php');
......
......@@ -11,7 +11,8 @@
define('PUBLIC', 1);
define('INTERNAL', 1);
define('MENUITEM', 'groups/members');
define('MENUITEM', 'engage/mygroups');
define('MENUITEM_SUBPAGE', 'members');
require(dirname(dirname(__FILE__)) . '/init.php');
require_once('group.php');
require_once('searchlib.php');
......
......@@ -14,7 +14,8 @@ require_once('view.php');
require_once('group.php');
safe_require('artefact', 'comment');
define('TITLE', get_string('report', 'group'));
define('MENUITEM', 'groups/report');
define('MENUITEM', 'engage/mygroups');
define('MENUITEM_SUBPAGE', 'report');
define('GROUP', param_integer('group'));
define('SUBSECTIONHEADING', get_string('report', 'group'));
......
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