${s.searchbox(url('accounts-search'), [('d', c.d)]) if c.d else s.searchbox(url('accounts-search'))}
${h.form(url(controller='accounts'), method='post')}
${h.checkbox('checkall')} |
|
${_('Username')} |
${_('Full names')} |
${_('Email address')} |
${_('Status')} |
${_('Actions')} |
% for user in c.page.items:
<%
if user.account_type == 1:
user_icon = h.media_url() + 'imgs/user_admin.png'
elif user.account_type == 2:
user_icon = h.media_url() + 'imgs/user_dadmin.png'
else:
user_icon = h.media_url() + 'imgs/user.png'
%>
${h.checkbox('accountid', value=user.id)} |
${h.link_to(h.image(user_icon, 'x'), url('account-detail', userid=user.id))} |
${h.link_to(user.username, url('account-detail', userid=user.id))} |
${user.firstname} ${user.lastname} |
${h.link_to(user.email, url('account-detail', userid=user.id))} |
${h.enabled_or_not(user.active)} |
${h.link_to(h.portable_img('imgs/edit.png', 'Edit'), url('account-edit', userid=user.id))} |
${h.link_to(h.portable_img('imgs/action_delete.png', 'Delete'), url('account-delete', userid=user.id))} |
% endfor
% if not c.page.items:
${_('No accounts found matching: %s') % c.q} |
% endif
${h.end_form()}\
${_('Showing results %(i)d to %(l)d of %(count)d') % dict(i=c.page.first_item, l=c.page.last_item, count=c.page.item_count)}.
${_('Show:')}
${h.pager_select(fieldname, str(c.page.items_per_page))}
${_('results per page')}
% if c.page.page_count == 1:
-
% endif
% else:
${_('No items found matching: %s') % c.q}
% endif
% if c.page.next_page != c.page.first_page and c.page.page != c.page.first_page:
${h.link_to(h.pager_img('first'), url.current(p=c.page.first_page, q=c.q, **kwd))}
...
% endif
% if c.page.previous_page:
${h.link_to(h.pager_img('previous'), url.current(p=c.page.previous_page, q=c.q, **kwd))}
% endif
% for linkpage in page_nums:
% if linkpage == c.page.page:
${linkpage}
% else:
${h.link_to(h.literal(linkpage), url.current(p=linkpage, q=c.q, **kwd))}
% endif
% endfor
% if c.page.next_page:
${h.link_to(h.pager_img('next'), url.current(p=c.page.next_page, q=c.q, **kwd))}
% endif
% if c.page.next_page != c.page.page_count and c.page.page != c.page.page_count and c.page.page_count != 0:
...
${h.link_to(h.pager_img('last'), url.current(p=c.page.page_count, q=c.q, **kwd))}
% endif
% if c.page.page_count != 0:
% else: