Skip to content

Commit

Permalink
Show kick button for organization admins; #232
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum5 committed Sep 3, 2016
1 parent 76faac0 commit ef1bd21
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions judge/views/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def get_context_data(self, **kwargs):
]))
context['partial'] = True
context['is_admin'] = self.can_edit_organization()
context['kick_url'] = reverse('organization_user_kick', args=[self.object.key])
return context


Expand Down
13 changes: 9 additions & 4 deletions templates/organization/users_table.jade
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
extends user/users_table
- load i18n

block after_point_head
| #{block.super}
block before_point_head
if can_edit
th.header

block after_point
| #{block.super}
block before_point
if can_edit
td: form(action=kick_url, method='POST')
- csrf_token
input(type='hidden', name='user', value=user.id)
a.button(onclick='form.submit()') {% trans "Kick" %}

0 comments on commit ef1bd21

Please sign in to comment.