${h.form(url('lists-index', list_type=c.list_type), method='get', id='msgsearch')}
% if hasattr(c, 'q') and c.q:
${_('About %(n)s results (%(t)s seconds)') % dict(n=c.total_found, t=c.search_time)}
% else:
 
% endif
${h.end_form()}
${self.paging(h.do_pagination(c.page), 'sliststop')}
% for i, listitem in enumerate(c.page.items): % endfor % if not c.page.items: % endif
${_('#')} ${_('From address')} ${_('To address')} ${_('Action')}
${listitem.id} ${listitem.from_address} ${listitem.to_address} ${h.link_to(h.portable_img('imgs/action_delete.png', 'Delete'), url('list-delete', listid=listitem.id))}
${_('No items found')}
${self.paging(h.do_pagination(c.page), 'slistsbottom')}
<%def name="list_sorter(text, col)"> % if c.direction == 'dsc': <% rlink = '↑' rdirection = 'asc' %> % else: <% rlink = '↓' rdirection = 'dsc' %> % endif % if c.order_by == col: ${text} ${h.link_to(h.literal(rlink), url('list-pages-byfield', list_type=c.list_type, page=c.page.page, direction=rdirection, order_by=col))} % else: ${h.link_to(h.literal(text), url('list-pages-byfield', list_type=c.list_type, page=c.page.page, direction=c.direction, order_by=col))} % endif <%def name="headers()"> <%def name="localscripts()"> ${h.javascript_link(h.media_url() + 'js/jquery.address-1.4.min.js', h.media_url() + 'js/baruwa/lists.js')} <%def name="title()">${_('List management')} <%def name="heading()"> % if int(c.list_type) == 1: % if c.page.page_count > 0: ${_('Lists :: Approved senders :: Showing page %(page)d of %(count)d pages.') % dict(page=c.page.page, count=c.page.page_count)}\ % else: ${_('Lists :: Approved senders')} % endif % else: % if c.page.page_count > 0: ${_('Lists :: Banned senders :: Showing page %(page)d of %(count)d pages.') % dict(page=c.page.page, count=c.page.page_count)}\ % else: ${_('Lists :: Banned senders')} % endif % endif <%def name="paging(page_nums, fieldname)"> % if c.page.page_count != 0: <% kwd = {} if hasattr(c, 'q') and c.q: kwd['q'] = c.q %>

${_('Showing items %(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 items:')} ${h.pager_select(fieldname, str(c.page.items_per_page))} ${_('per page')}
% if c.page.page_count == 1: - % endif % else:

${_('No items found')}

% endif % if c.page.next_page != c.page.first_page and c.page.page != c.page.first_page: % if c.direction != 'dsc' or c.order_by != 'id': <% link_url = url('list-pages-byfield', list_type=c.list_type, page=c.page.first_page, direction=c.direction, order_by=c.order_by, **kwd) %> % else: <% link_url = url('list-pages', list_type=c.list_type, page=c.page.first_page, **kwd) %> % endif ${h.link_to(h.pager_img('first'), link_url)} ... % endif % if c.page.previous_page: % if c.direction != 'dsc' or c.order_by != 'id': <% link_url = rl('list-pages-byfield', list_type=c.list_type, page=c.page.previous_page, direction=c.direction, order_by=c.order_by, **kwd) %> % else: <% link_url = url('list-pages', list_type=c.list_type, page=c.page.previous_page, **kwd) %> % endif ${h.link_to(h.pager_img('previous'), link_url)} % endif % for linkpage in page_nums: % if linkpage == c.page.page: ${linkpage} % else: % if c.direction != 'dsc' or c.order_by != 'id': <% link_url = url('list-pages-byfield', list_type=c.list_type, page=linkpage, direction=c.direction, order_by=c.order_by, **kwd) %> % else: <% link_url = url('list-pages', list_type=c.list_type, page=linkpage, **kwd) %> % endif ${h.link_to(h.literal(linkpage), link_url)} % endif % endfor % if c.page.next_page: % if c.direction != 'dsc' or c.order_by != 'id': <% link_url = url('list-pages-byfield', list_type=c.list_type, page=c.page.next_page, direction=c.direction, order_by=c.order_by, **kwd) %> % else: <% link_url = url('list-pages', list_type=c.list_type, page=c.page.next_page, **kwd) %> % endif ${h.link_to(h.pager_img('next'), link_url)} % endif % if c.page.next_page != c.page.page_count and c.page.page != c.page.page_count and c.page.page_count != 0: ... % if c.direction != 'dsc' or c.order_by != 'id': <% link_url = url('list-pages-byfield', list_type=c.list_type, page=c.page.page_count, direction=c.direction, order_by=c.order_by, **kwd) %> % else: <% link_url = url('list-pages', list_type=c.list_type, page=c.page.page_count, **kwd) %> % endif ${h.link_to(h.pager_img('last'), link_url)} % endif % if c.page.page_count != 0:
% else:
-
% endif <%inherit file="/base.html"/>