MDL-45902 repository: Improving breadcrumb and title of manage page

Part of MDL-45774
This commit is contained in:
Frederic Massart 2015-02-25 16:24:10 +01:00 committed by Adrian Greeve
parent 8309caa643
commit fa3ca5e204
3 changed files with 10 additions and 12 deletions

View File

@ -9,4 +9,5 @@ fullview,core_grades
categoriesedit,core_grades
lockingmeans,core_cache
lockmethod,core_cache
lockmethod_help,core_cache
lockmethod_help,core_cache
personalrepositories,core_repository

View File

@ -186,7 +186,6 @@ $string['on'] = 'Enabled and visible';
$string['overwrite'] = 'Overwrite';
$string['overwriteall'] = 'Overwrite all';
$string['path'] = 'Path';
$string['personalrepositories'] = 'Available repository instances';
$string['plugin'] = 'Repository plug-ins';
$string['pluginerror'] = 'Errors in repository plugin.';
$string['popup'] = 'Click "Login" button to login';
@ -245,5 +244,7 @@ $string['xhtmlerror'] = 'You are probably using an XHTML strict header. Certain
$string['ziped'] = 'Compress folder successfully';
// Deprecated since Moodle 2.8.
$string['hidden'] = 'Hidden';
// Deprecated since Moodle 2.9.
$string['personalrepositories'] = 'Available repository instances';

View File

@ -85,7 +85,7 @@ if ($context->contextlevel == CONTEXT_COURSE) {
} else if ($context->contextlevel == CONTEXT_USER) {
require_login();
$pagename = get_string("personalrepositories",'repository');
$pagename = get_string('manageinstances', 'repository');
//is the user looking at its own repository instances
if ($USER->id != $context->instanceid){
print_error('notyourinstances', 'repository');
@ -135,20 +135,16 @@ if (!empty($instance)) {
}
}
/// Create navigation links
// Create navigation links.
if (!empty($course)) {
$PAGE->navbar->add($pagename);
$fullname = $course->fullname;
$pageheading = $course->fullname;
} else {
$fullname = fullname($user);
$strrepos = get_string('repositories', 'repository');
$PAGE->navbar->add($fullname, new moodle_url('/user/view.php', array('id'=>$user->id)));
$PAGE->navbar->add($strrepos);
$pageheading = $pagename;
}
// Display page header.
$PAGE->set_title($pagename);
$PAGE->set_heading($fullname);
$PAGE->set_heading($pageheading);
$return = true;
if (!empty($edit) || !empty($new)) {