<div class="row-fluid" id="sublinks">
	<div class="span1 hidden-phone"></div>
	<div class="span10">
		<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="span1 hidden-phone"></div>
</div>
<div class="space-6"></div>
${functions.search('listing')}
<div class="space-6"></div>
<div class="row-fluid">
	<div class="span1 hidden-phone"></div>
	<div class="span10 toolbar">
		${self.paging(h.do_pagination(c.page), 'slistingtop')}\
	</div>
	<div class="span1 hidden-phone"></div>
</div>
<div class="space-6"></div>
<div class="row-fluid">
	<div class="span1 hidden-phone"></div>
	<div class="span10">
		<table class="table table-bordered">
		${functions.grid_heading('listing')}
		${functions.print_rows('message-detail')}
		</table>
	</div>
	<div class="span1 hidden-phone"></div>
</div>
<div class="row-fluid">
	<div class="span1 hidden-phone"></div>
	<div class="span10 toolbar">
		${self.paging(h.do_pagination(c.page), 'slistingbottom')}\
	</div>
	<div class="span1 hidden-phone"></div>
</div>
<div class="space-6"></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="submenu()">\
<div class="navbar navbar-static-top">
    <div class="navbar-inner">
        <div class="nav-collapse collapse">
            <ul class="nav navbar-nav">
                <li class="nav_item">${h.link_to(_('Full message list'), url(controller='messages', action='listing'))}</li>
				<li class="nav_item">${h.link_to(_('Quarantine'), url(controller='messages', action='quarantine'))}</li>
				<li class="nav_item">${h.link_to(_('Archive'), url(controller='messages', action='archive'))}</li>
            </ul>
        </div>
    </div>
</div>
</%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')}";
var user_timezone = "${c.user.timezone}";
var baruwa_custom_name = "${config.get('baruwa.custom.name', 'Baruwa')}";
</script>
${h.stylesheet_link(h.media_url() + 'css/vendor/datepicker.css')}
${h.javascript_link(h.media_url() + 'js/vendor/jquery.address-1.5.min.js',
h.media_url() + 'js/vendor/jquery.maskedinput.min.js',
h.media_url() + 'js/vendor/bootstrap-datepicker.min.js',
h.media_url() + 'js/vendor/bootbox.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.common.min.js',
h.media_url() + 'js/baruwa/reports.common.min.js',
h.media_url() + 'js/baruwa/messages.filters.min.js',
h.media_url() + 'js/baruwa/messages.min.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"/>


