aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/Cobrand')
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm10
-rw-r--r--perllib/FixMyStreet/Cobrand/ZeroTB.pm61
2 files changed, 71 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index 2de3eae5f..d2af4949e 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -829,6 +829,16 @@ sub show_unconfirmed_reports {
0;
}
+=head2 never_confirm_updates
+
+If true then we never send an email to confirm an update
+
+=cut
+
+sub never_confirm_updates { 0; }
+
+sub include_time_in_update_alerts { 0; }
+
=head2 prettify_dt
my $date = $c->prettify_dt( $datetime );
diff --git a/perllib/FixMyStreet/Cobrand/ZeroTB.pm b/perllib/FixMyStreet/Cobrand/ZeroTB.pm
new file mode 100644
index 000000000..087bf0912
--- /dev/null
+++ b/perllib/FixMyStreet/Cobrand/ZeroTB.pm
@@ -0,0 +1,61 @@
+package FixMyStreet::Cobrand::ZeroTB;
+use base 'FixMyStreet::Cobrand::Default';
+
+use strict;
+use warnings;
+
+sub site_title { return 'ZeroTB'; }
+
+sub enter_postcode_text { return _ ('Enter a nearby street name and area, postal code or district in Delhi'); }
+
+sub country {
+ return 'IN';
+}
+
+sub languages { [ 'en-gb,English,en_GB' ] }
+sub language_override { 'en-gb' }
+
+sub disambiguate_location {
+ return {
+ country => 'in',
+ town => 'Delhi',
+ bounds => [ 28.404625000000024, 76.838845800000072, 28.884380600000028, 77.347877500000067 ],
+ };
+}
+
+sub only_authed_can_create { return 1; }
+sub allow_photo_display { return 0; }
+sub allow_photo_upload{ return 0; }
+sub send_questionnaires { return 0; }
+sub on_map_default_max_pin_age { return 0; }
+sub never_confirm_updates { 1; }
+sub include_time_in_update_alerts { 1; }
+
+sub pin_colour {
+ return 'clinic';
+}
+
+sub path_to_pin_icons {
+ return '/cobrands/zerotb/images/';
+}
+
+sub get_clinic_list {
+ my $self = shift;
+
+ return $self->problems->search({ state => 'confirmed' }, { order_by => 'title' });
+}
+
+sub prettify_dt {
+ my ( $self, $dt, $type ) = @_;
+ $type ||= '';
+
+ if ( $type eq 'alert' ) {
+ return $dt->strftime('%H:%M %Y-%m-%d');
+ } else {
+ return Utils::prettify_dt( $dt, $type );
+ }
+
+}
+
+1;
+