diff options
Diffstat (limited to 'askbot/skins/default')
8 files changed, 81 insertions, 34 deletions
diff --git a/askbot/skins/default/media/style/style.css b/askbot/skins/default/media/style/style.css index 3d04ec7d..a4e7d581 100755 --- a/askbot/skins/default/media/style/style.css +++ b/askbot/skins/default/media/style/style.css @@ -771,11 +771,10 @@ a:hover.medal { height: 24px; line-height: 26px; margin-top: 3px; - padding: 0px 11px 0px 11px; } -.tabsA a.on, tabsA a.on:hover { - padding: 0px 6px 0px 11px; +.tabsA a.rev.on, tabsA a.rev.on:hover { + padding: 0px 2px 0px 7px; } .tabsA a, .tabsC a{ @@ -790,7 +789,7 @@ a:hover.medal { height: 20px; line-height: 22px; margin: 5px 0 0 4px; - padding: 0 11px 0 11px; + padding: 0 7px; text-decoration: none; } @@ -2162,5 +2161,17 @@ pre.prettyprint { padding: 3px; border: 0px solid #888; } } .follow-toggle { - color: #406A24; + border-radius: 3px; + -moz-border-radius: 3px; + background: #fff0e0; + color: #777; + font-weight: bolder; + border: 1px solid #aaa; + cursor: pointer; +} + +.follow-toggle.unfollow:hover { + background: #a40000; + color: #fff; + border: 1px solid #d40000; } diff --git a/askbot/skins/default/templates/macros.html b/askbot/skins/default/templates/macros.html index d1b2bc40..fb3e3898 100644 --- a/askbot/skins/default/templates/macros.html +++ b/askbot/skins/default/templates/macros.html @@ -102,6 +102,30 @@ {{ user_country_name_and_flag(user) }} {%- endmacro -%} +{%- macro user_list(users, profile_section = None) -%} +<div class="userList"> + <table class="list-table"> + <tr> + <td class="list-td"> + {% for user in users %} + <div class="user"> + <ul> + <li class="thumb">{{ gravatar(user, 32) }}</li> + <li><a href="{% url user_profile user.id, user.username|slugify %}{% if profile_section %}?sort={{profile_section}}{% endif %}">{{user.username}}</a>{{ user_country_flag(user) }}</li> + <li>{{ user_score_and_badge_summary(user) }}</li> + </ul> + </div> + {% if loop.index is divisibleby 7 %} + </td> + <td> + {% endif %} + {% endfor %} + </td> + </tr> + </table> +</div> +{%- endmacro -%} + {%- macro paginator(p, position='left') -%}{# p is paginator context dictionary #} {% spaceless %} {% if p.is_paginated %} @@ -538,12 +562,12 @@ poor design of the data or methods on data objects #} {% if sort == key_name + "-asc" %}{# "worst" first #} <a id="by_{{key_name}}" href="?sort={{key_name}}-desc" - class="on" + class="rev on" title="{{desc_tooltip}}"><span>{{label}} ▲</span></a> {% elif sort == key_name + "-desc" %}{# "best first" #} <a id="by_{{key_name}}" href="?sort={{key_name}}-asc" - class="on" + class="rev on" title="{{asc_tooltip}}"><span>{{label}} ▼</span></a> {% else %}{# default, when other button is active #} <a id="by_{{key_name}}" diff --git a/askbot/skins/default/templates/main_page/nothing_found.html b/askbot/skins/default/templates/main_page/nothing_found.html index bc58fc27..50f2f340 100644 --- a/askbot/skins/default/templates/main_page/nothing_found.html +++ b/askbot/skins/default/templates/main_page/nothing_found.html @@ -4,8 +4,8 @@ {% trans %}There are no unanswered questions here{% endtrans %} {% endif %} {% if scope == "favorite" %} - {% trans %}No favorite questions here. {% endtrans %} - {% trans %}Please start (bookmark) some questions when you visit them{% endtrans %} + {% trans %}No questions here. {% endtrans %} + {% trans %}Please star (bookmark) some questions or follow some users.{% endtrans %} {% endif %} </p> {% if query or search_tags or author_name %} diff --git a/askbot/skins/default/templates/main_page/tab_bar.html b/askbot/skins/default/templates/main_page/tab_bar.html index 12096a3b..e398be87 100644 --- a/askbot/skins/default/templates/main_page/tab_bar.html +++ b/askbot/skins/default/templates/main_page/tab_bar.html @@ -17,8 +17,8 @@ <a id="favorite" class="{% if scope == 'favorite' %}on{% else %}off{% endif %}" href="?scope=favorite" - title="{% trans %}see your favorite questions{% endtrans %}" - ><span>{% trans %}favorite{% endtrans %}</span></a> + title="{% trans %}see your followed questions{% endtrans %}" + ><span>{% trans %}followed{% endtrans %}</span></a> {% endif %} </div> <div id="sort_tabs" class="tabsA"> diff --git a/askbot/skins/default/templates/user_profile/user_info.html b/askbot/skins/default/templates/user_profile/user_info.html index 63c1b163..5aa5c094 100644 --- a/askbot/skins/default/templates/user_profile/user_info.html +++ b/askbot/skins/default/templates/user_profile/user_info.html @@ -23,7 +23,9 @@ </div> <div class="scoreNumber">{{view_user.reputation|intcomma}}</div> <p><b style="color:#777;">{% trans %}reputation{% endtrans %}</b></p> - {{ macros.follow_user_toggle(visitor = request.user, subject = view_user) }} + {% if user_follow_feature_on %} + {{ macros.follow_user_toggle(visitor = request.user, subject = view_user) }} + {% endif %} </td> <td width="360" style="padding-left:5px;vertical-align: top;"> <table class="user-details"> diff --git a/askbot/skins/default/templates/user_profile/user_network.html b/askbot/skins/default/templates/user_profile/user_network.html new file mode 100644 index 00000000..cc741bb1 --- /dev/null +++ b/askbot/skins/default/templates/user_profile/user_network.html @@ -0,0 +1,25 @@ +{% extends "user_profile/user.html" %} +{% import "macros.html" as macros %} +<!-- user_network.html --> +{% block profileseciton %} + {% trans %}network{% endtrans %} +{% endblock %} +{% block usercontent %} + {% if followed_users or followers %} + {% if followers %} + <h2>{% trans count=followers|length %}Followed by {{count}} person{% pluralize count %}Followed by {{count}} people{% endtrans %}</h2> + {{ macros.user_list(followers, profile_section = 'network') }} + {% endif %} + {% if followed_users %} + <h2>{% trans count=followed_users|length %}Following {{count}} person{% pluralize count %}Followed by {{count}} people{% endtrans %}</h2> + {{ macros.user_list(followed_users, profile_section = 'network') }} + {% endif %} + {% else %} + {% if request.user == view_user %} + <p>{% trans %}Your network is empty. Would you like to follow someone? - Just visit their profiles and click "follow"{% endtrans %}</p> + {% else %} + <p>{% trans username = view_user.username %}{{user}}'s network is empty{% endtrans %}</p> + {% endif %} + {% endif %} +{% endblock %} +<!-- end user_network.html --> diff --git a/askbot/skins/default/templates/user_profile/user_tabs.html b/askbot/skins/default/templates/user_profile/user_tabs.html index 276590c9..92c42ea8 100644 --- a/askbot/skins/default/templates/user_profile/user_tabs.html +++ b/askbot/skins/default/templates/user_profile/user_tabs.html @@ -11,6 +11,12 @@ href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=inbox" ><span>{% trans %}inbox{% endtrans %}</span></a> {% endif %} + {% if user_follow_feature_on %} + <a id="network" {% if tab_name=="network" %}class="on"{% endif %} + title="{% trans %}followers and followed users{% endtrans %}" + href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=network" + ><span>{% trans %}network{% endtrans %}</span></a> + {% endif %} <a id="reputation" {% if tab_name=="reputation" %}class="on"{% endif %} title="{% trans %}graph of user reputation{% endtrans %}" href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=reputation" diff --git a/askbot/skins/default/templates/users.html b/askbot/skins/default/templates/users.html index 74c171c8..750b3abb 100644 --- a/askbot/skins/default/templates/users.html +++ b/askbot/skins/default/templates/users.html @@ -40,28 +40,7 @@ <span>{% trans %}Nothing found.{% endtrans %}</span> {% endif %} </p> -<div class="userList"> - <table class="list-table"> - <tr> - <td class="list-td"> - {% for user in users.object_list %} - <div class="user"> - <ul> - <li class="thumb">{{ macros.gravatar(user, 32) }}</li> - <li><a href="{% url user_profile user.id, user.username|slugify %}">{{user.username}}</a>{{ macros.user_country_flag(user) }}</li> - <li>{{ macros.user_score_and_badge_summary(user) }}</li> - </ul> - </div> - - {% if loop.index is divisibleby 7 %} - </td> - <td> - {% endif %} - {% endfor %} - </td> - </tr> - </table> -</div> +{{ macros.user_list(users.object_list) }} <div class="pager"> {{ macros.paginator(paginator_context) }} </div> |