Browse Source

If user rank is tab, make his title link to it.

Rafał Pitoń 10 years ago
parent
commit
25787c1139

+ 6 - 0
misago/static/misago/css/misago/profile.less

@@ -12,6 +12,12 @@
     padding-top: @line-height-computed;
     border-bottom-width: 1px;
 
+    h1 {
+    	small, small a {
+    		color: @text-muted;
+    	}
+    }
+
     .page-actions {
       .btn {
         .btn-sm();

+ 1 - 1
misago/static/misago/css/ranks.less

@@ -8,7 +8,7 @@
 //==
 .user-profile {
   &.profile-team {
-    .user-title {
+    .user-title, .user-title>a {
       color: @brand-accent;
     }
   }

+ 7 - 1
misago/templates/misago/profile/header.html

@@ -2,7 +2,13 @@
 <h1 class="user-name">
   {{ profile.username }}
   {% if profile.full_title %}
-  <small class="user-title">{{ profile.full_title }}</small>
+  <small class="user-title">
+    {% if profile.rank.is_tab %}
+    <a href="{% url 'misago:users_rank' rank_slug=profile.rank.slug %}">{{ profile.full_title }}</a>
+    {% else %}
+    {{ profile.full_title }}
+    {% endif %}
+  </small>
   {% endif %}
 </h1>