]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/users/info.html
do not show user bio if user is suspended
[osqa.git] / forum / skins / default / templates / users / info.html
index 08f006f589971f20563a629fd07e6a7a44a69bf4..39f3b7d869d17d4f576ff9a4e1f6dc18c02ef5e0 100644 (file)
@@ -6,8 +6,9 @@
 {% load i18n %}
 {% load markup %}
 {% load user_tags %}
-<div id="subheader" class="headUser">
-    {{view_user.username}}
+
+<div id="subheader" class="headUser{% if view_user.is_suspended %} suspended-user{% endif %}">
+    {{view_user.decorated_name}}
 </div>
 <table class="user-info-table">
     <tr>
                 </tr>
                 <tr>
                     <td align="center">
-                        <div class="scoreNumber">{{view_user.reputation|intcomma}}</div>
-                        <p><b style="color:#777;">{% trans "reputation" %}</b></p>
+                        {% if not view_user.is_suspended %}
+                            <div class="scoreNumber" id="user-reputation">{{view_user.reputation|intcomma}}</div>
+                            <p><b style="color:#777;">{% trans "reputation" %}</b></p>
+                        {% else %}
+                            <div class="scoreNumber">{% trans "Suspended" %}</div>
+                            <p>{{ view_user.suspension.extra.publicmsg }}</p>
+                        {% endif %}
                     </td>
                 </tr>
             </table>
         </td>
         <td width="360" style="vertical-align: top;">
+        {% if can_view_private %}{% user_menu request.user view_user %}{% endif %}
             <table class="user-details">
-                {% if view_user != request.user and request.user.is_superuser %}
                 <tr>
-                    <td class="moderation" align="left" colspan="2">
-                        {% user_moderation request.user view_user %}
-                    </td>
-                </tr>
-                {% endif %}
-                {% if can_view_private %}
-                <tr>
-                    <td class="user-profile-tool-links" align="left" colspan="2">
-                        {% joinitems using ' | ' %}
-                            <span class="user-edit-link"><a href="{% url edit_user id=view_user.id %}">{% trans "update profile" %}</a></span>
-                        {% separator %}
-                            <a href="{% url user_authsettings id=view_user.id %}">{% trans "authentication settings" %}</a>
-                        {% endjoinitems %}
-                    </td>
-                </tr>  
-                {% endif %}
-                <tr>
-                    <th colspan="2" align="left"><h3>{% trans "Registered user" %}</h3></th>
+                    <th colspan="2" align="left">
+                        <h3>
+                            {% if view_user.is_superuser %}
+                                {% trans "Administrator" %}
+                            {% else %}
+                                {% if view_user.is_staff %}
+                                    {% trans "Moderator" %}
+                                {% else %}
+                                    {% trans "Registered user" %}
+                                {% endif %}
+                            {% endif %}
+                        </h3>
+                    </th>
                 </tr>
                 {% if view_user.real_name %}
                 <tr>
                 {% if view_user.last_seen %}
                 <tr>
                     <td>{% trans "last seen" %}</td>
-                    <td><strong title="{{ view_user.last_seen }}">{% diff_date view_user.last_seen %}</strong></td>
+                    <td><strong title="{{ view_user.last_activity }}">{% diff_date view_user.last_activity %}</strong></td>
                 </tr>
                 {% endif %}
                 {% if view_user.website %}
                 <tr>
-                    <td>{% trans "user website" %}</td>
+                    <td>{% trans "user's website" %}</td>
                     <td><a rel="nofollow" target="_blank" href="{{view_user.website}}">{{view_user.website}}</a></td>
                 </tr>
                 {% endif  %}
                     {% endif %}
                 </tr>
                 {% endif %}
-                {% if request.user.is_superuser %}
+                {% if can_view_private %}
                 <tr>
                     <td>{% trans "email" %}</td>
-                    <td><a href="mailto: {{ view_user.email }}">{{ view_user.email }}</a></td>
+                    <td>
+                        <a href="mailto:{{ view_user.email }}">{{ view_user.email }}</a>
+                        {% if not view_user.email_isvalid %}
+                            ({% trans "not validated" %})
+                            {% ifequal request.user view_user %}
+                                </td></tr><tr><td></td><td><a href="{% url send_validation_email %}">{% trans "Send me a validation link." %}</a>
+                            {% endifequal %}
+                        {% endif %}
+                    </td>
                 </tr>
                 {% endif %}
                                <!--
             </table>
         </td>
         <td width="380">
+            {% if not view_user.is_suspended %}
             <div class="user-about">
             {% if view_user.about %}
                 {{view_user.about|markdown}}
             {% endif %}
             </div>
+            {% endif %}
         </td>
     </tr>
 </table>