Permalink
Browse files

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

  • Loading branch information...
rwijaya committed May 28, 2010
1 parent bf626bb commit dfc511888f0c105597e54629f1c539fb63a97896
@@ -70,8 +70,6 @@
$strfeedbacks = get_string("modulenameplural", "feedback");
$strfeedback = get_string("modulename", "feedback");
-$PAGE->navbar->add($strfeedbacks, new moodle_url('/mod/feedback/index.php', array('id'=>$course->id)));
-$PAGE->navbar->add(format_string($feedback->name));
$PAGE->set_heading(format_string($course->fullname));
$PAGE->set_title(format_string($feedback->name));
echo $OUTPUT->header();
@@ -75,9 +75,8 @@
/// Print the page header
$strfeedbacks = get_string("modulenameplural", "feedback");
$strfeedback = get_string("modulename", "feedback");
-
- $PAGE->navbar->add($strfeedbacks, new moodle_url('/mod/feedback/index.php', array('id'=>$course->id)));
- $PAGE->navbar->add(format_string($feedback->name));
+
+ $PAGE->navbar->add(get_string('delete_entry', 'feedback'));
$PAGE->set_heading(format_string($course->fullname));
$PAGE->set_title(format_string($feedback->name));
echo $OUTPUT->header();
@@ -56,9 +56,8 @@
/// Print the page header
$strfeedbacks = get_string("modulenameplural", "feedback");
$strfeedback = get_string("modulename", "feedback");
-
- $PAGE->navbar->add($strfeedbacks, new moodle_url('/mod/feedback/index.php', array('id'=>$course->id)));
- $PAGE->navbar->add(format_string($feedback->name));
+
+ $PAGE->navbar->add(get_string('delete_item', 'feedback'));
$PAGE->set_heading(format_string($course->fullname));
$PAGE->set_title(format_string($feedback->name));
echo $OUTPUT->header();
@@ -85,8 +85,6 @@
$strfeedbacks = get_string("modulenameplural", "feedback");
$strfeedback = get_string("modulename", "feedback");
-$PAGE->navbar->add($strfeedbacks, new moodle_url('/mod/feedback/index.php', array('id'=>$course->id)));
-$PAGE->navbar->add(format_string($feedback->name));
$PAGE->set_heading(format_string($course->fullname));
$PAGE->set_title(format_string($feedback->name));
echo $OUTPUT->header();
View
@@ -146,11 +146,6 @@
$strfeedbacks = get_string("modulenameplural", "feedback");
$strfeedback = get_string("modulename", "feedback");
-if ($do_show == 'edit') {
- $PAGE->navbar->add(get_string('edit_items', 'feedback'));
-} else {
- $PAGE->navbar->add(get_string($do_show, 'feedback'));
-}
$PAGE->set_url('/mod/feedback/edit.php', array('id'=>$cm->id, 'do_show'=>$do_show));
$PAGE->set_heading(format_string($course->fullname));
$PAGE->set_title(format_string($feedback->name));
@@ -105,8 +105,11 @@
$strfeedbacks = get_string("modulenameplural", "feedback");
$strfeedback = get_string("modulename", "feedback");
-$PAGE->navbar->add($strfeedbacks, new moodle_url('/mod/feedback/index.php', array('id'=>$course->id)));
-$PAGE->navbar->add(format_string($feedback->name));
+if ($item->id) {
+ $PAGE->navbar->add(get_string('edit_item', 'feedback'));
+} else {
+ $PAGE->navbar->add(get_string('add_item', 'feedback'));
+}
$PAGE->set_heading(format_string($course->fullname));
$PAGE->set_title(format_string($feedback->name));
echo $OUTPUT->header();
View
@@ -92,9 +92,7 @@
/// Print the page header
$strfeedbacks = get_string("modulenameplural", "feedback");
$strfeedback = get_string("modulename", "feedback");
-
- $PAGE->navbar->add($strfeedbacks, new moodle_url('/mod/feedback/index.php', array('id'=>$course->id)));
- $PAGE->navbar->add(format_string($feedback->name));
+
$PAGE->set_heading(format_string($course->fullname));
$PAGE->set_title(format_string($feedback->name));
echo $OUTPUT->header();
@@ -72,8 +72,6 @@
$strfeedbacks = get_string("modulenameplural", "feedback");
$strfeedback = get_string("modulename", "feedback");
-$PAGE->navbar->add($strfeedbacks, new moodle_url('/mod/feedback/index.php', array('id'=>$course->id)));
-$PAGE->navbar->add(format_string($feedback->name));
$PAGE->set_heading(format_string($course->fullname));
$PAGE->set_title(format_string($feedback->name));
echo $OUTPUT->header();
View
@@ -44,6 +44,7 @@
$PAGE->navbar->add(format_string($feedback->name));
$PAGE->set_title(format_string($feedback->name));
+$PAGE->set_heading(format_string($course->fullname));
echo $OUTPUT->header();
/// Print the main part of the page
@@ -72,7 +72,6 @@
$strfeedbacks = get_string("modulenameplural", "feedback");
$strfeedback = get_string("modulename", "feedback");
-$PAGE->navbar->add(get_string('show_entries','feedback'));
$PAGE->set_heading(format_string($course->fullname));
$PAGE->set_title(format_string($feedback->name));
echo $OUTPUT->header();
@@ -53,8 +53,6 @@
$strfeedbacks = get_string("modulenameplural", "feedback");
$strfeedback = get_string("modulename", "feedback");
-$PAGE->navbar->add($strfeedbacks, new moodle_url('/mod/feedback/index.php', array('id'=>$course->id)));
-$PAGE->navbar->add(format_string($feedback->name));
$PAGE->set_heading(format_string($course->fullname));
$PAGE->set_title(format_string($feedback->name));
echo $OUTPUT->header();

0 comments on commit dfc5118

Please sign in to comment.