]> git.mjollnir.org Git - moodle.git/commitdiff
Make blog links pretty
authormoodler <moodler>
Thu, 30 Aug 2007 09:49:50 +0000 (09:49 +0000)
committermoodler <moodler>
Thu, 30 Aug 2007 09:49:50 +0000 (09:49 +0000)
tag/index.php
theme/standard/styles_layout.css

index 041a9aac30f263dfcb508dc3116c14b47b1cc4e2..4d1501bb89091d0975db5b491f59aeecfebafa8d 100644 (file)
@@ -84,18 +84,35 @@ if ($usercount > 0) {
 }
 
 // print last 10 blogs
-print_string('lasttenblogs', 'tag');
 
-print_box_start();
+print_box_start('generalbox', 'tag-blogs');
+
+print_heading(get_string('lasttenblogs', 'tag'), '', 3);
 
 // I was not able to use get_items_tagged_with() because it automatically 
 // tries to join on 'blog' table, since the itemtype is 'blog'. However blogs
 // uses the post table so this would not really work.
 if ($blogs = fetch_entries('', 10, 0, 'site', '', $tag->id)) {
 
+    echo '<ul id="tagblogentries">';
     foreach ($blogs as $blog) {
-        blog_print_entry($blog);
+        if ($blog->publishstate == 'draft') {
+            $class = 'class="dimmed"';
+        } else {
+            $class = '';
+        }
+        echo '<li '.$class.'>';
+        echo '<a '.$class.' href="'.$CFG->wwwroot.'/blog/index.php?postid='.$blog->id.'">';
+        echo format_string($blog->subject);
+        echo '</a>';
+        echo ' - '; 
+        echo '<a '.$class.' href="'.$CFG->wwwroot.'/user/view.php?id='.$blog->userid.'">';
+        echo fullname($blog);
+        echo '</a>';
+        echo ', '. userdate($blog->lastmodified);
+        echo '</li>';
     }
+    echo '</ul>';
 
 }
 print_box_end();
index 0d713d7a1af707c8df81490f6ed4818565c5af06..2691e0d94ec873647377ee4e1aa829ee8618b705 100644 (file)
@@ -2800,7 +2800,8 @@ h2.tag-heading {
 
 }
 
-div#tag-description {
+div#tag-description,
+div#tag-blogs {
  width:95%;
  padding: 5px 5px 5px 5px;
  margin-left:auto;