<%! from baruwa.lib.dates import SHTFMT %>
${functions.search(c.action, c.page['q'])}
${self.pager('sresultstop')}
% if c.messages: % for index, msg in enumerate(c.messages): <% value = 'white' if (msg.spam and not msg.highspam and not msg.blacklisted and not msg.nameinfected and not msg.otherinfected and not msg.virusinfected): value = 'spam' if msg.highspam and (not msg.blacklisted): value = 'highspam' if msg.whitelisted: value = 'whitelisted' if msg.blacklisted: value = 'blacklisted' if msg.nameinfected or msg.virusinfected: value = 'infected' if not msg.scaned: value = 'notscanned' #view_url = url(route, messageid=msg.id) if c.action == 'archive': view_url = url('message-archive', msgid=msg.id) else: view_url = url('message-detail', msgid=msg.id) if (msg.spam and (not msg.blacklisted) and (not msg.virusinfected) and (not msg.nameinfected) and (not msg.otherinfected)): status = _('Spam') if msg.blacklisted: status = _('BL') if (msg.virusinfected or msg.nameinfected or msg.otherinfected): status = _('Infected') if ((not msg.spam) and (not msg.virusinfected) and (not msg.nameinfected) and (not msg.otherinfected) and (not msg.whitelisted)): status = _('Clean') if msg.whitelisted: status = _('WL') if not msg.scaned: status = _('NS') if msg.from_address == '': from_addr = '---' else: from_addr = msg.from_address %> % endfor % else: % endif
${_('Date/Time')} ${_('From')} ${_('To')} ${_('Subject')} ${_('Size')} ${_('Score')} ${_('Status')}
${h.link_to(h.datetimeformat(h.format_date(msg.timestamp, c.tzinfo), format='%Y-%m-%d %H:%M:%S'), view_url)} ${h.link_to(h.wrap_paragraphs(from_addr,32), view_url)} ${h.link_to(h.truncate(h.do_breaks(msg.to_address), 50), view_url)} ${h.link_to(h.truncate((msg.subject and msg.subject.strip()) or '---', 50), view_url)} ${h.link_to(h.format_byte_size(msg.size), view_url)} ${h.link_to(msg.sascore, view_url)} ${h.link_to(status, view_url)}
${_('No messages found matching search query: %(q)s !') % dict(q=c.page['q'])}
${self.pager('sresultsbottom')}
<%def name="pager(name)">
% if c.page['total'] != 0:

${_('Showing items %(i)d to %(l)d of %(count)d') % dict(i=c.page['first'], l=c.page['last'], count=c.page['total'])}.

${_('Show items:')} ${h.pager_select(name, str(c.page['results_per_page']))} ${_('per page')}
% if not c.page['page_numbers']: - % endif % else:

${_('No items found')}

% endif % if c.page['total'] and c.page['show_first']: ${h.link_to(h.literal(''), url.current(q=c.page['q'], page=c.page['first_page'], a=c.action))} ... % endif % if c.page['total'] and c.page['has_previous']: ${h.link_to(h.literal(''), url.current(q=c.page['q'], page=c.page['previous'], a=c.action))} % endif % for linkpage in c.page['page_numbers']: % if linkpage == c.page['page']: ${linkpage} % else: ${h.link_to(h.literal(linkpage), url.current(q=c.page['q'], page=linkpage, a=c.action))} % endif % endfor % if c.page['total'] and c.page['has_next']: ${h.link_to(h.literal(''), url.current(q=c.page['q'], page=c.page['next'], a=c.action))} % endif % if c.page['total'] and c.page['show_last']: ... ${h.link_to(h.literal(''), url.current(q=c.page['q'], page=c.page['last_page'], a=c.action))} % endif % if c.page['total'] != 0:
% else:
-
% endif
<%def name="heading()">\ ${_('Messages :: Search results :: %(q)s') % dict(q=c.page['q'])} <%def name="title()">\ ${_('Messages :: Search results :: %(q)s') % dict(q=c.page['q'])}\ <%def name="submenu()">\ <%def name="status()">\ <%def name="headers()">\ <%def name="localscripts()">\ ${h.javascript_link(h.media_url() + 'js/vendor/jquery.address-1.4.min.js', h.media_url() + 'js/vendor/moment.min.js', h.media_url() + 'js/vendor/moment-timezone-with-data.min.js', h.media_url() + 'js/baruwa/dates.min.js', h.media_url() + 'js/baruwa/messages.search.min.js')} <%namespace name="functions" file="functions.html"/> <%inherit file="../base.html"/>