diff options
-rw-r--r-- | perllib/FixMyStreet/SendReport/Open311.pm | 14 | ||||
-rwxr-xr-x | templates/web/fixmybarangay/reports/index.html | 21 |
2 files changed, 28 insertions, 7 deletions
diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm index efd172640..93b96ce00 100644 --- a/perllib/FixMyStreet/SendReport/Open311.pm +++ b/perllib/FixMyStreet/SendReport/Open311.pm @@ -133,9 +133,17 @@ sub send { $row->external_id( $resp ); $row->send_method_used('Open311'); if ($row->cobrand eq 'fixmybarangay') { - # currently the only external body using Open311 is DPS - # (this will change when we have 'body' logic in place, meanwhile: hardcoded) - $row->external_body("DPS"); + # FixMyBarangay: currently the external bodies using Open311 are DPS, DEPW, DPWH + # for now identify the latter two by their name in the service_code ($contact->email) + # So: this works because we are anticipating the service codes for (e.g., potholes) look + # like this: + # POTDEPW or POTDPWH + # (TODO: this will change when we have 'body' logic in place, meanwhile: hardcoded) + if ($contact->email =~ /(DEPW|DPWH)$/i) { + $row->external_body(uc $1); # body is DEPW (city roads) or DPWH (national roads) + } else { + $row->external_body("DPS"); # only other open311 dept is DPS + } } $result *= 0; $self->success( 1 ); diff --git a/templates/web/fixmybarangay/reports/index.html b/templates/web/fixmybarangay/reports/index.html index e46d578ec..2d8da17c6 100755 --- a/templates/web/fixmybarangay/reports/index.html +++ b/templates/web/fixmybarangay/reports/index.html @@ -7,10 +7,6 @@ [% loc('This is a summary of all reports on this site; select a particular barangay to see the reports sent there.') %] </p> -<p> - [%# (this will change when we have 'body' logic in place, meanwhile: hardcoded) %] - See also the <a href="/reports/dps">map of DPS reports</a>. -</p> </div> <table cellpadding="3" cellspacing="1" border="0" class="nicetable"> @@ -43,4 +39,21 @@ </tbody> </table> + +<p> +[%# (this will change when we have 'body' logic in place, meanwhile: hardcoded) %] +See also the maps of reports submitted to these departments: +</p> +<ul> +<li> +<a href="/reports/depw" title="Department of Engineering and Public Works">DEPW</a> — city road maintenance +</li> +<li> +<a href="/reports/dps" title="Department of Public Services">DPS</a> — streetlight maintenance +</li> +<li> +<a href="/reports/dpwh" title="Department of Public Works and Highways">DPWH</a> — national road maintenance +</li> +</ul> +</p> [% INCLUDE 'footer.html', pagefooter = 'yes' %] |