aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm
blob: 194556e720ca12103deb6c74d70bbace3e1ecfd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package FixMyStreet::Cobrand::FixMyBarangay;
use base 'FixMyStreet::Cobrand::Default';

use strict;
use warnings;

sub country {
    return 'PH';
}

sub language_domain { 'FixMyBarangay' }

sub area_types {
    return [ 'BGY' ];
}

sub disambiguate_location {
    return {
        country => 'ph',
        bing_country => 'Philippines',
    };
}

sub only_authed_can_create {
    return 1;
}

# effectively allows barangay staff to hide reports
sub council_id { return   '1,2' ; }

sub areas_on_around {
    return [ 1, 2 ];
}

sub can_support_problems {
    return 1;
}

sub default_show_name {
    my $self = shift;

    return 0 if $self->{c}->user->from_council;
    return 1;
}

# makes no sense to send questionnaires since FMB's reporters are mostly staff
sub send_questionnaires {
    return 0;
}

# let staff hide reports in their own barangay
sub users_can_hide { 1 }

1;