Merge remote-tracking branch 'upstream/skeletongobblin' into skeleton
authorjpope777 <jpope@jpope.org>
Tue, 7 Jan 2014 00:21:29 +0000 (18:21 -0600)
committerjpope777 <jpope@jpope.org>
Tue, 7 Jan 2014 00:21:29 +0000 (18:21 -0600)
mediagoblin/static/css/base.css
mediagoblin/templates/mediagoblin/moderation/user.html

index c6ecb1d310ce313a044083c233ae42738462c42f..82444bb9ec0d9058922980a0dff57060dab92cec 100644 (file)
@@ -682,7 +682,8 @@ table.admin_panel {
 }
 
 table.admin_side_panel {
-  width: 60%
+  width: 90%;
+  margin-bottom: 10px;
 }
 
 table.admin_panel th, table.admin_side_panel th {
@@ -859,6 +860,12 @@ pre {
   .header_right {
     float: none;
   }
+
+  .return_to_panel {
+    float: none;
+    width: 100%;
+    text-align: center;
+  }
 }
 
 /* Exif display */
index 6335ea1266fe3543c0be0f88b5c18da120904dfc..efbaa0a1da88d8bdbea81d6a99dfe220b101ff37 100644 (file)
 {% endblock %}
 
 {% block mediagoblin_content -%}
+    <div class="row">
+      <a href="{{ request.urlgen('mediagoblin.moderation.users') }}"
+         class="return_to_panel button_action"
+         title="Return to Users Panel">
+        {% trans %}Return to Users Panel{% endtrans %}</a>
+    </div>
+    <div class="row">
+      <div class="eight columns">
   {# If no user... #}
   {% if not user %}
     <p>{% trans %}Sorry, no such user found.{% endtrans %}</p>
 
   {# Active(?) (or at least verified at some point) user, horray! #}
   {% else %}
-    <a href="{{ request.urlgen('mediagoblin.moderation.users') }}"
-       class="return_to_panel button_action"
-       title="Return to Users Panel">
-      {% trans %}Return to Users Panel{% endtrans %}</a>
-    <h1>
-      {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%}
-    {% if user_banned and user_banned.expiration_date %}
-      &mdash; {% trans expiration_date=user_banned.expiration_date -%}
-        BANNED until {{ expiration_date }}
-      {%- endtrans %}
-    {% elif user_banned %}
-      &mdash; {% trans %}Banned Indefinitely{% endtrans %}
-    {% endif %}
-    </h1>
-    {% if not user.url and not user.bio %}
-        <div class="profile_sidebar empty_space">
+        <h1>
+          {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%}
+        {% if user_banned and user_banned.expiration_date %}
+          &mdash; {% trans expiration_date=user_banned.expiration_date -%}
+            BANNED until {{ expiration_date }}
+          {%- endtrans %}
+        {% elif user_banned %}
+          &mdash; {% trans %}Banned Indefinitely{% endtrans %}
+        {% endif %}
+        </h1>
+        {% if not user.url and not user.bio %}
+            <div class="profile_sidebar empty_space">
+              <p>
+                {% trans -%}
+                  This user hasn't filled in their profile (yet).
+                {%- endtrans %}
+              </p>
+        {% else %}
+          <div class="profile_sidebar">
+            {% include "mediagoblin/utils/profile.html" %}
+            {% if request.user and
+                  (request.user.id == user.id or request.user.has_privilege('admin')) %}
+              <a href="{{ request.urlgen('mediagoblin.edit.profile',
+                       user=user.username) }}">
+                {%- trans %}Edit profile{% endtrans -%}
+              </a>
+            {% endif %}
+        {% endif %}
           <p>
-            {% trans -%}
-              This user hasn't filled in their profile (yet).
-            {%- endtrans %}
+            <a href="{{ request.urlgen('mediagoblin.user_pages.collection_list',
+                                               user=user.username) }}">
+              {%- trans %}Browse collections{% endtrans -%}
+            </a>
           </p>
-    {% else %}
-      <div class="profile_sidebar">
-        {% include "mediagoblin/utils/profile.html" %}
-        {% if request.user and
-              (request.user.id == user.id or request.user.has_privilege('admin')) %}
-          <a href="{{ request.urlgen('mediagoblin.edit.profile',
-                   user=user.username) }}">
-            {%- trans %}Edit profile{% endtrans -%}
-          </a>
-        {% endif %}
-    {% endif %}
-      <p>
-        <a href="{{ request.urlgen('mediagoblin.user_pages.collection_list',
-                                           user=user.username) }}">
-          {%- trans %}Browse collections{% endtrans -%}
-        </a>
-      </p>
-    </div>
+        </div>
   {% endif %}
+    </div>
   {% if user %}
