1
0
Fork 0
mirror of https://github.com/kakwa/ldapcherry synced 2025-07-04 04:17:43 +02:00

implementing weight and normalizing each kind of attributes

This commit is contained in:
kakwa 2015-05-31 23:27:04 +02:00
parent af3326db07
commit f8b3df8b58
8 changed files with 28 additions and 14 deletions

View file

@ -1,4 +1,4 @@
% for a in attributes:
% for a in sorted(attributes.keys(), key=lambda attr: attributes[attr]['weight']):
<% attr = attributes[a] %>
<div class="form-group">
<div class="input-group">

View file

@ -22,9 +22,9 @@
<table id="RecordTable" class="table table-hover table-condensed tablesorter">
<thead>
<tr>
%for attr in attrs_list:
%for attr in sorted(attrs_list.keys(), key=lambda attr: attrs_list[attr]['weight']):
<th>
${attrs_list[attr]}
${attrs_list[attr]['display_name']}
</th>
% endfor
<th class="sorter-false">
@ -38,7 +38,7 @@
<tbody>
%for user in searchresult:
<tr>
%for attr in attrs_list:
%for attr in sorted(attrs_list.keys(), key=lambda attr: attrs_list[attr]['weight']):
<td>
% if attr in searchresult[user]:
${searchresult[user][attr]}

View file

@ -22,9 +22,9 @@
<table id="RecordTable" class="table table-hover table-condensed tablesorter">
<thead>
<tr>
%for attr in attrs_list:
%for attr in sorted(attrs_list.keys(), key=lambda attr: attrs_list[attr]['weight']):
<th>
${attrs_list[attr]}
${attrs_list[attr]['display_name']}
</th>
% endfor
</tr>
@ -32,7 +32,7 @@
<tbody>
%for user in searchresult:
<tr>
%for attr in attrs_list:
%for attr in sorted(attrs_list.keys(), key=lambda attr: attrs_list[attr]['weight']):
<td>
% if attr in searchresult[user]:
${searchresult[user][attr]}