aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/templates
diff options
context:
space:
mode:
authortilly-Q <nattilypigeonfowl@gmail.com>2013-08-20 12:02:20 -0400
committertilly-Q <nattilypigeonfowl@gmail.com>2013-08-20 12:02:20 -0400
commite1561d048815e29b3b7c7e1c860d9cf0c4326f0a (patch)
tree691fe54e5b6a1dcb6799d673a99f01e850a6a9f9 /mediagoblin/templates
parent8394febbe1408030d1afa8f3961d92341eefa474 (diff)
downloadmediagoblin-e1561d048815e29b3b7c7e1c860d9cf0c4326f0a.tar.lz
mediagoblin-e1561d048815e29b3b7c7e1c860d9cf0c4326f0a.tar.xz
mediagoblin-e1561d048815e29b3b7c7e1c860d9cf0c4326f0a.zip
This was a very small update, I'm hoping to rebase after this to solve some
other problems. I started looking at the tests in this update. This update I spent fixing the tests to work with my new code. --\ mediagoblin/db/migration_tools.py --| Merging from ticket 679 --\ mediagoblin/db/migrations.py --| Added unique constraint to Privilege.privilege_name --\ mediagoblin/db/models.py --| Deleted vestigial Privilege.is_admin_or_moderator method --\ mediagoblin/templates/mediagoblin/moderation/user.html --| Add a `Ban User` / `UnBan User` for admin --\ mediagoblin/test/test_api.py --| Fixed test with my new changes --\ mediagoblin/test/test_auth.py --| Try to fix test, still having problems --\ mediagoblin/test/test_modelmethods.py --| Wrote my first test for the User.has_privilege method --\ mediagoblin/test/test_modelmethods.py --| Fixed test with my new changes --\ mediagoblin/test/test_sqlmigrations.py --| Merging from ticket 679 --\ mediagoblin/test/tools.py --| Editted add_fixture_user to allow for privileges rather than active column
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r--mediagoblin/templates/mediagoblin/moderation/user.html14
1 files changed, 12 insertions, 2 deletions
diff --git a/mediagoblin/templates/mediagoblin/moderation/user.html b/mediagoblin/templates/mediagoblin/moderation/user.html
index d8454d2d..ef48fe54 100644
--- a/mediagoblin/templates/mediagoblin/moderation/user.html
+++ b/mediagoblin/templates/mediagoblin/moderation/user.html
@@ -117,7 +117,8 @@
<a>{%- trans %}Reported Media Entry{% endtrans -%}</a>
{% endif %}
</td>
- <td>{{ report.report_content[:21] }}{% if report.report_content|count >20 %}...{% endif %}</td>
+ <td>{{ report.report_content[:21] }}
+ {% if report.report_content|count >20 %}...{% endif %}</td>
<td>{%- trans %}Resolve{% endtrans -%}</td>
</tr>
{% endfor %}
@@ -129,9 +130,18 @@
<a class="right_align">{{ user.username }}'s report history</a>
<span class=clear></span>
<h2>{{ user.username }}'s Privileges</h2>
+ {% if request.user.has_privilege('admin') and not user_banned and
+ not user.id == request.user.id %}
+ <input type=button class="button_action right_align"
+ value="Ban User" />
+ {% elif request.user.has_privilege('admin') and
+ not user.id == request.user.id %}
+ <input type=button class="button_action right_align"
+ value="UnBan User" />
+ {% endif %}
<form action="{{ request.urlgen('mediagoblin.moderation.give_or_take_away_privilege',
user=user.username) }}"
- method=post >
+ method=post >
<table class="admin_side_panel">
<tr>
<th>{% trans %}Privilege{% endtrans %}</th>