admin blog comment course MDL-22856 Minor cleanups and improvements to styles
authorSam Hemelryk <sam@moodle.com>
Thu, 19 Aug 2010 05:56:57 +0000 (05:56 +0000)
committerSam Hemelryk <sam@moodle.com>
Thu, 19 Aug 2010 05:56:57 +0000 (05:56 +0000)
admin/modules.php
admin/report/security/index.php
blog/lib.php
comment/locallib.php
course/editcategory.php

index d95c5ec..3ecb952 100644 (file)
     $table->define_headers(array($stractivitymodule, $stractivities, $strversion, "$strhide/$strshow", $strdelete, $strsettings));
     $table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/modules.php');
     $table->set_attribute('id', 'modules');
-    $table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
+    $table->set_attribute('class', 'generaltable');
     $table->setup();
 
     foreach ($modules as $module) {
index 84596a4..d4415eb 100644 (file)
@@ -78,7 +78,7 @@ if ($issue and ($result = $issue(true))) {
     $table->head  = array($strissue, $strstatus, $strdesc, $strconfig);
     $table->size  = array('30%', '10%', '50%', '10%' );
     $table->align = array('left', 'left', 'left', 'left');
-    $table->width = '90%';
+    $table->attributes = array('class'=>'scurityreporttable generaltable');
     $table->data  = array();
 
     // print detail of one issue only
@@ -105,7 +105,7 @@ if ($issue and ($result = $issue(true))) {
     $table->head  = array($strissue, $strstatus, $strdesc);
     $table->size  = array('30%', '10%', '60%' );
     $table->align = array('left', 'left', 'left');
-    $table->width = '90%';
+    $table->attributes = array('class'=>'scurityreporttable generaltable');
     $table->data  = array();
 
     foreach ($issues as $issue) {
index df07ae4..8d72f19 100755 (executable)
@@ -691,8 +691,6 @@ function blog_get_headers($courseid=null, $groupid=null, $userid=null, $tagid=nu
             $mycourseid = $site->id;
         }
 
-        $PAGE->navbar->add($strparticipants, "$CFG->wwwroot/user/index.php?id=$mycourseid");
-        $PAGE->navbar->add(fullname($user), "$CFG->wwwroot/user/view.php?id=$user->id");
         $PAGE->navbar->add($strblogentries, $blogurl);
 
         $blogurl->remove_params('userid');
@@ -712,9 +710,6 @@ function blog_get_headers($courseid=null, $groupid=null, $userid=null, $tagid=nu
     // Case 3: A user's blog entries
     if (!empty($userid) && empty($entryid) && ((empty($courseid) && empty($modid)) || !$CFG->useblogassociations)) {
         $blogurl->param('userid', $userid);
-        $PAGE->navbar->add($strparticipants, "$CFG->wwwroot/user/index.php?id=$site->id");
-        $PAGE->navbar->add(fullname($user), "$CFG->wwwroot/user/view.php?id=$user->id");
-        $PAGE->navbar->add($strblogentries, $blogurl);
         $PAGE->set_title("$site->shortname: " . fullname($user) . ": " . get_string('blog', 'blog'));
         $PAGE->set_heading("$site->shortname: " . fullname($user) . ": " . get_string('blog', 'blog'));
         $headers['heading'] = get_string('userblog', 'blog', fullname($user));
@@ -724,7 +719,6 @@ function blog_get_headers($courseid=null, $groupid=null, $userid=null, $tagid=nu
 
     // Case 4: No blog associations, no userid
     if (!$CFG->useblogassociations && empty($userid) && !in_array($action, array('edit', 'add'))) {
-        $PAGE->navbar->add($strblogentries, $blogurl);
         $PAGE->set_title("$site->shortname: " . get_string('blog', 'blog'));
         $PAGE->set_heading("$site->shortname: " . get_string('blog', 'blog'));
         $headers['heading'] = get_string('siteblog', 'blog', $site->shortname);
@@ -755,9 +749,7 @@ function blog_get_headers($courseid=null, $groupid=null, $userid=null, $tagid=nu
     if (!empty($userid) && !empty($courseid) && empty($modid) && empty($entryid)) {
         $blogurl->param('userid', $userid);
         $blogurl->param('courseid', $courseid);
-
-        $PAGE->navbar->add($strparticipants, "$CFG->wwwroot/user/index.php?id=$course->id");
-        $PAGE->navbar->add(fullname($user), "$CFG->wwwroot/user/view.php?id=$user->id");
+        
         $PAGE->navbar->add($strblogentries, $blogurl);
 
         $PAGE->set_title("$site->shortname: $course->shortname: " . fullname($user) . ': ' . get_string('blogentries', 'blog'));
@@ -863,16 +855,7 @@ function blog_get_headers($courseid=null, $groupid=null, $userid=null, $tagid=nu
 
     // Append edit mode info
     if (!empty($action) && $action == 'add') {
-        if (empty($modid) && empty($courseid)) {
-            if (empty($user)) {
-                $user = $USER;
-            }
-            $PAGE->navbar->add($strparticipants, "$CFG->wwwroot/user/index.php?id=$site->id");
-            $PAGE->navbar->add(fullname($user), "$CFG->wwwroot/user/view.php?id=$user->id");
-            $blogurl->param('userid', $user->id);
-            $PAGE->navbar->add($strblogentries, $blogurl);
-        }
-        $PAGE->navbar->add(get_string('addnewentry', 'blog'));
+
     } else if (!empty($action) && $action == 'edit') {
         $PAGE->navbar->add(get_string('editentry', 'blog'));
     }
index ecbceaa..5b8155d 100644 (file)
@@ -107,7 +107,7 @@ class comment_manager {
         $table = new html_table();
         $table->head = array (html_writer::checkbox('selectall', '', false, get_string('selectall'), array('id'=>'comment_select_all', 'class'=>'comment-report-selectall')), get_string('author', 'search'), get_string('content'), get_string('action'));
         $table->align = array ('left', 'left', 'left', 'left');
-        $table->width = "95%";
+        $table->attributes = array('class'=>'generaltable commentstable');
         $table->data = array();
         $linkbase = $CFG->wwwroot.'/comment/index.php?action=delete&sesskey='.sesskey();
         foreach ($comments as $c) {
index c708af3..5233d32 100644 (file)
@@ -23,6 +23,8 @@ if ($id) {
     require_capability('moodle/category:manage', $categorycontext);
     $strtitle = get_string('editcategorysettings');
     $editorcontext = $categorycontext;
+    $title = $strtitle;
+    $fullname = $category->name;
 } else {
     $parent = required_param('parent', PARAM_INT);
     $PAGE->set_url('/course/editcategory.php', array('parent' => $parent));
@@ -41,8 +43,12 @@ if ($id) {
     require_capability('moodle/category:manage', $context);
     $strtitle = get_string("addnewcategory");
     $editorcontext = null;
+    $title = "$SITE->shortname: ".get_string('addnewcategory');
+    $fullname = $SITE->fullname;
 }
 
+$PAGE->set_pagelayout('admin');
+
 $editoroptions = array('maxfiles' => EDITOR_UNLIMITED_FILES, 'maxbytes'=>$CFG->maxbytes, 'trusttext'=>true);
 $category = file_prepare_standard_editor($category, 'description', $editoroptions, $editorcontext, 'coursecat', 'description', 0);
 
@@ -91,30 +97,10 @@ if ($mform->is_cancelled()) {
     redirect('category.php?id='.$newcategory->id.'&categoryedit=on');
 }
 
-// Print the form
-$straddnewcategory = get_string('addnewcategory');
-$stradministration = get_string('administration');
-$strcategories = get_string('categories');
-$navlinks = array();
-
-if ($id) {
-    $PAGE->navbar->add($strtitle);
-    $title = $strtitle;
-    $fullname = $category->name;
-} else {
-    $PAGE->navbar->add($stradministration, new moodle_url('/admin/index.php'));
-    $PAGE->navbar->add($strcategories, new moodle_url('/course/index.php'));
-    $PAGE->navbar->add($straddnewcategory);
-    $title = "$SITE->shortname: $straddnewcategory";
-    $fullname = $SITE->fullname;
-}
-
 $PAGE->set_title($title);
 $PAGE->set_heading($fullname);
 echo $OUTPUT->header();
 echo $OUTPUT->heading($strtitle);
-
 $mform->display();
-
 echo $OUTPUT->footer();