diff options
Diffstat (limited to 'perllib/FixMyStreet/Cobrand')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 18 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FixMyStreet.pm | 7 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/UKCouncils.pm | 10 |
3 files changed, 35 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 4dc024d48..ee71f583f 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -32,6 +32,24 @@ sub path_to_web_templates { return $paths; } +=head1 path_to_email_templates + + $path = $cobrand->path_to_email_templates( ); + +Returns the path to the email templates for this cobrand - by default +"templates/email/$moniker" (and then default in Email.pm). + +=cut + +sub path_to_email_templates { + my ( $self, $lang_code ) = @_; + my $paths = [ + FixMyStreet->path_to( 'templates', 'email', $self->moniker, $lang_code )->stringify, + FixMyStreet->path_to( 'templates', 'email', $self->moniker )->stringify, + ]; + return $paths; +} + =head1 country Returns the country that this cobrand operates in, as an ISO3166-alpha2 code. diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm index c8c1eef66..d3de9da3a 100644 --- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm +++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm @@ -10,6 +10,13 @@ sub path_to_web_templates { FixMyStreet->path_to( 'templates/web/fixmystreet.com' )->stringify, ]; } +sub path_to_email_templates { + my ( $self, $lang_code ) = @_; + return [ + FixMyStreet->path_to( 'templates', 'email', 'fixmystreet.com')->stringify, + ]; +} + # FixMyStreet should return all cobrands sub restriction { diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm index 0321e0297..d9e8f8673 100644 --- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm +++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm @@ -21,6 +21,16 @@ sub path_to_web_templates { ]; } +sub path_to_email_templates { + my ( $self, $lang_code ) = @_; + my $paths = [ + FixMyStreet->path_to( 'templates', 'email', $self->moniker, $lang_code )->stringify, + FixMyStreet->path_to( 'templates', 'email', $self->moniker )->stringify, + FixMyStreet->path_to( 'templates', 'email', 'fixmystreet.com')->stringify, + ]; + return $paths; +} + sub site_key { my $self = shift; return $self->council_url; |