aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlouise <louise>2009-12-02 12:09:36 +0000
committerlouise <louise>2009-12-02 12:09:36 +0000
commit274e351f53349f729b3f54dba63974bfb1905af9 (patch)
tree069c6dc13f1eb134589bafffb30cf65eaa492747
parentc5b3041e1fe47bdff28a5828931b0cb81f20d8fd (diff)
Allow cobrands to generate the html for a list of alert options
-rw-r--r--perllib/Cobrand.pm20
1 files changed, 19 insertions, 1 deletions
diff --git a/perllib/Cobrand.pm b/perllib/Cobrand.pm
index 9e6310ea8..534ddc74f 100644
--- a/perllib/Cobrand.pm
+++ b/perllib/Cobrand.pm
@@ -7,7 +7,7 @@
# Copyright (c) 2009 UK Citizens Online Democracy. All rights reserved.
# Email: louise@mysociety.org. WWW: http://www.mysociety.org
#
-# $Id: Cobrand.pm,v 1.46 2009-11-25 18:27:25 louise Exp $
+# $Id: Cobrand.pm,v 1.47 2009-12-02 12:09:36 louise Exp $
package Cobrand;
use strict;
@@ -209,6 +209,24 @@ sub contact_email {
return get_cobrand_conf($cobrand, 'CONTACT_EMAIL');
}
+=item alert_list_options COBRAND Q OPTIONS
+
+Return HTML for a list of alert options for the cobrand.
+
+=cut
+sub alert_list_options {
+ my ($cobrand, $q, @options) = @_;
+ my $handle;
+ if ($cobrand){
+ $handle = cobrand_handle($cobrand);
+ }
+ if ( !$cobrand || !$handle || ! $handle->can('alert_list_options')){
+ return 0;
+ }{
+ return $handle->alert_list_options($q, @options);
+ }
+}
+
=item get_cobrand_conf COBRAND KEY
Get the value for KEY from the config file for COBRAND