[%# META title = 'Bar List' #%] [% page = { title = c.loc('Bar list') } %] [%# USE Dumper #%] [%# Dumper.dump(c.language) #%] [%# Dumper.dump_html(c.language) %#] [% USE date %]
[% IF pager.total_entries() && pager.total_entries() > 0 -%] [% IF pager.total_entries() == 1 -%] [% pager.total_entries() _ " " _ c.loc('bar') %] [% ELSE -%] [% pager.total_entries() _ " " _ c.loc('bars') %] [% END %]  |  [% c.loc('page') _ " " _ pager.current_page() _ "/" _ pager.last_page() %] [% END -%] [% IF pager.total_entries && pager.total_entries() > rows -%]  |  [% END -%] [% IF pager.current_page() != pager.first_page() -%] <<  [% END -%] [% IF pager.previous_page -%] <  [% END -%] [% IF pager.next_page -%]  > [% END -%] [% IF pager.current_page != pager.last_page() -%]  >> [% END -%]
[% # Display each bar in a table row %] [% FOREACH bar IN bars -%] [% END -%]
[% c.loc('Name') %] [% c.loc('Street') %] [% c.loc('Zip') %] [% c.loc('City') %] [% c.loc('Country') %] [% c.loc('Web') %] [% c.loc('Status') %] [% c.loc('Edit') %] [% c.loc('Last update') %]
[% bar.name %] [% bar.street %] [% bar.city.zip %] [% bar.city.name %] [% bar.city.country.name %] [% address = bar.street _ ", " _ bar.city.zip _ " " _ bar.city.name _ " (" _ bar.city.country.name _")" %] Google Maps [% IF bar.url %] [% c.loc('Homepage') %] [% END %] [% SWITCH bar.status %] [% CASE 'smoking' %] [% SET img = 'icon_smoke.png' %] [% CASE 'non-smoking' %] [% SET img = 'icon_nonsmoke.png' %] [% CASE 'mixed' %] [% SET img = 'icon_smokenonsmoke.png' %] [% END %] [% SET title = c.loc(bar.status) %] [% IF bar.comment %] [% title = title _ "; " _ bar.comment %] [% END %] [% bar.status %] [% c.loc('Edit')%] [% IF bar.last_updated_epoch %] [% SET updated = date.format(time => bar.last_updated_epoch, format => '%Y-%m-%d') %] [% updated %] [% ELSE %] &nsbp; [% END %]