Holger Frey
7 years ago
2 changed files with 135 additions and 2 deletions
@ -0,0 +1,79 @@
@@ -0,0 +1,79 @@
|
||||
{% extends "ordr2:templates/layout.jinja2" %} |
||||
{% import 'ordr2:templates/macros.jinja2' as macros with context %} |
||||
|
||||
{% block subtitle %} Account | Admin | Users | Change Roles {% endblock subtitle %} |
||||
|
||||
{% block content %} |
||||
<div class="content controls"> |
||||
|
||||
<div class="container-fluid"> |
||||
<div class="row-fluid"> |
||||
<div class="page-controls"> |
||||
<h1>Change Role of User{{ 's' if accounts|length > 1 }}</h1> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="row"> |
||||
<div class="span10"> |
||||
|
||||
<div class="action-header"> |
||||
<h3>The role of the following user{{ 's' if accounts|length > 1 }} will be changed:</h3> |
||||
</div> |
||||
|
||||
<form action="{{ request.resource_url(context, 'roles') }}" method="POST" class="action"> |
||||
<input type="hidden" name="csrf_token" value="{{get_csrf_token()}}"> |
||||
|
||||
<table class="table"> |
||||
<thead> |
||||
<th>Username</th> |
||||
<th>First Name</th> |
||||
<th>Last Name</th> |
||||
<th>Email</th> |
||||
<th>Role</th> |
||||
</thead> |
||||
|
||||
<tbody> |
||||
{% for account in accounts %} |
||||
<tr> |
||||
<td class="column-user"> |
||||
{{ account.user_name }} |
||||
</td> |
||||
<td>{{ account.first_name }} </td> |
||||
<td>{{ account.last_name }} </td> |
||||
<td>{{ account.email }} </td> |
||||
<td> |
||||
<select name="account-{{ account.id }}" class="select-role span2"> |
||||
{% for value, display in roles %} |
||||
<option value="{{ value }}" {{ 'selected="selected"' if value == account.role.name }}>{{ display }}</option> |
||||
{% endfor %} |
||||
</select> |
||||
</td> |
||||
</tr> |
||||
{% endfor %} |
||||
</tbody> |
||||
</table> |
||||
|
||||
<fieldset class="form-actions"> |
||||
<div class="right"> |
||||
<button name="change" type="submit" value="change" class="btn btn-large btn-danger">Change Role{{ 's' if accounts|length > 1 }}</button> |
||||
<button name="cancel" type="submit" value="cancel" class="btn btn-large">Cancel</button> |
||||
</div> |
||||
<div class="btn-group quick-action left" data-action="account"> |
||||
<a data-value="USER" href="#" class="btn btn-large btn-primary">Set all to User</a> |
||||
<a href="#" data-toggle="dropdown" class="btn btn-large btn-primary dropdown-toggle"><span class="caret"></span></a> |
||||
<ul class="dropdown-menu"> |
||||
<li><a data-value="INACTIVE" href="#">Set all to Inactive</a></li> |
||||
<li><a data-value="PURCHASER" href="#">Set all to Purchaser</a></li> |
||||
</ul> |
||||
</div> |
||||
</fieldset> |
||||
|
||||
</form> |
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
</div> |
||||
{% endblock content %} |
Reference in new issue