]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/users/info.html
Fix wrong arg in user_report url reverse
[osqa.git] / forum / skins / default / templates / users / info.html
index b533f00d605808b7e55b33db641e28a8630f8646..a714e2352775f97594a87f3594f2720ff73b9318 100644 (file)
@@ -4,11 +4,10 @@
 {% load humanize %}
 {% load smart_if %}
 {% load i18n %}
-{% load markup %}
 {% load user_tags %}
 
 <div id="subheader" class="headUser{% if view_user.is_suspended %} suspended-user{% endif %}">
-    {{view_user.username}}
+    {{view_user.decorated_name}}
 </div>
 <table class="user-info-table">
     <tr>
         {% if can_view_private %}{% user_menu request.user view_user %}{% endif %}
             <table class="user-details">
                 <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>
@@ -51,7 +62,7 @@
                 {% if view_user.last_seen %}
                 <tr>
                     <td>{% trans "last seen" %}</td>
-                    <td><strong title="{{ view_user.last_login }}">{% diff_date view_user.last_login %}</strong></td>
+                    <td><strong title="{{ view_user.last_activity }}">{% diff_date view_user.last_activity %}</strong></td>
                 </tr>
                 {% endif %}
                 {% if view_user.website %}
                     {% 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 %}
+
+                <tr>
+                    <td colspan="2" style="text-align:right">
+                        <a href="{% url "user_report" view_user.pk %}" class="ajax-command withprompt">
+                        Report user
+                        </a>
+                    </td>
+                </tr>
                                <!--
                 {% if votes_today_left %}
                 <tr>
             </table>
         </td>
         <td width="380">
+            {% if not view_user.is_suspended %}
             <div class="user-about">
             {% if view_user.about %}
-                {{view_user.about|markdown}}
+                {{view_user.about|static_content:"markdown-safe"}}
             {% endif %}
             </div>
+            {% endif %}
         </td>
     </tr>
 </table>