Commit 7a64e38a authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1819787: Hiding group submenu when on group page"

parents d337ebf8 d6263dfa
......@@ -6032,12 +6032,14 @@ class View {
}
}
public static function set_nav($group, $institution, $share=false, $collection=false) {
public static function set_nav($group, $institution, $share=false, $collection=false, $submenu=true) {
if ($group) {
define('MENUITEM', 'engage/index');
if ($submenu) {
define('MENUITEM_SUBPAGE', $share ? 'share' : 'views');
define('GROUP', $group);
}
}
else if ($institution == 'mahara') {
define('ADMIN', 1);
define('MENUITEM', $share ? 'configsite/share' : 'configsite/siteviews');
......
......@@ -104,7 +104,7 @@ if (!can_view_view($view)) {
throw new AccessDeniedException($errorstr);
}
$institution = $view->get('institution');
View::set_nav($groupid, $institution);
View::set_nav($groupid, $institution, false, false, false);
// Comment list pagination requires limit/offset params
$limit = param_integer('limit', 10);
$offset = param_integer('offset', 0);
......
......@@ -69,6 +69,8 @@ Scenario: Create forum and add block to group page
# TODO could test other options
And I press "Save"
And I display the page
# Allow the ajax block to load
And I wait "1" seconds
Then I should see "cat photography is often underrated"
And I should see "I just use my phone"
And I expand the section "Attached files"
......
Supports Markdown
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