]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Tag markup and styling for tag_self, tag_user, form#tag_user
authorcsarven <csarven@controlyourself.ca>
Fri, 21 Nov 2008 02:38:27 +0000 (21:38 -0500)
committercsarven <csarven@controlyourself.ca>
Fri, 21 Nov 2008 02:38:27 +0000 (21:38 -0500)
darcs-hash:20081121023827-eefa4-ed91f63cac35c078dc385546a69209cbef2a0d5e.gz

actions/showstream.php
actions/tagother.php
lib/profilelist.php
theme/default/display.css
theme/default/icon_tag-01.gif [new file with mode: 0644]

index 419c4421ad1d1419a855d19b9a5cd5038b0b1fed..b9ab699d3e53e3ce21fbbacf42127b573e27d7a9 100644 (file)
@@ -355,12 +355,17 @@ class ShowstreamAction extends StreamAction {
                common_element('dt', 'tags', _('Tags'));
                common_element_start('dd', 'tags');
                $tags = Profile_tag::getTags($profile->id, $profile->id);
+
+               common_element_start('ul', 'tags xoxo');
                foreach ($tags as $tag) {
-                       common_element('a', array('rel' => 'tag',
+                       common_element_start('li');
+                       common_element('a', array('rel' => 'bookmark tag',
                                                                          'href' => common_local_url('peopletag',
                                                                                                                                 array('tag' => $tag))),
                                                   $tag);
+                       common_element_end('li');
                }
+               common_element_end('ul');
            common_element_end('dd');
        
                common_element_end('dl');
index ed9d7c80d1660ef8caec7e93f0a41457ff7fe807..f957241526f47712aae49cb2f3be1196fe561a87 100644 (file)
@@ -88,7 +88,7 @@ class TagotherAction extends Action {
                }
                
                common_element_start('form', array('method' => 'post',
-                                                                                  'id' => 'tagother',
+                                                                                  'id' => 'tag_user',
                                                                                   'name' => 'tagother',
                                                                                   'action' => $this->self_url()));
                common_hidden('token', common_session_token());
index ae0acd9ced196f65c41feac4dbc0c61c4766db75..de9c6395a41c1b72502a397bfa692c125042c037 100644 (file)
@@ -26,9 +26,8 @@ class ProfileList {
 
        var $profile = NULL;
        
-       function __construct($profile, $owner=NULL) {
+       function __construct($profile) {
                $this->profile = $profile;
-               $this->owner = $owner;
        }
        
        function show_list() {
@@ -58,7 +57,6 @@ class ProfileList {
                                                                                 'id' => 'profile-' . $this->profile->id));
                
                $user = common_current_user();
-               
                if ($user && $user->id != $this->profile->id) {
                        # XXX: special-case for user looking at own
                        # subscriptions page
@@ -111,51 +109,68 @@ class ProfileList {
                }
                
                $tags = Profile_tag::getTags($this->profile->id, $this->profile->id);
-               
+
+
                if ($tags) {
-                       common_element_start('p', 'tags');
+                       common_element_start('div', 'tags_self');
+                       common_element_start('dl');
+                       common_element('dt', null, _("User's tags:"));
+                       common_element_start('dd');
+                       common_element_start('ul', 'tags xoxo');
                        foreach ($tags as $tag) {
-                               common_element('a', array('rel' => 'tag',
+                               common_element_start('li');
+                               common_element('a', array('rel' => 'bookmark tag',
                                                                                  'href' => common_local_url('peopletag',
                                                                                                                                         array('tag' => $tag))),
                                                           $tag);
+                               common_element_end('li');
                        }
-                       common_element_end('p');
+                       common_element_end('ul');
+                       common_element_end('dd');
+                       common_element_end('dl');
+                       common_element_end('div');
                }
 
-               if ($this->owner) {
+               if ($user) {
                        $action = NULL;
                        
-                       if ($this->owner->isSubscribed($this->profile)) {
+                       if ($user->isSubscribed($this->profile)) {
                                $action = 'subscriptions';
                        } else if (Subscription::pkeyGet(array('subscriber' => $this->profile->id,
-                                                                                                  'subscribed' => $this->owner->id))) {
+                                                                                                  'subscribed' => $user->id))) {
                                $action = 'subscribers';
                        }
                        
                        
                        if ($action) {
-                               $tags = Profile_tag::getTags($this->owner->id, $this->profile->id);
+                               $tags = Profile_tag::getTags($user->id, $this->profile->id);
                                
                                if ($tags) {
-                                       common_element_start('p', 'subtags');
-                                       
+                                       common_element_start('div', 'tags_user');
+                                       common_element_start('dl');
+                                       common_element('dt', null, _("Your tags:"));
+                                       common_element_start('dd');
+                                       common_element_start('ul', 'tags xoxo');
                                        foreach ($tags as $tag) {
-                                               common_element('a', array('href' => common_local_url($action,
-                                                                                                                                                        array('nickname' => $this->owner->nickname,
+                                               common_element_start('li');
+                                               common_element('a', array('rel' => "bookmark tag",
+                                                                                                 'href' => common_local_url($action,
+                                                                                                                                                        array('nickname' => $user->nickname,
                                                                                                                                                                   'tag' => $tag))),
                                                                           $tag);
-                                       }
-                                       
-                                       common_element_end('p');
+                                               common_element_end('li');
+                                       }                                       
+                                       common_element_end('ul');
+                                       common_element_end('dd');
+                                       common_element_end('dl');
+                                       common_element_end('div');
                                }
 
-                               if ($this->owner->id == $user->id) {
-                                       common_element('a', array('href' => common_local_url('tagother',
-                                                                                                                                                array('id' => $this->profile->id)),
-                                                                                         'class' => 'tagother'),
-                                                                  _('Tag'));
-                               }
+                               common_element_start('p', 'tag_user');                          
+                               common_element('a', array('href' => common_local_url('tagother',
+                                                                                                                                        array('id' => $this->profile->id))),
+                                                          _('Tag user'));
+                               common_element_end('p');
                        }
                }
                
index eb2c26235586bee094385ed5b7c346924fab39d8..8b22d2b09afb4b31e2382800eda966b6edf91ad8 100644 (file)
@@ -368,7 +368,7 @@ input#submit_yes:hover, input#submit_no:hover {
        }
 .avatar.stream {
        float: left;
-       margin: 0 10px 0 0;
+       margin: 0 10px 0.5em 0;
        }
 p.time {
        display: block;
@@ -857,6 +857,77 @@ font-size: 60%;
 }
 
 
+.tags_self,
+.tags_user {
+margin-left:4.5em;
+}
+.tags_self,
+.tags_user {
+/*float:right;*/
+}
+.tags_self dl,
+.tags_user dl {
+margin-left:0;
+}
+
+.tags_self dt,
+.tags_user dt {
+/*display:none;*/
+display:inline;
+}
+
+.tags_self dd,
+.tags_user dd {
+margin-left:0;
+display:inline;
+}
+
+
+ul.tags {
+padding-left:0;
+margin-left:0;
+list-style-type:none;
+display:inline;
+}
+ul.tags li {
+display:inline;
+margin-right:0.75em;
+}
+ul.tags li a {
+padding-left:17px;
+background:url(icon_tag-01.gif) no-repeat;
+line-height:1.5;
+}
+
+.tag_user {
+
+text-align:right;
+margin-top:0;
+margin-bottom:0;
+}
+
+form#tag_user {
+margin-left:8.75em;
+clear:both;
+}
+form#tag_user p {
+margin:0;
+}
+
+form#tag_user label {
+display:inline;
+margin-right:1em;
+}
+form#tag_user .submit {
+margin-left:4em;
+}
+
+form#tag_user .input_instructions {
+margin-left:4.5em;
+}
+
+
+
 /* ----- Mailbox ----- */
 #messages {
        clear: both;
diff --git a/theme/default/icon_tag-01.gif b/theme/default/icon_tag-01.gif
new file mode 100644 (file)
index 0000000..92e5742
Binary files /dev/null and b/theme/default/icon_tag-01.gif differ