[ckan-changes] [okfn/ckan] 914aba: [#2304] Add Followers tab to user pages and hide F...

GitHub noreply at github.com
Tue Apr 24 11:08:44 UTC 2012


  Branch: refs/heads/feature-2304-follow
  Home:   https://github.com/okfn/ckan
  Commit: 914aba21b02e5d369248e008ded5fbe021357941
      https://github.com/okfn/ckan/commit/914aba21b02e5d369248e008ded5fbe021357941
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-04-24 (Tue, 24 Apr 2012)

  Changed paths:
    M ckan/templates/user/layout.html

  Log Message:
  -----------
  [#2304] Add Followers tab to user pages and hide Follow button

Only show the Follow button when viewing the page of another user and
not on your own page or the login or register pages


diff --git a/ckan/templates/user/layout.html b/ckan/templates/user/layout.html
index 4e15410..c4a71e9 100644
--- a/ckan/templates/user/layout.html
+++ b/ckan/templates/user/layout.html
@@ -15,17 +15,14 @@
       <py:otherwise>
         <py:if test="c.id">
           <li class="${'active' if c.action=='read' else ''}"><a href="${h.url_for(controller='user', action='me')}">View Profile</a></li>
+          <li class="${'active' if c.action=='followers' else ''}">${h.subnav_link(h.icon('authorization_group') + _('Followers'), controller='user', action='followers', id=c.user_dict.name)}</li>
+          <li><button userid="${c.user_dict.id}" class="btn user-follow">Follow</button>
+        </li>
         </py:if>
         <py:if test="not c.id">
           <li class="${'active' if c.action=='login' else ''}"><a href="${h.url_for(controller='user', action='login')}">Login</a></li>
           <li class="${'active' if c.action=='register' else ''}"><a href="${h.url_for(controller='user', action='register')}">Register Account</a></li>
         </py:if>
-
-        <li>
-          <button userid="${c.user_dict.id}" class="btn user-follow">
-            Follow
-          </button>
-        </li>
       </py:otherwise>
     </ul>
   </py:match>


================================================================



More information about the ckan-changes mailing list