diff options
Diffstat (limited to 'templates/web/fixmybarangay')
-rw-r--r-- | templates/web/fixmybarangay/alert/index.html | 6 | ||||
-rw-r--r-- | templates/web/fixmybarangay/around/tabbed_lists.html | 2 | ||||
-rw-r--r-- | templates/web/fixmybarangay/auth/sign_out.html | 8 | ||||
-rw-r--r-- | templates/web/fixmybarangay/faq/faq-en-gb.html | 56 | ||||
-rw-r--r-- | templates/web/fixmybarangay/footer.html | 75 | ||||
-rw-r--r-- | templates/web/fixmybarangay/header.html | 20 | ||||
-rw-r--r-- | templates/web/fixmybarangay/report/_message_manager.html | 124 | ||||
-rw-r--r-- | templates/web/fixmybarangay/report/new/councils_text.html | 4 | ||||
-rwxr-xr-x | templates/web/fixmybarangay/reports/index.html | 42 |
9 files changed, 245 insertions, 92 deletions
diff --git a/templates/web/fixmybarangay/alert/index.html b/templates/web/fixmybarangay/alert/index.html index d9bb74ee9..8e2ce7518 100644 --- a/templates/web/fixmybarangay/alert/index.html +++ b/templates/web/fixmybarangay/alert/index.html @@ -30,9 +30,11 @@ FixMyBarangay has a RSS feeds and email alerts for local problems. <div class="sticky-sidebar" id="alert_recent"> <aside> <h2>[% loc('Some photos of recent reports') %]</h2> - [% FOREACH p IN photos %] + [% FOREACH p IN photos; + photo = p.get_photo_params + %] <a href="/report/[% p.id %]"><img border="0" height="100" - src="/photo/[% p.id %].tn.jpeg" alt="[% p.title | html %]" title="[% p.title | html %]"></a> + src="[% photo.url_tn %]" alt="[% p.title | html %]" title="[% p.title | html %]"></a> [% END %] </aside> </div> diff --git a/templates/web/fixmybarangay/around/tabbed_lists.html b/templates/web/fixmybarangay/around/tabbed_lists.html index c9f1c2a38..342b03f0e 100644 --- a/templates/web/fixmybarangay/around/tabbed_lists.html +++ b/templates/web/fixmybarangay/around/tabbed_lists.html @@ -1,4 +1,4 @@ -[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council); +[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body); IF allow_creation %] <menu id="problems-nav" class="tab-nav"> diff --git a/templates/web/fixmybarangay/auth/sign_out.html b/templates/web/fixmybarangay/auth/sign_out.html deleted file mode 100644 index 11888089a..000000000 --- a/templates/web/fixmybarangay/auth/sign_out.html +++ /dev/null @@ -1,8 +0,0 @@ -[% INCLUDE 'header.html', title = loc('Sign out'), bodyclass = 'fullwidthpage' %] - -<h1>[% loc('You have been signed out') %]</h1> - -<p>Please feel free to <a href="[% c.uri_for('/auth') %]">sign in again</a>, or -go back to the <a href="/">FixMyBarangay front page</a>.</p> - -[% INCLUDE 'footer.html' %] diff --git a/templates/web/fixmybarangay/faq/faq-en-gb.html b/templates/web/fixmybarangay/faq/faq-en-gb.html index 320a7528e..6e8893143 100644 --- a/templates/web/fixmybarangay/faq/faq-en-gb.html +++ b/templates/web/fixmybarangay/faq/faq-en-gb.html @@ -54,7 +54,8 @@ the problem.</dd> <dd> You can use your email address and set a password right away, but your account won't be enabled as a <em>staff account</em> until one of the - system administrators has checked it. TODO: contact details. + system administrators has checked it. If you're not sure who to contact, try + <a href="mailto:[% c.config.CONTACT_EMAIL %]">[% c.config.CONTACT_EMAIL %]</a>. </dd> <dt>I've forgotten my password, what do I do?</dt> <dd> @@ -68,10 +69,32 @@ the problem.</dd> or quit the browser (just closing the window without quitting the browser is not enough). </dd> <dt>Reporting</dt> - <dd>TODO</dd> + <dd><p> + To make a new report, start by clicking on the button for either barangay <em>BSN</em> or <em>Luz</em>. + </p> + <ul> + <li> + <strong>To create a standalone report</strong> simply click on the map where the problem is. + </li> + <li> + <strong>To create a report from a text message</strong> log into Message Manager (see below), + then select the message you want to use (click on the radio button). When the message has gone + green, you can click on the map and the message will automatically be used to create the report. + You can edit the text, but that report will be associated with that incoming message. + </li> + </ul> + <p> + Once you've placed the pin, but before you press <em>Submit</em>, you can drag or reposition the pin + if you want to change its position. + </p> + <p> + Choose the category for this report ‐ obviously, this helps FixMyBarangay decide to which + department the report will be sent. + </p> + </dd> <dt>How do I see the SMS messages people have sent?</dt> - <dd>When you look at the barangay problems, click on "Problems via text" - (or, if you're viewing a specific report, click "Show messages") to see the + <dd>When you look at the barangay problems, click on <em>Problems via text</em> + (or, if you're viewing a specific report, click <em>Show messages</em>) to see the currently available messages. You'll need a username and password for the Message Manager (your manager will have told you what these are). Note that you can only see messages that have not yet been used to @@ -82,31 +105,40 @@ the problem.</dd> No, it's a separate account (some FMB users don't have any access to the SMS messages). Your manager will tell you what your login for Message Manager system is, if you have one. </dd> - <dt>I tried to work with a message but it said "lock not granted". What's up?</dt> + <dt>I tried to work with a message but it said "Someone is working with that message right now!" What's up?</dt> <dd> - This means another staff member is working on the message. To prevent you both creating + This means another staff member has a "lock" on the message. To prevent you both creating a report, or sending a reply, we use a first-come-first-serve locking mechanism. Collisions like this are rare, but if they do happen, try again a few minutes later because the lock may have expired by then. </dd> <dt>Can I delete a message?</dt> <dd> - Yes. Click on the red cross when you hover over it (although really you're only hiding it). - You need an <em>administrator</em> account in the Message Manager to be able to see the + Yes. Click on the red cross when you hover over it (although really you're only hiding it so + it never gets shown within FixMyBarangay). + You need a manager's account in the Message Manager to be able to see any messages that have been hidden, so hiding them is as good as deleting them. </dd> <dt>It looks like an incoming message is wrongly shown as a reply. Can I fix it?</dt> <dd> FixMyBarangay tries to recognise SMS replies, and automatically matches them to the right thread. If it - gets this wrong, the reply may appear as a new "available" message, or a new message might be - mistaken for a reply. You need to ask an administrator to log into Message Manager to sort this out for you. + gets this wrong you can click on the <em>detach</em> button. The message will then be a new "available" + message. If Message Manager got it wrong the other way round, and missed a reply, you can fix this too + but you need to log into Message Manager with a manager's account to do it. </dd> <dt>How do the replies get back to the original sender?</dt> <dd> Although you're replying from within FixMyBarangay, the replies are sent by SMS. - There may be a delay of a few minutes between the moment you press <strong>reply</strong> + There may be a delay of a several minutes between the moment you press <strong>reply</strong> and the message's arrival. </dd> + <dt>How can I tell the original sender their problem has been fixed?</dt> + <dd> + Go to the report. If the report is marked "this report was submitted by SMS", you can send a reply. + Click on <em>Show Messages</em>. When the messages appear, click on <em>Show messages for + <strong>this</strong> report</em>. Hover over the message you want to send the message to, and + click <em>Reply</em>. + </dd> <h2><a name="organisation"></a>Organisation Questions</h2> <dl> @@ -128,7 +160,7 @@ UK</dd> <dd> The software behind this site is open source, and available to you mainly under the GNU Affero GPL software license. -See <a href="http://code.fixmystreet.com/">code.fixmystreet.com</a> for more information about setting up +See <a href="http://fixmystreet.org/">fixmystreet.org</a> for more information about setting up and running sites like these. </dd> </dl> diff --git a/templates/web/fixmybarangay/footer.html b/templates/web/fixmybarangay/footer.html index 966abacd8..5bac32e98 100644 --- a/templates/web/fixmybarangay/footer.html +++ b/templates/web/fixmybarangay/footer.html @@ -75,6 +75,29 @@ </div> </div> <div style="display:none"> + <div id="detach-form-container" class="fancybox-popup"> + <p> + Are you sure you want to detach this message? + </p> + <p> + Message Manager probably thinks this message is a reply because + it came in from a number to which we'd recently sent an outward reply. + </p> + <p> + If you detach the message, it will appear as a new, available message (instead of being a reply). + </p> + <form action="/dummy" id="detach-form" onsubmit="event.returnValue = false; return false;" method="post" accept-charset="utf-8"> + <div style="display:none;"> + <input type="hidden" name="_method" value="POST"> + </div> + <input type="hidden" name="msg_id" id="detach_msg_id"> + <div class="submit"> + <input id="detach-submit" type="submit" value="Detach Message"> + </div> + </form> + </div> + </div> + <div style="display:none"> <div id="mm-help" style="font-size:90%;"> <h2> Accessing Message Manager from FixMyBarangay (FMB)</h2> <h3> @@ -91,27 +114,57 @@ If you want to see any other messages, you'll need to have a manager or admin account on Message Manager: click on the <a href="[% c.config.MESSAGE_MANAGER_URL %]">admin</a> link to get there. </p> + <p> + [% IF global.is_fmb_creation_page %] + <h3> + Creating a new report from a message + </h3> + <p> + If you want to use a message to create a problem report, you'll need to select it first. Click on the radio button. When the message + is selected, it will go bright green. Now when you click on the map, the report will be used to create the report. + </p> + <p> + To stop two people replying to a message at the same time, if anyone else has just started working on it, you'll see a message + warning you, and you won't be able to select the radio button. Normally, if nobody works with a message, such a lock is released + after about 3 minutes. + </p> + [% ELSE %] + <p> + Click <strong>show messages for this report</strong> to see + the message (or messages) that contributed to this report. Often this will be a single message + if the problem was submitted by SMS. But it will also include any messages that have been + added as updates, as well as any replies that were sent back by barangay staff. + As well as letting you review the background to the report, this also lets you reply (for example, + to notify the original reporter that the problem has been fixed). + </p> + <h3> + Adding a message as an update to this report + </h3> + <p> + If you want to add this message's contents as an update to this report, you'll need to select it first. Click + on the radio button. When the message is selected, it will go bright green. Now when you click on the + <strong>COPY TO UPDATE</strong> button, the message text will be added to this report's update text. + You can edit the text before clicking <strong>POST</strong>. + </p> + [% END %] <h3> - Creating a new report from a message + <span class="demo_detach_btn">detach</span> Detaching a message ("not a reply") </h3> <p> - If you want to use a message to create a problem report, you'll need to select it first. Click on the radio button. When the message - is selected, it will go bright green. Now when you click on the map, the report will be used to create the report. - </p> - <p> - To stop two people replying to a message at the same time, if anyone else has just started working on it, you'll see a message - warning you, and you won't be able to select the radio button. Normally, if nobody works with a message, such a lock is released - after about 3 minutes. + Message Manager tries to notice when an incoming message is a reply. Sometimes it guesses wrong. To detach a + message from its parent — that is, to mark it as <em>not a reply</em>, hover over the message and click + <span class="demo_detach_btn">detach</span>. </p> + <h3> - Replying to a message + <span class="demo_reply_btn">reply</span> Replying to a message </h3> <p> You can send an SMS back to the original sender: just hover over the message and click <span class="demo_reply_btn">reply</span>. It will usually take a few minutes for the message to arrive. </p> <h3> - Getting message info + <span class="demo_info_btn">i</span> Getting message info </h3> <p> Hover over a message and click on its <span class="demo_info_btn">i</span> button to see when it was sent. @@ -119,7 +172,7 @@ actual number (instead the number is scrambled, but will be the <em>same scrambled number</em> on other messages they've sent). </p> <h3> - Hiding a message + <span class="demo_hide_btn">X</span> Hiding a message </h3> <p> If a message can't be used to create a report, you can hide it by hovering over it and clicking its <span class="demo_hide_btn">X</span> button. If you're not diff --git a/templates/web/fixmybarangay/header.html b/templates/web/fixmybarangay/header.html index 911a72022..06a8b71a1 100644 --- a/templates/web/fixmybarangay/header.html +++ b/templates/web/fixmybarangay/header.html @@ -11,23 +11,25 @@ <meta name="HandHeldFriendly" content="true"> <meta name="mobileoptimized" content="0"> - <link rel="stylesheet" href="[% version('/cobrands/fixmybarangay/base.css') %]"> - <link rel="stylesheet" href="[% version('/cobrands/fixmybarangay/layout.css') %]" media="(min-width:48em)"> +[% SET start = c.config.ADMIN_BASE_URL IF admin %] + + <link rel="stylesheet" href="[% start %][% version('/cobrands/fixmybarangay/base.css') %]"> + <link rel="stylesheet" href="[% start %][% version('/cobrands/fixmybarangay/layout.css') %]" media="(min-width:48em)"> [% extra_css %] <!--[if (lt IE 9) & (!IEMobile)]> - <link rel="stylesheet" href="[% version('/cobrands/fixmybarangay/layout.css') %]"> + <link rel="stylesheet" href="[% start %][% version('/cobrands/fixmybarangay/layout.css') %]"> <![endif]--> - <script src="[% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> - <script src="[% version('/cobrands/fixmybarangay/position_map.js') %]" charset="utf-8"></script> + <script src="[% start %][% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> + <script src="[% start %][% version('/cobrands/fixmybarangay/position_map.js') %]" charset="utf-8"></script> [% INCLUDE 'common_header_tags.html', site_title = 'FixMyBarangay', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] [% extra_js %] - [% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council); %] + [% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body); %] [% IF allow_creation %] - <link rel="stylesheet" href="[% version('/js/fancybox/jquery.fancybox-1.3.4.css') %]"> - <script src="[% version('/js/fancybox/jquery.fancybox-1.3.4.pack.js') %]" charset="utf-8"></script> - <script src="[% version('/cobrands/fixmybarangay/message_manager_client.js') %]" charset="utf-8"></script> + <link rel="stylesheet" href="[% start %][% version('/js/fancybox/jquery.fancybox-1.3.4.css') %]"> + <script src="[% start %][% version('/js/fancybox/jquery.fancybox-1.3.4.pack.js') %]" charset="utf-8"></script> + <script src="[% start %][% version('/cobrands/fixmybarangay/message_manager_client.js') %]" charset="utf-8"></script> <script> $(document).ready(function() { diff --git a/templates/web/fixmybarangay/report/_message_manager.html b/templates/web/fixmybarangay/report/_message_manager.html index 10f627a2e..3845feeef 100644 --- a/templates/web/fixmybarangay/report/_message_manager.html +++ b/templates/web/fixmybarangay/report/_message_manager.html @@ -1,10 +1,10 @@ -[% IF c.user && c.user.from_council %] +[% IF c.user && c.user.from_body %] -[% IF problem.external_source_id && problem.external_source == c.config.MESSAGE_MANAGER_URL %] +[% IF problem.external_source_id && problem.external_source == c.config.MESSAGE_MANAGER_URL %] <p class="mm-submitted-by-sms"> [%# OK to link to Message Manager here because (currently) we're only showing this to staff users %] - <a href="[%= problem.external_source %]messages/view/[%= problem.external_source_id %]" - title="view in Message Manager admin"><img + <a href="[%= problem.external_source %]messages/view/[%= problem.external_source_id %]" + title="view in Message Manager admin"><img src="/cobrands/fixmybarangay/images/mobile-22x40.png" alt="SMS"></a> This report was submitted via SMS. </p> @@ -41,7 +41,7 @@ <input name="mm-htauth-password" id="mm-htauth-password" type="password"/> </div> <div class="submit"> - <input id="available-submit" type="submit" value="Get available messages" class="green-btn"/> + <input id="available-submit" type="submit" value="Get available messages" class="green-btn"/> </div> </div> </li> @@ -49,47 +49,50 @@ <div id="mm-message-list" style="min-height:1em;"></div> </li> </ul> - + <script type="text/javascript"> $(document).ready(function() { var $mm_message_list = $('#mm-message-list'); var mm_url = "[% c.config.MESSAGE_MANAGER_URL %]"; // from config + + [%# note that the presence of a problem id implies that this is a report view page, not a problem creation page %] var problem_id = "[% problem.id %]"; + var dummy_busy = false; var fms_username = "[% c.user.email | replace('\@.*', '') %]"; var timeout_id = 0; var can_refresh = true; // disable refresh var refresh_period = 60000 * 3; // refresh messages every three minutes var has_archive_message = false; - + function sanitise_id(css_id) { - return css_id.replace(/\D/g, ""); + return css_id.replace(/\D/g, ""); } - + // call this to push the auto-refresh timeout off so it's only triggered // if there's no activity for a while function reset_timeout() { - if (refresh_period && can_refresh) { + if (mm_url && refresh_period && can_refresh) { if (timeout_id) { clearTimeout(timeout_id); } timeout_id = setTimeout(mm_refresh_messages, refresh_period); } } - + var mm_refresh_messages = function() { $('#mm-link-to-refresh').fadeOut(); $('#available-submit').click(); } - + var mm_populate_list = function(data) { $('#mm-status-message-container').find('p').text("Accessed Message Manager as " + data['username']); $('input[name=mm_text]').prop('checked', false); // uncheck all $('#mm-link-to-refresh').delay(2000).fadeIn(); reset_timeout(); } - + var mm_selected_message = function(data) { var msg_text = ""; var service_id = ""; @@ -105,71 +108,87 @@ $(document).ready(function() { $('#form_detail').val(msg_text); $('#external_source_id').val(service_id); } - - var dummy_reply_cleanup = function(data) { + + var reply_cleanup = function(data) { reset_timeout(); $('#reply_text').val(''); dummy_busy = false; mm_refresh_messages(); } - var dummy_hide_cleanup = function(data) { + var hide_cleanup = function(data) { reset_timeout(); $('#reason_text').val(''); dummy_busy = false; } - message_manager.config({url_root: mm_url, want_nice_msgs: true}); + var detach_cleanup = function(data) { + reset_timeout(); + dummy_busy = false; + mm_refresh_messages(); // refresh because detached message now appears in the list + } + + var custom_tooltips; + if (problem_id) { // this page is viewing, not creating + custom_tooltips = {tt_radio: "Select before clicking 'Copy to Update' to add this message as an update"}; + } + message_manager.config({ + url_root: mm_url, + tooltips: custom_tooltips, + want_nice_msgs: true + }); message_manager.setup_click_listener({callback:mm_selected_message}); // problem form hidden input "external_source_id": pass the MM id into FMS, if used var $problem_form = $('#problem_form').size()? $('#problem_form') : $('#form_update_form'); $('<input type="hidden"/>').attr({ - 'id': 'external_source_id', - 'name': 'external_source_id', - }).appendTo($problem_form); + 'id': 'external_source_id', + 'name': 'external_source_id', + }).appendTo($problem_form); $('#available-submit').click(function(e){ e.preventDefault(); reset_timeout(); message_manager.get_available_messages({ - callback: mm_populate_list, + callback: mm_populate_list, suggest_username: fms_username, fms_id: problem_id, anim_duration: 500 }); }); $('#available-submit').click(); - + $mm_message_list.on('mouseover', 'li.mm-msg', function(e){ e.stopPropagation(); // because replies are nested $('.mm-msg-action', $mm_message_list).stop().fadeOut(200); $(this).find('> .mm-msg-action').stop().show(); }); - + $('#mm-message-list').on('click', '.mm-info', function(e){ reset_timeout(); message_manager.show_info(sanitise_id($(this).parent().attr('id'))); }); - + $('#mm-hide-reasons').change(function(e){ - $('#reason_text').val($(this).val()); // load reason_text with boilerplate reason + $('#reason_text').val($(this).val()); // load reason_text with boilerplate reason }); $('#mm-boilerplate-replies').change(function(e){ - $('#reply_text').val($(this).val()); // load reason_text with boilerplate reason + var old_txt = $('#reply_text').val(); + var new_txt = $(this).val().replace(/(^\.\.\.|\.\.\.$)/, old_txt); + $('#reply_text').val(new_txt); // load reply_text with boilerplate reason }); - + $('#reply-submit').click(function(e) { e.preventDefault(); // TODO: pending fancybox callbacks working, force dummy_busy here - // this is possibly overly cautious anyway - dummy_busy = false; + // this is possibly overly cautious anyway + dummy_busy = false; if (! dummy_busy) { dummy_busy = true; message_manager.reply( - $('#reply_to_msg_id').val(), - $('#reply_text').val(), - {callback:dummy_reply_cleanup}); + $('#reply_to_msg_id').val(), + $('#reply_text').val(), + {callback:reply_cleanup}); } }); @@ -177,17 +196,27 @@ $(document).ready(function() { e.preventDefault(); reset_timeout(); // TODO: pending fancybox callbacks working, force dummy_busy here - // this is possibly overly cautious anyway - dummy_busy = false; + // this is possibly overly cautious anyway + dummy_busy = false; if (! dummy_busy) { dummy_busy = true; message_manager.hide( - $('#hide_msg_id').val(), - $('#reason_text').val(), - {callback:dummy_hide_cleanup}); + $('#hide_msg_id').val(), + $('#reason_text').val(), + {callback:hide_cleanup}); + } + }); + + $('#detach-submit').click(function(e) { + e.preventDefault(); + if (! dummy_busy) { + dummy_busy = true; + message_manager.mark_as_not_a_reply( + $('#detach_msg_id').val(), + {callback:detach_cleanup}); } }); - + $("a#reply").fancybox({onClosed: function(){dummy_busy=false;}}); // only show on problem display page @@ -209,7 +238,7 @@ $(document).ready(function() { $('#external_source_id').val(id); $('#form_update').val( $(this).val() ); $('#form_update_form').on('submit', function(e) { - message_manager.assign_fms_id( $('#external_source_id').val(), problem_id, { 'is_async': false } ); + message_manager.assign_fms_id( $('#external_source_id').val(), problem_id, { 'is_async': false } ); }); }); }); @@ -223,9 +252,9 @@ $(document).ready(function() { $('#show_messages').val('Show Messages'); $('#copy_to_update').stop(true,true).fadeOut(); } - + }); - + $('#mm-link-to-refresh').on('click', function(e) { e.preventDefault(); mm_refresh_messages(); @@ -250,8 +279,8 @@ $(document).ready(function() { .attr('title', 'show all available messages (for adding updates)'); $('#mm-link-to-toggle-archive').fadeIn(); can_refresh = false; - }) - }); + }) + }); } else { $('.mm-archive', $mm_message_list).stop(true,true).slideUp(1000, function(){ message_manager.say_status("Available messages:"); @@ -264,19 +293,20 @@ $(document).ready(function() { $('.mm-empty', $mm_message_list).stop(true,true).fadeIn(); can_refresh = true; reset_timeout(); - }) - }); + }) + }); } }); - + $("a#mm-link-to-help").fancybox(); message_manager.populate_boilerplate_strings('hide-reason'); - message_manager.populate_boilerplate_strings('reply'); + message_manager.populate_boilerplate_strings('reply'); }); </script> [% global.want_fmb_hidden_dialogs = 1 %] +[% global.is_fmb_creation_page = problem.id? 0 : 1 %] [% END %] diff --git a/templates/web/fixmybarangay/report/new/councils_text.html b/templates/web/fixmybarangay/report/new/councils_text.html index 24c54ea50..0001b0e68 100644 --- a/templates/web/fixmybarangay/report/new/councils_text.html +++ b/templates/web/fixmybarangay/report/new/councils_text.html @@ -1,5 +1,5 @@ <p> The information provided here will be displayed publicly on the site as well as being sent to the -relevant authority (DPWH, DEPW, or DPS). If you select the Fix Locally category then the -information will not be sent anywhere. +relevant authority (DPWH, DEPW, or DPS). +If you select a "bgy. will fix" category, then your report will be emailed to the barangay team. </p> diff --git a/templates/web/fixmybarangay/reports/index.html b/templates/web/fixmybarangay/reports/index.html new file mode 100755 index 000000000..984e0d472 --- /dev/null +++ b/templates/web/fixmybarangay/reports/index.html @@ -0,0 +1,42 @@ +[% INCLUDE 'header.html', title = loc('Summary reports'), bodyclass => 'fullwidthpage' %] + +<h1>[% loc('All Reports') %]</h1> + +<div class="intro"> +<p> +[% loc('This is a summary of all reports on this site; select a particular barangay to see the reports sent there.') %] + +</p> +</div> + +<table cellpadding="3" cellspacing="1" border="0" class="nicetable"> +<thead> +<tr> +<th class="title">[% loc('Name') %]</th> +<th class="data">[% loc('New <br>problems') %]</th> +<th class="data">[% loc('Older <br>problems') %]</th> +<th class="data">[% loc('Old / unknown <br>problems') %]</th> +<th class="data">[% loc('Recently <br>fixed') %]</th> +<th class="data">[% loc('Older <br>fixed') %]</th> +</tr> +</thead> + +<tbody> +[% FOREACH body IN bodies %] +<tr align="center" +[%- IF ! (loop.count % 2) %] class="a" +[%- END %]> +<td class="title"><a href="[% body.url(c) %]">[% body.name %]</a></td> +<td class="data">[% open.${body.id}.new or 0 %]</td> +<td class="data">[% open.${body.id}.older or 0 %]</td> +<td class="data">[% open.${body.id}.unknown or 0 %]</td> +<td class="data">[% fixed.${body.id}.new or 0 %]</td> +<td class="data">[% fixed.${body.id}.old or 0 %]</td> +</tr> +[% TRY %][% PROCESS "reports/_extras.html" %][% CATCH file %][% END %] +[% END %] +</tbody> +</table> + + +[% INCLUDE 'footer.html', pagefooter = 'yes' %] |