2015-06-27 22:35:34 +02:00
|
|
|
## -*- coding: utf-8 -*-
|
2015-05-31 17:43:39 +02:00
|
|
|
<%inherit file="navbar.tmpl"/>
|
|
|
|
<%block name="core">
|
|
|
|
<div class="row clearfix">
|
|
|
|
<div class="col-md-12 column">
|
2016-07-05 20:26:29 +02:00
|
|
|
<form method='get' action='/searchadmin' role="form" class="form-inline" data-toggle="validator">
|
2015-05-31 17:43:39 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="searchstring">Search user to modify/delete</label>
|
2016-07-10 08:10:19 +02:00
|
|
|
<input type="text" class="form-control" id="searchstring" name="searchstring" placeholder="Search User">
|
2015-05-31 17:43:39 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="submit">Submit</label>
|
2015-07-05 17:50:42 +02:00
|
|
|
<button type="submit" id="submit" class="form-control btn btn-default green">
|
2015-05-31 17:43:39 +02:00
|
|
|
<span class="glyphicon glyphicon-search"></span> Search</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-05-31 22:39:47 +02:00
|
|
|
% if not searchresult is None:
|
2015-05-31 17:43:39 +02:00
|
|
|
<div class="row clearfix top-buffer bottom-buffer">
|
|
|
|
<div class="col-md-12 column">
|
|
|
|
<div class="well well-sm">
|
|
|
|
<table id="RecordTable" class="table table-hover table-condensed tablesorter">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2015-05-31 23:27:04 +02:00
|
|
|
%for attr in sorted(attrs_list.keys(), key=lambda attr: attrs_list[attr]['weight']):
|
2015-05-31 17:43:39 +02:00
|
|
|
<th>
|
2015-05-31 23:27:04 +02:00
|
|
|
${attrs_list[attr]['display_name']}
|
2015-05-31 17:43:39 +02:00
|
|
|
</th>
|
2015-05-31 19:38:31 +02:00
|
|
|
% endfor
|
2015-05-31 17:43:39 +02:00
|
|
|
<th class="sorter-false">
|
|
|
|
Modify
|
|
|
|
</th>
|
|
|
|
<th class="sorter-false">
|
|
|
|
Delete
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
%for user in searchresult:
|
|
|
|
<tr>
|
2015-05-31 23:27:04 +02:00
|
|
|
%for attr in sorted(attrs_list.keys(), key=lambda attr: attrs_list[attr]['weight']):
|
2015-05-31 17:43:39 +02:00
|
|
|
<td>
|
2015-05-31 19:38:31 +02:00
|
|
|
% if attr in searchresult[user]:
|
2015-06-15 23:07:02 +02:00
|
|
|
<%
|
|
|
|
value = searchresult[user][attr]
|
|
|
|
if type(value) is list:
|
|
|
|
value = ', '.join(value)
|
|
|
|
%>
|
|
|
|
${value}
|
2015-05-31 19:38:31 +02:00
|
|
|
% endif
|
2015-05-31 17:43:39 +02:00
|
|
|
</td>
|
2015-05-31 19:38:31 +02:00
|
|
|
% endfor
|
2015-05-31 17:43:39 +02:00
|
|
|
<td>
|
2015-07-05 17:50:42 +02:00
|
|
|
<a href="/modify?user=${user}" class="btn btn-xs blue pad" ><span class="glyphicon glyphicon-cog"></span> Modify</a>
|
2015-05-31 17:43:39 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
2015-07-05 17:50:42 +02:00
|
|
|
<a href="/delete?user=${user}" data-toggle='confirmation-delete' class="btn btn-xs red pad"><span class="glyphicon glyphicon-remove-sign"></span> Delete</a>
|
2015-05-31 17:43:39 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
% endfor
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-05-31 22:39:47 +02:00
|
|
|
%endif
|
2015-06-23 10:42:10 +02:00
|
|
|
<script>
|
|
|
|
// Full featured example
|
|
|
|
$("[data-toggle='confirmation-delete']").popConfirm({
|
|
|
|
content: "Delete this user?",
|
|
|
|
placement: "right" // (top, right, bottom, left)
|
|
|
|
});
|
|
|
|
</script>
|
2015-05-31 17:43:39 +02:00
|
|
|
</%block>
|