<div class="alpos" id="sublinks">
	<ul id="msgops">
		<li>${h.link_to(_('Apply Filters'), url(controller='reports', action='index', anchor='form-area'), class_='filter_add')}</li>
		<li>${h.link_to(_('Show applied filters'), url(controller='reports', action='index', anchor='active_filters'), class_='filter_show')}</li>
	</ul>
</div>
<div class="clear"></div>
<div class="sp10"></div>
${functions.search('listing')}
<div class="clear"></div>
<div class="sp10"></div>
<div class="alpos">
	<div class="toolbar">
		${self.paging(h.do_pagination(c.page), 'slistingtop')}\
	</div>
</div>
<div class="clear"></div>
<div id="content">
<table class="messages">
${functions.grid_heading('listing')}
${functions.print_rows('message-detail')}
</table>
</div>
<div class="alpos">
	<div class="toolbar">
		${self.paging(h.do_pagination(c.page), 'slistingbottom')}\
	</div>
</div>
<div class="clear"></div>
<div class="sp20"></div>

<%def name="heading()">\
% if c.page.page_count > 0:
${_('Messages :: Full message listing :: Showing page %(page)d of %(count)d pages.') % dict(page=c.page.page, count=c.page.page_count)}
% else:
${_('Messages :: Full message listing')}
% endif
% if 'filter_by' in session and session['filter_by']:
(<small>${h.link_to(_('Filters'), url(controller='reports', action='index', anchor='active_filters'), class_='filter_show')} ${_("have been applied")}</small>)
% endif
</%def>

<%def name="title()">\
% if c.page.page_count > 0:
${_('Messages :: Full message listing :: Showing page %(page)d of %(count)d pages.') % dict(page=c.page.page, count=c.page.page_count)}\
% else:
${_('Messages :: Full message listing')}
% endif
</%def>

<%def name="status()">\
</%def>

<%def name="headers()">\
</%def>

<%def name="localscripts()">\
<script type="text/javascript">
var setitems_url = "${url(controller='messages', action='setnum')}";
var filter_url = "${url('reports-ajax-filters')}";
var filter_add_url = "${url('reports-ajax-filter-form')}";
</script>
${h.javascript_link(h.media_url() + 'js/jquery.address-1.4.min.js',
h.media_url() + 'js/baruwa/dates.js',
h.media_url() + 'js/baruwa/messages.common.js',
h.media_url() + 'js/baruwa/reports.common.js',
h.media_url() + 'js/baruwa/messages.filters.js',
h.media_url() + 'js/baruwa/messages.js')}
</%def>

<%def name="paging(page_nums, fieldname)">
${functions.paging(page_nums, 'listing', fieldname)}
</%def>

<%namespace name="functions" file="functions.html"/>
<%inherit file="/base.html"/>

