@ -39,6 +39,7 @@
@@ -39,6 +39,7 @@
{{ macros.flash_messages() }}
{% if users %}
{{ macros.show_or_hide_columns('users') }}
<table class="table">
<thead>
@ -59,13 +60,13 @@
@@ -59,13 +60,13 @@
<td class="center">
<input type="checkbox" name="marked" value="{{ user.model.user_name }}">
</td>
<td>
<td class="column-user" >
<a href="{{ request.resource_url(request.root, 'orders', query={'user': user.model.user_name}) }}" title="click to view all orders from user">{{ user.model.user_name }}</a>
</td>
<td>{{ user.model.first_name }} </td>
<td>{{ user.model.last_name }} </td>
<td>{{ user.model.email }} </td>
<td>{{ user.model.role.value.capitalize() }} </td>
<td class="column-first" >{{ user.model.first_name }} </td>
<td class="column-last" >{{ user.model.last_name }} </td>
<td class="column-email" >{{ user.model.email }} </td>
<td class="column-role" >{{ user.model.role.value.capitalize() }} </td>
<td>
<a href="{{ request.resource_url(user, 'edit') }}" class="action edit" title="Edit User">edit</a>
<a href="{{ request.resource_url(user, 'delete') }}" class="action delete" title="Delete User">delete</a>
@ -86,5 +87,49 @@
@@ -86,5 +87,49 @@
</div>
</div>
</div>
<div id="modal-display" class="modal hide fade">
<form action="{{ request.resource_url(context, 'changeview', query=context.query_params()) }}" method="POST" class="checkslist">
<input type="hidden" name="csrf_token" value="{{get_csrf_token()}}">
{% set display = request.session.get('display', dict()) %}
{% set settings = display.get('users', dict()) %}
<div class="modal-header">
<a href="#" class="close" data-dismiss="modal">×</a>
<h3>Display Options</h3>
</div>
<div class="modal-body">
<p class="help-block"><span class="label notice">Notice</span> If the displayed information is too cluttered, deselect some fields below. This will temporaly remove them from your view and should help you stay on top of things.</p>
<div class="checklist">
<fieldset class="left">
<label class="checkbox">
<input type="checkbox" checked="checked" value="user" name="display" disabled="disabled" >
Username
</label>
<label class="checkbox">
<input type="checkbox" {{ 'checked="checked"' if settings.get('first') }} value="first" name="display">
First Name
</label>
<label class="checkbox">
<input type="checkbox" {{ 'checked="checked"' if settings.get('last') }} value="last" name="display">
Last Name
</label>
</fieldset>
<fieldset class="right">
<label class="checkbox">
<input type="checkbox" {{ 'checked="checked"' if settings.get('email') }} value="email" name="display">
Email
</label>
<label class="checkbox">
<input type="checkbox" checked="checked" value="role" name="display" disabled="disabled" >
Role
</label>
</fieldset>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="submit">Apply Changes</button>
<a data-dismiss="modal" class="btn" href="#">Close</a>
</div>
</form>
</div>
</div>
{% endblock content %}