MDL-20447 - bulk upload: add heading to the page and fix navbar content.

This commit is contained in:
Rossiani Wijaya 2010-05-28 06:38:17 +00:00
parent cde82a41b2
commit 2e4fd16675
9 changed files with 19 additions and 3 deletions

View file

@ -109,7 +109,9 @@ if ($confirm and confirm_sesskey()) { // the operation was confirmed.
redirect("view.php?id=$cm->id&mode=$prevmode&hook=$hook"); redirect("view.php?id=$cm->id&mode=$prevmode&hook=$hook");
} else { // the operation has not been confirmed yet so ask the user to do so } else { // the operation has not been confirmed yet so ask the user to do so
$PAGE->navbar->add(get_string('delete'));
$PAGE->set_title(format_string($glossary->name)); $PAGE->set_title(format_string($glossary->name));
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header(); echo $OUTPUT->header();
$areyousure = "<b>".format_string($entry->concept)."</b><p>$strareyousuredelete</p>"; $areyousure = "<b>".format_string($entry->concept)."</b><p>$strareyousuredelete</p>";
$linkyes = 'deleteentry.php'; $linkyes = 'deleteentry.php';

View file

@ -170,10 +170,12 @@ if ($mform->is_cancelled()){
redirect("view.php?id=$cm->id&amp;mode=entry&amp;hook=$entry->id"); redirect("view.php?id=$cm->id&amp;mode=entry&amp;hook=$entry->id");
} }
$stredit = empty($entry->id) ? get_string('addentry', 'glossary') : get_string('edit'); if (!empty($id)) {
$PAGE->navbar->add(get_string('edit'));
}
$PAGE->navbar->add($stredit);
$PAGE->set_title(format_string($glossary->name)); $PAGE->set_title(format_string($glossary->name));
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header(); echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($glossary->name)); echo $OUTPUT->heading(format_string($glossary->name));

View file

