Skip to content
Browse files

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

  • Loading branch information...
1 parent dfc5118 commit b4c07395477e33ac622a421d4db7a9f5a08605b5 Rossiani Wijaya committed May 28, 2010
Showing with 20 additions and 10 deletions.
  1. +1 −2 mod/forum/discuss.php
  2. +12 −5 mod/forum/post.php
  3. +6 −3 mod/forum/search.php
  4. +1 −0 mod/forum/subscribers.php
View
3 mod/forum/discuss.php
@@ -184,8 +184,7 @@
}
$searchform = forum_search_form($course);
-
- $PAGE->navbar->add(format_string($discussion->name), new moodle_url('/mod/forum/discuss.php', array('d'=>$discussion->id)));
+
if ($parent != $discussion->firstpost) {
$PAGE->navbar->add(format_string($post->subject));
}
View
17 mod/forum/post.php
@@ -270,7 +270,7 @@
$post = trusttext_pre_edit($post, 'message', $modcontext);
unset($SESSION->fromdiscussion);
-
+
}else if (!empty($delete)) { // User is deleting a post
@@ -297,8 +297,8 @@
|| has_capability('mod/forum:deleteanypost', $modcontext)) ) {
print_error('cannotdeletepost', 'forum');
}
-
-
+
+
$replycount = forum_count_replies($post);
if (!empty($confirm) && confirm_sesskey()) { // User has confirmed the delete
@@ -348,7 +348,9 @@
} else { // User just asked to delete something
forum_set_return();
-
+ $PAGE->navbar->add(get_string('delete', 'forum'));
+ $PAGE->set_title($course->shortname);
+ $PAGE->set_heading($course->fullname);
if ($replycount) {
if (!has_capability('mod/forum:deleteanypost', $modcontext)) {
print_error("couldnotdeletereplies", "forum",
@@ -446,6 +448,7 @@
$PAGE->navbar->add(format_string($post->subject, true), new moodle_url('/mod/forum/discuss.php', array('d'=>$discussion->id)));
$PAGE->navbar->add(get_string("prune", "forum"));
$PAGE->set_title(format_string($discussion->name).": ".format_string($post->subject));
+ $PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('pruneheading', 'forum'));
echo '<center>';
@@ -792,7 +795,11 @@
}
if ($post->parent) {
- $PAGE->navbar->add(get_string('editing', 'forum'));
+ $PAGE->navbar->add(get_string('reply', 'forum'));
+}
+
+if ($edit) {
+ $PAGE->navbar->add(get_string('edit', 'forum'));
}
$PAGE->set_title("$course->shortname: $strdiscussionname ".format_string($toppost->subject));
View
9 mod/forum/search.php
@@ -121,10 +121,11 @@
if (!$search || $showform) {
$PAGE->navbar->add($strforums, new moodle_url('/mod/forum/index.php', array('id'=>$course->id)));
- $PAGE->navbar->add($strsearch);
+ $PAGE->navbar->add(get_string('advancedsearch', 'forum'));
$PAGE->set_title($strsearch);
- $PAGE->set_focuscontrol('search.words');
+ $PAGE->set_heading($course->fullname);
+ $PAGE->set_focuscontrol('words');
echo $OUTPUT->header();
forum_print_big_search_form($course);
@@ -143,7 +144,8 @@
$PAGE->navbar->add(s($search, true));
if (!$posts = forum_search_posts($searchterms, $course->id, $page*$perpage, $perpage, $totalcount)) {
$PAGE->set_title($strsearchresults);
- $PAGE->set_focuscontrol('search.words');
+ $PAGE->set_heading($course->fullname);
+ $PAGE->set_focuscontrol('words');
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string("nopostscontaining", "forum", $search));
@@ -158,6 +160,7 @@
}
$PAGE->set_title($strsearchresults);
+$PAGE->set_heading($course->fullname);
$PAGE->set_button($searchform);
echo $OUTPUT->header();
echo '<div class="reportlink">';
View
1 mod/forum/subscribers.php
@@ -94,6 +94,7 @@
$strsubscribers = get_string("subscribers", "forum");
$PAGE->navbar->add($strsubscribers);
$PAGE->set_title($strsubscribers);
+$PAGE->set_heading($COURSE->fullname);
if (has_capability('mod/forum:managesubscriptions', $context)) {
$PAGE->set_button(forum_update_subscriptions_button($course->id, $id));
if ($edit != -1) {

0 comments on commit b4c0739

Please sign in to comment.
Something went wrong with that request. Please try again.