19
19
<%namespace name="toolbar" file="/default/component/toolbar.mako" />
20
20
<%namespace name="pagination" file="/default/component/pagination.mako" />
22
<script type="text/javascript">
23
window.addEvent("domready", function() {
24
formSubmission = new FormSubmit({formId: 'account-list'});
22
28
${parent.action_title(c.config.get_action_info('friendly_name'))}
23
29
${toolbar.write(c.config.get_toolbar_items())}
24
30
${options(c.config.get_action())}
85
94
% for user in users[begin:end]:
89
103
<% tr_class = " alternate-row " %>
106
% if user.account_disabled and c.filter_status == -1:
107
<% disabled_class = " disabled-row" %>
92
<tr id="row-user-${i}" title="${_('Edit User')}" class="${tr_class}">
93
<td><input value="${user.username}" onchange="selectShareRow(this);" name="name" type="checkbox" id="check-row-user-${i}" /></td>
94
<td onclick="clickableRow('${h.url_for(controller = 'account', action = 'edituser', id = user.rid)}');">${i}</td>
95
<td onclick="clickableRow('${h.url_for(controller = 'account', action = 'edituser', id = user.rid)}');">${user.rid}</td>
96
<td onclick="clickableRow('${h.url_for(controller = 'account', action = 'edituser', id = user.rid)}');">${user.username}</td>
97
<td onclick="clickableRow('${h.url_for(controller = 'account', action = 'edituser', id = user.rid)}');">${user.description}</td>
98
<td onclick="clickableRow('${h.url_for(controller = 'account', action = 'edituser', id = user.rid)}');">${quick_tasks(user.rid, "User", False)}</td>
110
<tr id="row-user-${i}" title="${_('Edit User')}" class="${tr_class} ${disabled_class}">
111
<td><input value="${user.username}" onchange="selectShareRow(this);" name="uid" type="checkbox" id="check-row-user-${i}" /></td>
112
<td onclick="clickableRow('${h.url_for('account_action', controller='account', action='user', subaction='edit', name=user.username)}');">${i}</td>
113
<td onclick="clickableRow('${h.url_for('account_action', controller='account', action='user', subaction='edit', name=user.username)}');">${user.rid}</td>
114
<td onclick="clickableRow('${h.url_for('account_action', controller='account', action='user', subaction='edit', name=user.username)}');">${user.username}</td>
115
<td onclick="clickableRow('${h.url_for('account_action', controller='account', action='user', subaction='edit', name=user.username)}');">${user.description}</td>
116
<td onclick="clickableRow('${h.url_for('account_action', controller='account', action='user', subaction='edit', name=user.username)}');">
117
% if user.account_disabled:
123
<td onclick="clickableRow('${h.url_for('account_action', controller='account', action='user', subaction='edit', name=user.username)}');">${quick_tasks(user.username, "User", user.account_disabled)}</td>
106
132
<%def name="group_table(groups, table_id='group-list', table_class='')">
133
${h.form('', method="post", id="account-list", class_="")}
107
134
% if len(groups) > 0:
108
135
<% table_class = table_class + " not-empty" %>
157
184
<tr id="row-group-${i}" title="${_('Edit Group')}" class="${tr_class}">
158
<td><input value="${group.name}" onchange="selectShareRow(this);" name="name" type="checkbox" id="check-row-group-${i}" /></td>
159
<td onclick="clickableRow('${h.url_for(controller = 'account', action = 'editgroup', id = group.rid)}');">${i}</td>
160
<td onclick="clickableRow('${h.url_for(controller = 'account', action = 'editgroup', id = group.rid)}');">${group.rid}</td>
161
<td onclick="clickableRow('${h.url_for(controller = 'account', action = 'editgroup', id = group.rid)}');">${group.name}</td>
162
<td onclick="clickableRow('${h.url_for(controller = 'account', action = 'editgroup', id = group.rid)}');">${group.description}</td>
163
<td>${quick_tasks(group.rid, "Group", False)}</td>
185
<td><input value="${group.name}" onchange="selectShareRow(this);" name="gid" type="checkbox" id="check-row-group-${i}" /></td>
186
<td onclick="clickableRow('${h.url_for('account_action', controller='account', action='group', subaction='edit', name = group.name)}');">${i}</td>
187
<td onclick="clickableRow('${h.url_for('account_action', controller='account', action='group', subaction='edit', name = group.name)}');">${group.rid}</td>
188
<td onclick="clickableRow('${h.url_for('account_action', controller='account', action='group', subaction='edit', name = group.name)}');">${group.name}</td>
189
<td onclick="clickableRow('${h.url_for('account_action', controller='account', action='group', subaction='edit', name = group.name)}');">${group.description}</td>
190
<td style="min-width:35px;">${quick_tasks(group.name, "Group", False)}</td>
171
199
<%def name="quick_tasks(id, type, is_disabled=False)">
172
200
<ul class="quick-tasks">
173
<li><a href="${h.url_for(controller = 'account', action = 'edit' + type.lower(), id = id)}" title="${_('Edit %s' % (type))}"><img src="/default/images/icons/folder-pencil.png" alt="${_('Edit %s Icon' % (type))}"/></a></li>
174
<li><a href="${h.url_for(controller = 'account', action = 'remove' + type.lower(), id = id)}" title="${_('Remove %s' % (type))}"><img src="/default/images/icons/folder-minus.png" alt="${_('Remove %s Icon' % (type))}"/></a></li>
201
<li><a href="${h.url_for('account_action', action=type.lower(), subaction='edit', name=id)}" title="${_('Edit %s' % (type))}"><img src="/default/images/icons/user-pencil.png" alt="${_('Edit %s Icon' % (type))}"/></a></li>
202
<li><a href="${h.url_for('account_action', action=type.lower(), subaction='remove', name=id)}" title="${_('Remove %s' % (type))}"><img src="/default/images/icons/user-minus.png" alt="${_('Remove %s Icon' % (type))}"/></a></li>
204
% if type.lower() == "user":
205
<li><a href="${h.url_for('account_action', action=type.lower(), subaction='toggle', name=id)}" title="${_('Toggle this %s' % (type))}">
206
% if is_disabled == True:
207
<img src="/default/images/icons/lock-unlock.png" alt="${_('Toggle (Enable) %s Icon' % (type))}"/>
209
<img src="/default/images/icons/lock.png" alt="${_('Toggle (Disable) %s Icon' % (type))}"/>
190
228
<span style="float:right;">
191
<label for="items_per_page">${_('Per Page')}:</label>
229
% if action_name == "user":
230
<label for="show-only-status">${_("Show")}:</label>
231
<select name="filter_status" id="show-only-status" onchange="submitForm('options');">
233
% if c.filter_status == -1:
237
value="-1">${_("All")}</option>
239
% if c.filter_status == 1:
243
value="1">${_("Enabled")}</option>
245
% if c.filter_status == 0:
249
value="0">${_("Disabled")}</option>
253
<label style="margin-left:15px;" for="items_per_page">${_('Per Page')}:</label>
192
254
<select name="per_page" id="items_per_page" onchange="submitForm('options');">
193
255
% for i in range(5, 30, 5):