-    <h2>
-      {%- trans username=user.username -%}
-        Active Reports on {{ username }}
-      {%- endtrans -%}
-    </h2>
-    {% if reports.count() %}
-    <table class="admin_side_panel">
-      <tr>
-        <th>{%- trans %}Report ID{% endtrans -%}</th>
-        <th>{%- trans %}Reported Content{% endtrans -%}</th>
-        <th>{%- trans %}Description of Report{% endtrans -%}</th>
-      </tr>
-      {% for report in reports %}
-        <tr>
-          <td>
-            <img src="{{ request.staticdirect('/images/icon_clipboard.png') }}" />
-            <a href="{{ request.urlgen('mediagoblin.moderation.reports_detail',
-                                               report_id=report.id) }}">
-              {%- trans report_number=report.id -%}
-                Report #{{ report_number }}
-              {%- endtrans -%}
-            </a>
-          </td>
-          <td>
-            {% if report.discriminator == "comment_report" %}
-              <a>{%- trans %}Reported Comment{% endtrans -%}</a>
-            {% elif report.discriminator == "media_report" %}
-              <a>{%- trans %}Reported Media Entry{% endtrans -%}</a>
-            {% endif %}
-          </td>
-          <td>{{ report.report_content[:21] }}
-                {% if report.report_content|count >20 %}...{% endif %}</td>
-          <td>{%- trans %}Resolve{% endtrans -%}</td>
-        </tr>
-      {% endfor %}
-        <tr><td></td><td></td>
-    </table>
-    {% else %}
-      {%- trans username=user.username -%}
-        No active reports filed on {{ username }}
-      {%- endtrans -%}
-    {% endif %}
-    <span class="right_align">
-        <a href="{{ request.urlgen(
-            'mediagoblin.moderation.reports') }}?reported_user={{user.id}}">
-        {%- trans
-            username=user.username %}All reports on {{ username }}{% endtrans %}</a>
-    &middot;
-        <a href="{{ request.urlgen(
-                'mediagoblin.moderation.reports') }}?reporter={{user.id}}">
-        {%- trans username=user.username -%}
-          All reports that {{ username }} has filed
-        {%- endtrans %}</a>
-    </span>
-    <span class=clear></span>
+      <div class="eight columns">
+        <h2>
+          {%- trans username=user.username -%}
+            Active Reports on {{ username }}
+          {%- endtrans -%}
+        </h2>
+        {% if reports.count() %}
+        <table class="admin_side_panel">
+          <tr>
+            <th>{%- trans %}Report ID{% endtrans -%}</th>
+            <th>{%- trans %}Reported Content{% endtrans -%}</th>
+            <th>{%- trans %}Description of Report{% endtrans -%}</th>
+          </tr>
+          {% for report in reports %}
+            <tr>
+              <td>
+                <img src="{{ request.staticdirect('/images/icon_clipboard.png') }}" />
+                <a href="{{ request.urlgen('mediagoblin.moderation.reports_detail',
+                                                   report_id=report.id) }}">
+                  {%- trans report_number=report.id -%}
+                    Report #{{ report_number }}
+                  {%- endtrans -%}
+                </a>
+              </td>
+              <td>
+                {% if report.discriminator == "comment_report" %}
+                  <a>{%- trans %}Reported Comment{% endtrans -%}</a>
+                {% elif report.discriminator == "media_report" %}
+                  <a>{%- trans %}Reported Media Entry{% endtrans -%}</a>
+                {% endif %}
+              </td>
+              <td>{{ report.report_content[:21] }}
+                    {% if report.report_content|count >20 %}...{% endif %}</td>
+              <td>{%- trans %}Resolve{% endtrans -%}</td>
+            </tr>
+          {% endfor %}
+            <tr><td></td><td></td>
+        </table>
+        {% else %}
+          {%- trans username=user.username -%}
+            No active reports filed on {{ username }}
+          {%- endtrans -%}
+        {% endif %}
+        <p>
+          <span>
+              <a href="{{ request.urlgen(
+                  'mediagoblin.moderation.reports') }}?reported_user={{user.id}}">
+              {%- trans
+                  username=user.username %}All reports on {{ username }}{% endtrans %}</a>
+          &middot;
+              <a href="{{ request.urlgen(
+                      'mediagoblin.moderation.reports') }}?reporter={{user.id}}">
+              {%- trans username=user.username -%}
+                All reports that {{ username }} has filed
+              {%- endtrans %}</a>
+          </span>
+          <span class=clear></span>
+        </p>
+      </div>
+    </div>
+    <div class="row hell">
     <h2>{% trans username=user.username -%}
           {{ username }}'s Privileges{% endtrans %}</h2>
-      <form method=POST action="{{ request.urlgen(
-        'mediagoblin.moderation.ban_or_unban',
-        user=user.username) }}" class="right_align">
-        {{ csrf_token }}
-        {% if request.user.has_privilege('admin') and not user_banned and
-            not user.id == request.user.id %}
-          {{ wtforms_util.render_divs(ban_form) }}
-          <input type=submit class="button_action"
-               value="{% trans %}Ban User{% endtrans %}"
-               id="ban_user_submit" />
-        {% elif request.user.has_privilege('admin') and
-            not user.id == request.user.id %}
-          <input type=submit class="button_action right_align"
-                 value="{% trans %}UnBan User{% endtrans %}" />
-        {% endif %}
-      </form>
+    <div class="eight columns">
     <form action="{{ request.urlgen('mediagoblin.moderation.give_or_take_away_privilege',
                user=user.username) }}"
           method=post >
     {{ csrf_token }}
     <input type=hidden name=privilege_name id=hidden_privilege_name />
     </form>
+    </div>
+    <div class="eight columns">
+      <form method=POST action="{{ request.urlgen(
+        'mediagoblin.moderation.ban_or_unban',
+        user=user.username) }}">
+        {{ csrf_token }}
+        {% if request.user.has_privilege('admin') and not user_banned and
+            not user.id == request.user.id %}
+          {{ wtforms_util.render_divs(ban_form) }}
+          <input type=submit class="button_action"
+               value="{% trans %}Ban User{% endtrans %}"
+               id="ban_user_submit" />
+        {% elif request.user.has_privilege('admin') and
+            not user.id == request.user.id %}
+          <input type=submit class="button_action"
+                 value="{% trans %}UnBan User{% endtrans %}" />
+        {% endif %}
+      </form>
+    </div>
   {% endif %}
     <script>
 $(document).ready(function(){
@@ -214,4 +229,5 @@ $(document).ready(function(){
     });
 });
     </script>
+</div><!--whoami-->
 {% endblock %}