1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-29 12:44:31 +01:00
ldapcherry/resources/templates/searchuser.tmpl
2015-06-15 23:07:02 +02:00

56 lines
2.4 KiB
Cheetah

<%inherit file="navbar.tmpl"/>
<%block name="core">
<div class="row clearfix">
<div class="col-md-12 column">
<form method='get' action='/searchuser' role="form" class="form-inline">
<div class="form-group">
<label for="searchstring">Search user</label>
<input type="text" class="form-control" name="searchstring" placeholder="Search User">
</div>
<div class="form-group">
<label for="submit">Submit</label>
<button type="submit" class="form-control btn btn-default green">
<span class="glyphicon glyphicon-search"></span> Search</button>
</div>
</form>
</div>
</div>
% if not searchresult is None:
<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>
%for attr in sorted(attrs_list.keys(), key=lambda attr: attrs_list[attr]['weight']):
<th>
${attrs_list[attr]['display_name']}
</th>
% endfor
</tr>
</thead>
<tbody>
%for user in searchresult:
<tr>
%for attr in sorted(attrs_list.keys(), key=lambda attr: attrs_list[attr]['weight']):
<td>
% if attr in searchresult[user]:
<%
value = searchresult[user][attr]
if type(value) is list:
value = ', '.join(value)
%>
${value}
% endif
</td>
% endfor
</tr>
% endfor
</tbody>
</table>
</div>
</div>
</div>
%endif
</%block>