@ -70,9 +70,13 @@ $strglossaries = get_string("modulenameplural", "glossary");
$strglossary = get_string("modulename", "glossary"); $strglossary = get_string("modulename", "glossary");
$PAGE->navbar->add($strglossaries, new moodle_url('/mod/glossary/index.php', array('id'=>$course->id))); $PAGE->navbar->add($strglossaries, new moodle_url('/mod/glossary/index.php', array('id'=>$course->id)));
$PAGE->navbar->add(format_string($glossary->name), new moodle_url('/mod/glossary/view.php', array('id'=>$cm->id,'tab'=>'GLOSSARY_CATEGORY_VIEW')));
$PAGE->navbar->add(get_string("categories","glossary")); $PAGE->navbar->add(get_string("categories","glossary"));
if (!empty($action)) {
$navaction = get_string($action). " " . moodle_strtolower(get_string("category","glossary"));
$PAGE->navbar->add($navaction);
}
$PAGE->set_title(format_string($glossary->name)); $PAGE->set_title(format_string($glossary->name));
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header(); echo $OUTPUT->header();
if ( $hook >0 ) { if ( $hook >0 ) {

View file

@ -52,6 +52,7 @@ $strexportentries = get_string('exportentriestoxml', 'glossary');
$PAGE->set_url('/mod/glossary/export.php', array('id'=>$cm->id)); $PAGE->set_url('/mod/glossary/export.php', array('id'=>$cm->id));
$PAGE->navbar->add($strexportentries); $PAGE->navbar->add($strexportentries);
$PAGE->set_title(format_string($glossary->name)); $PAGE->set_title(format_string($glossary->name));
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header(); echo $OUTPUT->header();
echo $OUTPUT->heading($strexportentries); echo $OUTPUT->heading($strexportentries);

View file

@ -71,6 +71,7 @@ $entryexported = get_string('entryexported','glossary');
if (!$mainglossary->allowduplicatedentries) { if (!$mainglossary->allowduplicatedentries) {
if ($DB->get_record('glossary_entries', array('glossaryid'=>$mainglossary->id, 'lower(concept)'=>moodle_strtolower($entry->concept)))) { if ($DB->get_record('glossary_entries', array('glossaryid'=>$mainglossary->id, 'lower(concept)'=>moodle_strtolower($entry->concept)))) {
$PAGE->set_title(format_string($glossary->name)); $PAGE->set_title(format_string($glossary->name));
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header(); echo $OUTPUT->header();
echo $OUTPUT->notification(get_string('errconceptalreadyexists', 'glossary')); echo $OUTPUT->notification(get_string('errconceptalreadyexists', 'glossary'));
echo $OUTPUT->continue_button($returnurl); echo $OUTPUT->continue_button($returnurl);
@ -82,6 +83,7 @@ if (!$mainglossary->allowduplicatedentries) {
if (!data_submitted() or !$confirm or !confirm_sesskey()) { if (!data_submitted() or !$confirm or !confirm_sesskey()) {
$PAGE->set_title(format_string($glossary->name)); $PAGE->set_title(format_string($glossary->name));
$PAGE->set_heading(format_string($course->fullname));
echo $OUTPUT->header(); echo $OUTPUT->header();
echo '<div class="boxaligncenter">'; echo '<div class="boxaligncenter">';
$areyousure = '<h2>'.format_string($entry->concept).'</h2><p align="center">'.get_string('areyousureexport','glossary').'<br /><b>'.format_string($mainglossary->name).'</b>?'; $areyousure = '<h2>'.format_string($entry->concept).'</h2><p align="center">'.get_string('areyousureexport','glossary').'<br /><b>'.format_string($mainglossary->name).'</b>?';

View file

@ -68,6 +68,7 @@ $strimportentries = get_string('importentriesfromxml', 'glossary');
$PAGE->set_url('/mod/glossary/import.php', array('id'=>$cm->id, 'mode'=>$mode, 'hook'=>$hook)); $PAGE->set_url('/mod/glossary/import.php', array('id'=>$cm->id, 'mode'=>$mode, 'hook'=>$hook));
$PAGE->navbar->add($strimportentries); $PAGE->navbar->add($strimportentries);
$PAGE->set_title(format_string($glossary->name)); $PAGE->set_title(format_string($glossary->name));
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header(); echo $OUTPUT->header();
echo $OUTPUT->heading($strimportentries); echo $OUTPUT->heading($strimportentries);

View file

@ -33,6 +33,7 @@ $strrss = get_string("rss");
/// Print the header /// Print the header
$PAGE->navbar->add($strglossarys, "index.php?id=$course->id"); $PAGE->navbar->add($strglossarys, "index.php?id=$course->id");
$PAGE->set_title($strglossarys); $PAGE->set_title($strglossarys);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header(); echo $OUTPUT->header();
/// Get all the appropriate data /// Get all the appropriate data

View file

@ -54,6 +54,8 @@ if ( !$entriesbypage = $glossary->entbypage ) {
require_course_login($course, true, $cm); require_course_login($course, true, $cm);
$context = get_context_instance(CONTEXT_MODULE, $cm->id); $context = get_context_instance(CONTEXT_MODULE, $cm->id);
$PAGE->set_title(get_string("modulenameplural", "glossary"));
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header(); echo $OUTPUT->header();
/// Loading the textlib singleton instance. We are going to need it. /// Loading the textlib singleton instance. We are going to need it.

View file

@ -231,6 +231,7 @@ $strwaitingapproval = get_string('waitingapproval', 'glossary');
/// If we are in approval mode, prit special header /// If we are in approval mode, prit special header
$PAGE->set_title(format_string($glossary->name)); $PAGE->set_title(format_string($glossary->name));
$PAGE->set_heading($course->fullname);
$url = new moodle_url('/mod/glossary/view.php', array('id'=>$cm->id)); $url = new moodle_url('/mod/glossary/view.php', array('id'=>$cm->id));
if (isset($mode)) { if (isset($mode)) {
$url->param('mode', $mode); $url->param('mode', $mode);