]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
changed tag display to <ul>
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 6 Jan 2011 12:52:08 +0000 (12:52 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 6 Jan 2011 12:52:08 +0000 (12:52 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7851 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/blog/views/default/object/blog.php
mod/file/views/default/object/file.php
views/default/css/elements/chrome.php
views/default/output/tags.php

index 23ccb57be8f9381bae5419f9e43c65d59857852e..fd2c4fee86315d9f70ba5afb102d4040660a3886 100644 (file)
@@ -23,11 +23,7 @@ $owner_link = elgg_view('output/url', array(
        'text' => $owner->name,
 ));
 $author_text = elgg_echo('blog:author_by_line', array($owner_link));
-if ($blog->tags) {
-       $tags = "<p class=\"elgg-tags\">" . elgg_view('output/tags', array('tags' => $blog->tags)) . "</p>";
-} else {
-       $tags = "";
-}
+$tags = elgg_view('output/tags', array('tags' => $blog->tags));
 $date = elgg_view_friendly_time($blog->publish_date);
 
 // The "on" status changes for comments, so best to check for !Off
index 1d3aa71408614b501ba82445c854940545a9b8fb..89367feb30e6244b782de363a12c829156fa5298 100644 (file)
@@ -34,11 +34,7 @@ $file_icon = elgg_view('file/icon', array(
        'size' => 'small'
 ));
 
-if ($file->tags) {
-       $tags = "<p class=\"elgg-tags\">" . elgg_view('output/tags', array('tags' => $file->tags)) . "</p>";
-} else {
-       $tags = "";
-}
+$tags = elgg_view('output/tags', array('tags' => $file->tags));
 $date = elgg_view_friendly_time($file->time_created);
 
 $comments_count = elgg_count_comments($file);
index eb131c7bde67d7e9d7c0390dcf8676f0b61dce7a..974dcc2e64646c0ff13b5904aaec95130d0d8b69 100644 (file)
@@ -113,6 +113,16 @@ h2 {
        padding:1px 0 0 14px;
        font-size: 85%;
 }
+.elgg-tags li {
+       display: inline;
+       margin-right: 5px;
+}
+.elgg-tags li:after {
+       content: ",";
+}
+.elgg-tags li:last-child:after {
+       content: "";
+}
 .elgg-tagcloud {
        text-align:justify;
 }
index 1dbf14a7d93e6d66d87b7dc9604c6cfa7fb0618f..f4804e76e91ac964798e19019ef14c999e6f49e1 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /**
  * Elgg tags
- * Displays a list of tags, separated by commas
  *
  * Tags can be a single string (for one tag) or an array of strings
  *
@@ -9,7 +8,8 @@
  * @subpackage Core
  *
  * @uses $vars['tags'] The tags to display
- * @uses $vars['tagtype'] The tagtype, optionally
+ * @uses $vars['type'] The entity type, optional
+ * @uses $vars['subtype'] The entity subtype, optional
  */
 
 if (!empty($vars['subtype'])) {
@@ -28,23 +28,23 @@ if (empty($vars['tags']) && !empty($vars['value'])) {
 }
 
 if (!empty($vars['tags'])) {
-       $tagstr = "";
        if (!is_array($vars['tags'])) {
                $vars['tags'] = array($vars['tags']);
        }
 
+       echo '<ul class="elgg-tags">';
        foreach($vars['tags'] as $tag) {
-               if (!empty($tagstr)) {
-                       $tagstr .= ", ";
-               }
                if (!empty($vars['type'])) {
                        $type = "&type={$vars['type']}";
                } else {
                        $type = "";
                }
+               $url = elgg_get_site_url() . 'pg/search/?q=' . urlencode($tag) . "&search_type=tags{$type}{$subtype}{$object}";
                if (is_string($tag)) {
-                       $tagstr .= "<a rel=\"tag\" href=\"".elgg_get_site_url()."pg/search/?q=".urlencode($tag) . "&search_type=tags{$type}{$subtype}{$object}\">" . htmlspecialchars($tag, ENT_QUOTES, 'UTF-8') . "</a>";
+                       echo '<li>';
+                       echo "<a rel=\"tag\" href=\"$url\">" . htmlspecialchars($tag, ENT_QUOTES, 'UTF-8') . "</a>";
+                       echo '</li>';
                }
        }
-       echo $tagstr;
+       echo '</ul>';
 }