diff options
author | Dave Whiteland <dave@mysociety.org> | 2012-10-03 17:47:25 +0100 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2012-10-03 17:47:25 +0100 |
commit | 272dba7ce6d59d81b52579dd4c5fc7d65e9bec20 (patch) | |
tree | cabbefec7823061781050ffb002a38ce53d68f56 | |
parent | 39c1b648b30e67ceb8912a35b386eb4ee23857b8 (diff) | |
parent | f16a3e96b65394089d10c46c1d67cf82c67e72dd (diff) |
Merge branch 'fmb-read-only'
Conflicts:
db/schema.sql
perllib/FixMyStreet/DB/Result/Contact.pm
perllib/FixMyStreet/DB/Result/Problem.pm
73 files changed, 2037 insertions, 250 deletions
diff --git a/.gitignore b/.gitignore index 5f56f9b27..fac10af58 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ tags *.mo FixMyStreet-EmptyHomes.po +FixMyBarangay.po /web/cobrands/fiksgatami/css.css /web/cobrands/southampton/css.css @@ -26,6 +27,7 @@ FixMyStreet-EmptyHomes.po /web/cobrands/default/*.css /web/cobrands/fixmystreet/*.css /web/cobrands/bromley/*.css +/web/cobrands/fixmybarangay/*.css /web/cobrands/barnet/*.css /web/cobrands/zurich/*.css /web/photo diff --git a/bin/gettext-extract b/bin/gettext-extract index 55623e86c..6bae8aa36 100755 --- a/bin/gettext-extract +++ b/bin/gettext-extract @@ -31,23 +31,27 @@ rm -f $PO xgettext.pl --gnu-gettext --verbose --output $PO --plugin perl=* --plugin tt2 --directory perllib --directory templates/web --directory db --directory bin # Fix headers -TEMP=`tempfile` +# no such thing as tempfile on OS X +TEMP=`tempfile 2>/dev/null || mktemp /tmp/gettext-extract.XXXXXX` NOW=`date +"%Y-%m-%d %H:%M%z"` +# strictly POSIX sed on e.g. OS X doesn't let you used \n in replacements so we do this +nl=$'\n'; cat $PO | sed " s/SOME DESCRIPTIVE TITLE/FixMyStreet original .po file, autogenerated by gettext-extract/; s/YEAR THE PACKAGE'S COPYRIGHT HOLDER/2011 UK Citizens Online Democracy/; s/PACKAGE package/main FixMyStreet code/; s/FIRST AUTHOR <EMAIL@ADDRESS>, YEAR./Matthew Somerville <matthew@mysociety.org>, 2011-06-03./; - s/PACKAGE VERSION/1.0\\\n\"\n\"Report-Msgid-Bugs-To: matthew@mysociety.org/; + s/PACKAGE VERSION/1.0\\\n\"\\$nl\"Report-Msgid-Bugs-To: matthew@mysociety.org/; s/POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE/POT-Creation-Date: $NOW/; s/LL@li.org/team@fixmystreet.com/; s/charset=CHARSET/charset=UTF-8/; - s/8bit/8bit\\\n\"\n\"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;/; + s/8bit/8bit\\\n\"\\$nl\"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;/; " >> $TEMP mv $TEMP $PO echo "$( bin/gettext-nget-patch )" >> $PO -bin/make_emptyhomes_po +bin/make_po FixMyStreet-EmptyHomes +bin/make_po FixMyBarangay diff --git a/bin/gettext-nget-patch b/bin/gettext-nget-patch index 223bcc816..eadc46d0e 100755 --- a/bin/gettext-nget-patch +++ b/bin/gettext-nget-patch @@ -9,6 +9,7 @@ my %out; find( sub { next unless -f; + next if $File::Find::name =~ /ttc$/; open (FP, $_) or die $!; while (<FP>) { next unless /nget/; diff --git a/bin/make_css b/bin/make_css index 9d033b5dc..175440bb4 100755 --- a/bin/make_css +++ b/bin/make_css @@ -14,14 +14,14 @@ DIRECTORY=$(cd `dirname $0`/../web && pwd) # FixMyStreet uses compass -compass compile --output-style compressed $DIRECTORY/cobrands/fixmystreet -compass compile --output-style compressed $DIRECTORY/cobrands/bromley -compass compile --output-style compressed $DIRECTORY/cobrands/barnet -compass compile --output-style compressed $DIRECTORY/cobrands/zurich -compass compile --output-style compressed $DIRECTORY/cobrands/default +NEWSTYLE="fixmystreet bromley fixmybarangay barnet zurich default" +NEWSTYLE_REGEX=${NEWSTYLE// /\\|} +for site in $NEWSTYLE; do + compass compile --output-style compressed $DIRECTORY/cobrands/$site +done # The rest are plain sass -for scss in `find $DIRECTORY -name "*.scss" -exec dirname {} \; | uniq | grep -v "cobrands/\(fixmystreet\|bromley\|barnet\|default\|zurich\)"` +for scss in `find $DIRECTORY -name "*.scss" -exec dirname {} \; | uniq | grep -v "cobrands/\($NEWSTYLE_REGEX\)"` do sass --scss --update --style compressed $scss done diff --git a/bin/make_emptyhomes_po b/bin/make_po index 10e840599..76dc4566b 100755 --- a/bin/make_emptyhomes_po +++ b/bin/make_po @@ -1,8 +1,8 @@ #!/usr/bin/perl -w use strict; -# Generates EmptyHomes version of .po file, which is a translation -# into a language the same as English, only "problem" becomes "empty property". +# Generates a version of .po file, which is a translation +# into a language the same as English, with replacement as specified in PoChange use POSIX; use FindBin; @@ -13,14 +13,16 @@ chdir("$FindBin::Bin/../locale"); mkdir("en_GB.UTF-8"); mkdir("en_GB.UTF-8/LC_MESSAGES"); +my $pofile = shift; + open(MAINPO, "FixMyStreet.po") or die ""; -open(EHAPO, ">FixMyStreet-EmptyHomes.po") or die ""; -open(NEWPO, ">en_GB.UTF-8/LC_MESSAGES/FixMyStreet-EmptyHomes.po") or die ""; +open(EHAPO, ">$pofile.po") or die ""; +open(NEWPO, ">en_GB.UTF-8/LC_MESSAGES/$pofile.po") or die ""; -print NEWPO "# AUTOMATICALLY GENERATED by make_emptyhomes_po, do not edit\n"; +print NEWPO "# AUTOMATICALLY GENERATED by make_po, do not edit\n"; print NEWPO "#\n"; -print EHAPO "# AUTOMATICALLY GENERATED by make_emptyhomes_po, do not edit\n"; +print EHAPO "# AUTOMATICALLY GENERATED by make_po, do not edit\n"; print EHAPO "#\n"; my $buffer = ""; @@ -30,7 +32,7 @@ while(<MAINPO>) { s/#, fuzzy/#/; } if (m/"Last-Translator: FULL NAME/) { - $_ = '"Last-Translator: mysociety/bin/make_emptyhomes_po\\n"'."\n"; + $_ = '"Last-Translator: mysociety/bin/make_po\\n"'."\n"; } if (m/"PO-Revision-Date: YEAR-MO-DA/) { my $time = POSIX::strftime("%Y-%m-%d %H:%M%z", localtime(time())); @@ -56,7 +58,7 @@ while(<MAINPO>) { } elsif ($start && (m/^msgstr ""/ || m/^msgstr\[0\] ""/)) { # start of translated text - translate English into Empty Homes language - $buffer = PoChange::fixmystreet_to_reportemptyhomes($buffer); + $buffer = PoChange::translate($pofile, $buffer); print EHAPO $buffer; diff --git a/conf/crontab.ugly b/conf/crontab.ugly index 3eeffa791..399b520bb 100644 --- a/conf/crontab.ugly +++ b/conf/crontab.ugly @@ -22,7 +22,7 @@ MAILTO=!!(*= $user *)!!@mysociety.org #2 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-alerts.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-alerts" || echo "stalled?" 0,30 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-questionnaires.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-questionnaires" || echo "stalled?" -!!(* } elsif (($vhost eq 'www.fixmystreet.com') || ($vhost eq 'bromley.test.mysociety.org') || ($vhost eq 'integration-staging.fixmystreet.com')) { *)!! +!!(* } elsif (($vhost eq 'www.fixmystreet.com') || ($vhost eq 'bromley.test.mysociety.org') || ($vhost eq 'integration-staging.fixmystreet.com') || ($vhost eq 'fixmybarangay.test.mysociety.org')) { *)!! 5,10,15,20,25,30,35,40,45,50,55 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports" || echo "stalled?" 0 0-8,10,11,13,14,16,17,19-23 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports" || echo "stalled?" 0 9,12,15,18 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports --verbose" || echo "stalled?" diff --git a/conf/general.yml-example b/conf/general.yml-example index fd9ecad21..b826dd89d 100644 --- a/conf/general.yml-example +++ b/conf/general.yml-example @@ -127,9 +127,12 @@ GAZE_URL: 'http://gaze.mysociety.org/gaze' # Should problem reports link to the council summary pages? AREA_LINKS_FROM_PROBLEMS: '0' -# Used to override the STAGING SERVER safety mechanism in send-reports +# used to override the STAGING SERVER safety mechanism in send-reports TESTING_COUNCILS: '' +# if you're using Message Manager, include the URL here (see https://github.com/mysociety/message-manager/) +MESSAGE_MANAGER_URL: '' + # ----------------------------------------------------------------------- # fixmystreet.com specific config variables. You won't need any of these. @@ -139,4 +142,3 @@ LONDON_REPORTIT_KEY: '' LONDON_REPORTIT_SECRET: '' AUTH_SHARED_SECRET: '' HEARFROMYOURMP_BASE_URL: '' - diff --git a/db/schema.sql b/db/schema.sql index 6e9396f45..1f0d0d4c3 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -85,6 +85,12 @@ create table contacts ( -- for things like missed bin collections non_public boolean default 'f' + + -- per contact endpoint configuration + endpoint text, + jurisdiction text default '', + api_key text default '', + send_method text ); create unique index contacts_area_id_category_idx on contacts(area_id, category); @@ -205,6 +211,13 @@ create table problem ( -- for things like missed bin collections non_public BOOLEAN default 'f' + + -- record details about messages from external sources, eg. message manager + external_source text, + external_source_id text, + + -- number of me toos + interest_count integer ); create index problem_state_latitude_longitude_idx on problem(state, latitude, longitude); create index problem_user_id_idx on problem ( user_id ); @@ -444,5 +457,6 @@ create table open311conf ( send_method text, send_comments boolean not null default 'f', comment_user_id int references users(id), - suppress_alerts boolean not null default 'f' + suppress_alerts boolean not null default 'f', + can_be_devolved boolean not null default 'f' ); diff --git a/db/schema_0021-add_external_source_columns_to_problem.sql b/db/schema_0021-add_external_source_columns_to_problem.sql new file mode 100644 index 000000000..a74bcce7d --- /dev/null +++ b/db/schema_0021-add_external_source_columns_to_problem.sql @@ -0,0 +1,8 @@ +begin; + +ALTER table problem + ADD column external_source TEXT; +ALTER table problem + ADD column external_source_id TEXT; + +commit; diff --git a/db/schema_0022-add_interest_count_to_problems.sql b/db/schema_0022-add_interest_count_to_problems.sql new file mode 100644 index 000000000..62092aa0a --- /dev/null +++ b/db/schema_0022-add_interest_count_to_problems.sql @@ -0,0 +1,6 @@ +begin; + +ALTER table problem + ADD COLUMN interest_count integer; + +commit; diff --git a/db/schema_0023-add_can_be_devolved_and_category_config.sql b/db/schema_0023-add_can_be_devolved_and_category_config.sql new file mode 100644 index 000000000..6eba0919a --- /dev/null +++ b/db/schema_0023-add_can_be_devolved_and_category_config.sql @@ -0,0 +1,13 @@ +begin; + +ALTER table open311conf + ADD column can_be_devolved BOOL NOT NULL DEFAULT 'f'; + +ALTER table contacts + ADD column endpoint TEXT, + ADD column jurisdiction TEXT DEFAULT '', + ADD column api_key TEXT DEFAULT '', + ADD column send_method TEXT +; + +commit; diff --git a/locale/FixMyStreet.po b/locale/FixMyStreet.po index e5d9ef692..eb856b1cb 100644 --- a/locale/FixMyStreet.po +++ b/locale/FixMyStreet.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 1.0\n" "Report-Msgid-Bugs-To: matthew@mysociety.org\n" -"POT-Creation-Date: 2012-08-21 09:54+0100\n" +"POT-Creation-Date: 2012-09-25 15:33+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <team@fixmystreet.com>\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: perllib/FixMyStreet/DB/Result/Problem.pm:555 perllib/FixMyStreet/DB/ResultSet/Problem.pm:337 +#: perllib/FixMyStreet/DB/Result/Problem.pm:561 perllib/FixMyStreet/DB/ResultSet/Problem.pm:337 msgid " and " msgstr "" @@ -77,6 +77,10 @@ msgstr "" msgid "%d questionnaires sent – %d answered (%s%%)" msgstr "" +#: templates/web/fixmybarangay/report/_support.html:3 +msgid "%d supporters" +msgstr "" + #: perllib/Utils.pm:292 msgid "%d week" msgstr "" @@ -89,23 +93,23 @@ msgstr "" msgid "%s - Summary reports" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:605 +#: perllib/FixMyStreet/DB/Result/Problem.pm:611 msgid "%s ref: %s" msgstr "" -#: perllib/FixMyStreet/Cobrand/UK.pm:288 perllib/FixMyStreet/Cobrand/UK.pm:300 +#: perllib/FixMyStreet/Cobrand/UK.pm:280 perllib/FixMyStreet/Cobrand/UK.pm:292 msgid "%s ward, %s" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:488 +#: perllib/FixMyStreet/DB/Result/Problem.pm:494 msgid "%s, reported anonymously at %s" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:490 +#: perllib/FixMyStreet/DB/Result/Problem.pm:496 msgid "%s, reported by %s at %s" msgstr "" -#: perllib/FixMyStreet/Cobrand/UK.pm:315 perllib/FixMyStreet/Cobrand/UK.pm:327 +#: perllib/FixMyStreet/Cobrand/UK.pm:307 perllib/FixMyStreet/Cobrand/UK.pm:319 msgid "%s, within %s ward" msgstr "" @@ -137,7 +141,7 @@ msgstr "" msgid "(fixed)" msgstr "" -#: templates/web/default/index.html:12 templates/web/default/index.html:8 templates/web/fixmystreet/around/postcode_form.html:7 +#: templates/web/default/index.html:12 templates/web/default/index.html:8 templates/web/fixmystreet/around/postcode_form.html:10 msgid "(like graffiti, fly tipping, broken paving slabs, or street lighting)" msgstr "" @@ -165,11 +169,11 @@ msgstr "" msgid "*unknown*" msgstr "" -#: perllib/FixMyStreet/App/Controller/Report/New.pm:629 perllib/FixMyStreet/App/Controller/Report/New.pm:655 perllib/FixMyStreet/DB/Result/Problem.pm:345 +#: perllib/FixMyStreet/App/Controller/Report/New.pm:629 perllib/FixMyStreet/App/Controller/Report/New.pm:655 perllib/FixMyStreet/DB/Result/Problem.pm:351 msgid "-- Pick a category --" msgstr "" -#: perllib/FixMyStreet/App/Controller/Report/New.pm:609 perllib/FixMyStreet/DB/Result/Problem.pm:351 +#: perllib/FixMyStreet/App/Controller/Report/New.pm:609 perllib/FixMyStreet/DB/Result/Problem.pm:357 msgid "-- Pick a property type --" msgstr "" @@ -177,6 +181,10 @@ msgstr "" msgid ". You can <a href=\"%s%s\">view the problem on this site</a>." msgstr "" +#: templates/web/fixmybarangay/report/_support.html:3 +msgid "1 supporter" +msgstr "" + #: templates/web/default/questionnaire/completed.html:20 msgid "<p style=\"font-size:150%\">Thank you very much for filling in our questionnaire; glad to hear it’s been fixed.</p>" msgstr "" @@ -249,15 +257,15 @@ msgstr "" msgid "<strong>%d</strong> live problems" msgstr "" -#: templates/web/fixmystreet/report/new/fill_in_details_form.html:172 +#: templates/web/fixmystreet/report/new/fill_in_details_form.html:176 msgid "<strong>No</strong> Let me confirm my report by email" msgstr "" -#: templates/web/fixmystreet/report/display.html:148 +#: templates/web/fixmystreet/report/display.html:153 msgid "<strong>No</strong> Let me confirm my update by email" msgstr "" -#: templates/web/fixmystreet/auth/general.html:46 +#: templates/web/fixmystreet/auth/general.html:50 msgid "<strong>No</strong> let me sign in by email" msgstr "" @@ -273,7 +281,7 @@ msgstr "" msgid "<strong>No</strong>, let me confirm my update by email:" msgstr "" -#: templates/web/default/auth/general.html:37 templates/web/default/report/display.html:142 templates/web/default/report/new/fill_in_details_form.html:140 templates/web/fixmystreet/auth/general.html:32 templates/web/fixmystreet/auth/general.html:34 templates/web/fixmystreet/report/display.html:131 templates/web/fixmystreet/report/new/fill_in_details_form.html:154 +#: templates/web/default/auth/general.html:37 templates/web/default/report/display.html:142 templates/web/default/report/new/fill_in_details_form.html:140 templates/web/fixmystreet/auth/general.html:36 templates/web/fixmystreet/auth/general.html:38 templates/web/fixmystreet/report/display.html:136 templates/web/fixmystreet/report/new/fill_in_details_form.html:158 msgid "<strong>Yes</strong> I have a password" msgstr "" @@ -301,7 +309,7 @@ msgstr "" msgid "Alert %d disabled (created %s)" msgstr "" -#: templates/web/bromley/report/display.html:207 templates/web/default/report/display.html:214 templates/web/fixmystreet/report/display.html:189 +#: templates/web/bromley/report/display.html:207 templates/web/default/report/display.html:214 templates/web/fixmystreet/report/display.html:194 msgid "Alert me to future updates" msgstr "" @@ -317,7 +325,7 @@ msgstr "" msgid "All confirmed" msgstr "" -#: templates/web/barnet/footer.html:20 templates/web/bromley/footer.html:21 templates/web/bromley/header.html:77 templates/web/default/footer.html:11 templates/web/fiksgatami/footer.html:7 templates/web/fiksgatami/nn/footer.html:7 templates/web/fixmystreet/footer.html:49 templates/web/reading/footer.html:8 +#: templates/web/barnet/footer.html:20 templates/web/bromley/footer.html:21 templates/web/bromley/header.html:77 templates/web/default/footer.html:11 templates/web/fiksgatami/footer.html:7 templates/web/fiksgatami/nn/footer.html:7 templates/web/fixmybarangay/footer.html:18 templates/web/fixmystreet/footer.html:49 templates/web/reading/footer.html:8 msgid "All reports" msgstr "" @@ -385,11 +393,11 @@ msgstr "" msgid "By Date" msgstr "" -#: templates/web/fixmystreet/around/display_location.html:80 templates/web/fixmystreet/around/display_location.html:82 +#: templates/web/fixmystreet/around/display_location.html:84 templates/web/fixmystreet/around/display_location.html:86 msgid "Can't see the map? <a href='%s' rel='nofollow'>Skip this step</a>" msgstr "" -#: perllib/FixMyStreet/App/Controller/Report/New.pm:632 perllib/FixMyStreet/App/Controller/Report/New.pm:657 templates/web/bromley/report/new/fill_in_details_form.html:68 templates/web/default/admin/council_contacts.html:35 templates/web/default/admin/index.html:36 templates/web/default/admin/list_flagged.html:14 templates/web/default/admin/search_reports.html:17 templates/web/fixmystreet/report/new/fill_in_details_form.html:72 +#: perllib/FixMyStreet/App/Controller/Report/New.pm:632 perllib/FixMyStreet/App/Controller/Report/New.pm:657 templates/web/bromley/report/new/fill_in_details_form.html:68 templates/web/default/admin/council_contacts.html:35 templates/web/default/admin/index.html:36 templates/web/default/admin/list_flagged.html:14 templates/web/default/admin/search_reports.html:17 templates/web/fixmystreet/report/new/fill_in_details_form.html:74 msgid "Category" msgstr "" @@ -409,15 +417,15 @@ msgstr "" msgid "Change Password" msgstr "" -#: templates/web/fixmystreet/around/display_location.html:72 templates/web/fixmystreet/around/display_location.html:73 +#: templates/web/fixmystreet/around/display_location.html:78 msgid "Click map to report a problem" msgstr "" -#: templates/web/bromley/report/display.html:80 templates/web/bromley/report/display.html:82 templates/web/default/admin/report_edit.html:18 templates/web/default/admin/report_edit.html:20 templates/web/default/dashboard/index.html:136 templates/web/default/dashboard/index.html:138 templates/web/default/report/display.html:79 templates/web/default/report/display.html:81 templates/web/fixmystreet/report/banner.html:15 templates/web/fixmystreet/report/display.html:74 templates/web/fixmystreet/report/display.html:76 +#: templates/web/bromley/report/display.html:80 templates/web/bromley/report/display.html:82 templates/web/default/admin/report_edit.html:18 templates/web/default/admin/report_edit.html:20 templates/web/default/dashboard/index.html:138 templates/web/default/dashboard/index.html:140 templates/web/default/report/display.html:79 templates/web/default/report/display.html:81 templates/web/fixmystreet/report/banner.html:15 templates/web/fixmystreet/report/display.html:79 templates/web/fixmystreet/report/display.html:81 msgid "Closed" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:690 +#: perllib/FixMyStreet/DB/Result/Problem.pm:696 msgid "Closed by council" msgstr "" @@ -561,7 +569,7 @@ msgstr "" msgid "Deleted" msgstr "" -#: templates/web/bromley/report/new/fill_in_details_form.html:54 templates/web/fixmystreet/report/new/fill_in_details_form.html:64 +#: templates/web/bromley/report/new/fill_in_details_form.html:54 templates/web/fixmystreet/report/new/fill_in_details_form.html:66 msgid "Details" msgstr "" @@ -573,7 +581,11 @@ msgstr "" msgid "Diligency prize league table" msgstr "" -#: templates/web/default/auth/general.html:32 templates/web/fixmystreet/auth/general.html:29 templates/web/fixmystreet/report/display.html:128 templates/web/fixmystreet/report/new/fill_in_details_form.html:150 +#: templates/web/fixmystreet/auth/general.html:30 +msgid "Do you have a FixMyBarangay password?" +msgstr "" + +#: templates/web/default/auth/general.html:32 templates/web/fixmystreet/auth/general.html:32 templates/web/fixmystreet/report/display.html:133 templates/web/fixmystreet/report/new/fill_in_details_form.html:154 msgid "Do you have a FixMyStreet password?" msgstr "" @@ -601,7 +613,7 @@ msgstr "" msgid "Editor" msgstr "" -#: templates/web/bromley/report/display.html:126 templates/web/default/admin/council_contacts.html:36 templates/web/default/admin/council_edit.html:42 templates/web/default/admin/list_flagged.html:12 templates/web/default/admin/list_flagged.html:35 templates/web/default/admin/list_updates.html:8 templates/web/default/admin/search_abuse.html:11 templates/web/default/admin/search_reports.html:15 templates/web/default/admin/search_users.html:13 templates/web/fixmystreet/auth/general.html:20 templates/web/fixmystreet/report/display.html:120 +#: templates/web/bromley/report/display.html:126 templates/web/default/admin/council_contacts.html:36 templates/web/default/admin/council_edit.html:42 templates/web/default/admin/list_flagged.html:12 templates/web/default/admin/list_flagged.html:35 templates/web/default/admin/list_updates.html:8 templates/web/default/admin/search_abuse.html:11 templates/web/default/admin/search_reports.html:15 templates/web/default/admin/search_users.html:13 templates/web/fixmystreet/auth/general.html:20 templates/web/fixmystreet/report/display.html:125 msgid "Email" msgstr "" @@ -673,7 +685,7 @@ msgstr "" msgid "Enter a nearby postcode, or street name and area" msgstr "" -#: templates/web/default/around/postcode_form.html:1 templates/web/default/around/postcode_form.html:2 templates/web/fixmystreet/around/postcode_form.html:10 templates/web/fixmystreet/around/postcode_form.html:11 +#: templates/web/default/around/postcode_form.html:1 templates/web/default/around/postcode_form.html:2 templates/web/fixmystreet/around/postcode_form.html:13 templates/web/fixmystreet/around/postcode_form.html:14 msgid "Enter a nearby street name and area" msgstr "" @@ -681,11 +693,11 @@ msgstr "" msgid "Enter a new password:" msgstr "" -#: templates/web/bromley/report/display.html:148 templates/web/bromley/report/new/fill_in_details_form.html:189 templates/web/fixmystreet/auth/general.html:57 templates/web/fixmystreet/report/display.html:160 templates/web/fixmystreet/report/new/fill_in_details_form.html:200 +#: templates/web/bromley/report/display.html:148 templates/web/bromley/report/new/fill_in_details_form.html:189 templates/web/fixmystreet/auth/general.html:61 templates/web/fixmystreet/report/display.html:165 templates/web/fixmystreet/report/new/fill_in_details_form.html:204 msgid "Enter a password" msgstr "" -#: templates/web/default/index.html:33 templates/web/emptyhomes/index.html:58 templates/web/fixmystreet/index.html:41 +#: templates/web/default/index.html:33 templates/web/emptyhomes/index.html:58 templates/web/fixmystreet/index.html:46 msgid "Enter details of the problem" msgstr "" @@ -750,7 +762,7 @@ msgid "" "for the county council." msgstr "" -#: templates/web/bromley/report/display.html:80 templates/web/bromley/report/display.html:82 templates/web/default/admin/index.html:36 templates/web/default/admin/report_edit.html:18 templates/web/default/admin/report_edit.html:20 templates/web/default/dashboard/index.html:136 templates/web/default/dashboard/index.html:138 templates/web/default/report/display.html:79 templates/web/default/report/display.html:81 templates/web/fixmystreet/report/banner.html:12 templates/web/fixmystreet/report/display.html:74 templates/web/fixmystreet/report/display.html:76 +#: templates/web/bromley/report/display.html:80 templates/web/bromley/report/display.html:82 templates/web/default/admin/index.html:36 templates/web/default/admin/report_edit.html:18 templates/web/default/admin/report_edit.html:20 templates/web/default/dashboard/index.html:138 templates/web/default/dashboard/index.html:140 templates/web/default/report/display.html:79 templates/web/default/report/display.html:81 templates/web/fixmystreet/report/banner.html:12 templates/web/fixmystreet/report/display.html:79 templates/web/fixmystreet/report/display.html:81 msgid "Fixed" msgstr "" @@ -790,7 +802,7 @@ msgstr "" msgid "For council(s):" msgstr "" -#: templates/web/default/faq/faq-en-gb.html:1 templates/web/emptyhomes/faq/faq-cy.html:1 templates/web/emptyhomes/faq/faq-en-gb.html:1 templates/web/fiksgatami/faq/faq-nb.html:1 templates/web/fiksgatami/nn/faq/faq-nn.html:1 templates/web/fixmystreet/faq/faq-en-gb.html:1 templates/web/fixmystreet/static/privacy.html:1 templates/web/zurich/faq/faq-de.html:1 +#: templates/web/default/faq/faq-en-gb.html:1 templates/web/emptyhomes/faq/faq-cy.html:1 templates/web/emptyhomes/faq/faq-en-gb.html:1 templates/web/fiksgatami/faq/faq-nb.html:1 templates/web/fiksgatami/nn/faq/faq-nn.html:1 templates/web/fixmybarangay/faq/faq-en-gb.html:1 templates/web/fixmystreet/faq/faq-en-gb.html:1 templates/web/fixmystreet/static/privacy.html:1 templates/web/zurich/faq/faq-de.html:1 msgid "Frequently Asked Questions" msgstr "" @@ -802,7 +814,7 @@ msgstr "" msgid "GeoRSS on Google Maps" msgstr "" -#: templates/web/bromley/report/display.html:30 templates/web/fixmystreet/report/display.html:23 +#: templates/web/bromley/report/display.html:30 templates/web/fixmystreet/report/display.html:27 msgid "Get updates" msgstr "" @@ -814,11 +826,11 @@ msgstr "" msgid "Get updates of problems in this %s" msgstr "" -#: templates/web/default/alert/_list.html:83 templates/web/fixmystreet/alert/_list.html:82 +#: templates/web/default/alert/_list.html:83 templates/web/fixmybarangay/alert/_list.html:28 templates/web/fixmystreet/alert/_list.html:82 msgid "Give me an RSS feed" msgstr "" -#: templates/web/default/alert/index.html:34 templates/web/default/around/postcode_form.html:8 templates/web/emptyhomes/index.html:47 templates/web/fixmystreet/around/postcode_form.html:18 +#: templates/web/default/alert/index.html:34 templates/web/default/around/postcode_form.html:8 templates/web/emptyhomes/index.html:47 templates/web/fixmystreet/around/postcode_form.html:27 msgid "Go" msgstr "" @@ -842,7 +854,7 @@ msgstr "" msgid "Have you ever reported a problem to a council before, or is this your first time?" msgstr "" -#: templates/web/barnet/footer.html:24 templates/web/bromley/footer.html:25 templates/web/bromley/header.html:81 templates/web/default/footer.html:15 templates/web/emptyhomes/header.html:28 templates/web/fiksgatami/footer.html:9 templates/web/fiksgatami/nn/footer.html:9 templates/web/fixmystreet/footer.html:53 templates/web/reading/footer.html:10 +#: templates/web/barnet/footer.html:24 templates/web/bromley/footer.html:25 templates/web/bromley/header.html:81 templates/web/default/footer.html:15 templates/web/emptyhomes/header.html:28 templates/web/fiksgatami/footer.html:9 templates/web/fiksgatami/nn/footer.html:9 templates/web/fixmybarangay/footer.html:22 templates/web/fixmystreet/footer.html:53 templates/web/reading/footer.html:10 msgid "Help" msgstr "" @@ -850,7 +862,7 @@ msgstr "" msgid "Here are the types of local problem alerts for ‘%s’." msgstr "" -#: templates/web/barnet/header.html:70 templates/web/bromley/header.html:64 templates/web/bromley/header.html:99 templates/web/fixmybarangay/header.html.orig:42 templates/web/fixmystreet/header.html:47 templates/web/zurich/header.html:47 +#: templates/web/barnet/header.html:70 templates/web/bromley/header.html:64 templates/web/bromley/header.html:99 templates/web/fixmybarangay/header.html:62 templates/web/fixmystreet/header.html:47 templates/web/zurich/header.html:47 msgid "Hi %s" msgstr "" @@ -858,11 +870,11 @@ msgstr "" msgid "Hidden" msgstr "" -#: templates/web/default/around/display_location.html:58 templates/web/fixmystreet/around/display_location.html:58 +#: templates/web/default/around/display_location.html:58 templates/web/fixmystreet/around/display_location.html:62 msgid "Hide old" msgstr "" -#: templates/web/default/around/display_location.html:53 templates/web/fixmystreet/around/display_location.html:54 +#: templates/web/default/around/display_location.html:53 templates/web/fixmystreet/around/display_location.html:58 msgid "Hide pins" msgstr "" @@ -921,7 +933,7 @@ msgstr "" msgid "Illegal feed selection" msgstr "" -#: templates/web/bromley/report/display.html:80 templates/web/bromley/report/display.html:82 templates/web/default/admin/report_edit.html:18 templates/web/default/admin/report_edit.html:20 templates/web/default/dashboard/index.html:136 templates/web/default/dashboard/index.html:138 templates/web/default/report/display.html:79 templates/web/default/report/display.html:81 templates/web/fixmystreet/report/display.html:74 templates/web/fixmystreet/report/display.html:76 +#: templates/web/bromley/report/display.html:80 templates/web/bromley/report/display.html:82 templates/web/default/admin/report_edit.html:18 templates/web/default/admin/report_edit.html:20 templates/web/default/dashboard/index.html:138 templates/web/default/dashboard/index.html:140 templates/web/default/report/display.html:79 templates/web/default/report/display.html:81 templates/web/fixmystreet/report/display.html:79 templates/web/fixmystreet/report/display.html:81 msgid "In Progress" msgstr "" @@ -957,7 +969,7 @@ msgstr "" msgid "Invalid start date" msgstr "" -#: templates/web/bromley/report/display.html:80 templates/web/bromley/report/display.html:81 templates/web/default/admin/report_edit.html:18 templates/web/default/admin/report_edit.html:19 templates/web/default/dashboard/index.html:136 templates/web/default/dashboard/index.html:137 templates/web/default/report/display.html:79 templates/web/default/report/display.html:80 templates/web/fixmystreet/report/display.html:74 templates/web/fixmystreet/report/display.html:75 +#: templates/web/bromley/report/display.html:80 templates/web/bromley/report/display.html:81 templates/web/default/admin/report_edit.html:18 templates/web/default/admin/report_edit.html:19 templates/web/default/dashboard/index.html:138 templates/web/default/dashboard/index.html:139 templates/web/default/report/display.html:79 templates/web/default/report/display.html:80 templates/web/fixmystreet/report/display.html:79 templates/web/fixmystreet/report/display.html:80 msgid "Investigating" msgstr "" @@ -965,7 +977,7 @@ msgstr "" msgid "It is worth noting however that the process can sometimes be slow, especially if the property is in very poor repair or the owner is unwilling to act. In most cases it can take six months or more before you can expect to see anything change and sometimes there may be considerable barries to a property being brought back into use. This doesn’t mean the council isn’t doing anything. We encourage councils to update the website so you can see what is happening. It may be a long process, but you reporting your concerns about this property to the council is a valuable first step." msgstr "" -#: templates/web/bromley/report/display.html:166 templates/web/bromley/report/new/fill_in_details_form.html:209 templates/web/default/auth/general.html:44 templates/web/default/report/display.html:151 templates/web/default/report/new/fill_in_details_form.html:149 templates/web/fixmystreet/auth/general.html:42 templates/web/fixmystreet/report/display.html:144 templates/web/fixmystreet/report/new/fill_in_details_form.html:167 +#: templates/web/bromley/report/display.html:166 templates/web/bromley/report/new/fill_in_details_form.html:209 templates/web/default/auth/general.html:44 templates/web/default/report/display.html:151 templates/web/default/report/new/fill_in_details_form.html:149 templates/web/fixmystreet/auth/general.html:46 templates/web/fixmystreet/report/display.html:149 templates/web/fixmystreet/report/new/fill_in_details_form.html:171 msgid "Keep me signed in on this computer" msgstr "" @@ -993,11 +1005,11 @@ msgstr "" msgid "List all reported problems" msgstr "" -#: templates/web/bromley/report/new/fill_in_details_form.html:69 templates/web/default/report/new/fill_in_details_form.html:68 templates/web/fixmystreet/report/new/fill_in_details_form.html:73 +#: templates/web/bromley/report/new/fill_in_details_form.html:69 templates/web/default/report/new/fill_in_details_form.html:68 templates/web/fixmystreet/report/new/fill_in_details_form.html:75 msgid "Loading..." msgstr "" -#: templates/web/default/alert/choose.html:1 templates/web/default/alert/choose.html:3 templates/web/default/alert/index.html:1 templates/web/default/alert/index.html:3 templates/web/default/alert/list.html:1 templates/web/default/alert/list.html:5 templates/web/default/alert/updates.html:1 templates/web/default/tokens/confirm_alert.html:1 templates/web/default/tokens/confirm_alert.html:3 templates/web/emptyhomes/alert/index.html:1 templates/web/emptyhomes/alert/index.html:3 templates/web/fixmystreet/alert/updates.html:1 +#: templates/web/default/alert/choose.html:1 templates/web/default/alert/choose.html:3 templates/web/default/alert/index.html:1 templates/web/default/alert/index.html:3 templates/web/default/alert/list.html:1 templates/web/default/alert/list.html:5 templates/web/default/alert/updates.html:1 templates/web/default/tokens/confirm_alert.html:1 templates/web/default/tokens/confirm_alert.html:3 templates/web/emptyhomes/alert/index.html:1 templates/web/emptyhomes/alert/index.html:3 templates/web/fixmybarangay/alert/index.html:1 templates/web/fixmybarangay/alert/index.html:3 templates/web/fixmystreet/alert/updates.html:1 msgid "Local RSS feeds and email alerts" msgstr "" @@ -1005,11 +1017,11 @@ msgstr "" msgid "Local RSS feeds and email alerts for ‘%s’" msgstr "" -#: templates/web/barnet/footer.html:22 templates/web/bromley/footer.html:23 templates/web/bromley/header.html:79 templates/web/default/footer.html:13 templates/web/fiksgatami/footer.html:8 templates/web/fiksgatami/nn/footer.html:8 templates/web/fixmystreet/footer.html:51 templates/web/reading/footer.html:9 +#: templates/web/barnet/footer.html:22 templates/web/bromley/footer.html:23 templates/web/bromley/header.html:79 templates/web/default/footer.html:13 templates/web/fiksgatami/footer.html:8 templates/web/fiksgatami/nn/footer.html:8 templates/web/fixmybarangay/footer.html:20 templates/web/fixmystreet/footer.html:51 templates/web/reading/footer.html:9 msgid "Local alerts" msgstr "" -#: templates/web/default/index.html:32 templates/web/emptyhomes/index.html:57 templates/web/fixmystreet/index.html:40 +#: templates/web/default/index.html:32 templates/web/emptyhomes/index.html:57 templates/web/fixmystreet/index.html:45 msgid "Locate the problem on a map of the area" msgstr "" @@ -1037,7 +1049,7 @@ msgstr "" msgid "More problems nearby" msgstr "" -#: templates/web/default/admin/list_flagged.html:11 templates/web/default/admin/list_flagged.html:34 templates/web/default/admin/list_updates.html:7 templates/web/default/admin/search_reports.html:14 templates/web/default/admin/search_users.html:12 templates/web/default/reports/index.html:15 templates/web/emptyhomes/reports/index.html:10 templates/web/fiksgatami/nn/reports/index.html:9 templates/web/fiksgatami/reports/index.html:9 templates/web/fixmystreet/auth/general.html:52 templates/web/fixmystreet/report/display.html:177 templates/web/fixmystreet/report/new/fill_in_details_form.html:117 templates/web/fixmystreet/report/new/fill_in_details_form.html:176 +#: templates/web/default/admin/list_flagged.html:11 templates/web/default/admin/list_flagged.html:34 templates/web/default/admin/list_updates.html:7 templates/web/default/admin/search_reports.html:14 templates/web/default/admin/search_users.html:12 templates/web/default/reports/index.html:15 templates/web/emptyhomes/reports/index.html:10 templates/web/fiksgatami/nn/reports/index.html:9 templates/web/fiksgatami/reports/index.html:9 templates/web/fixmystreet/auth/general.html:56 templates/web/fixmystreet/report/display.html:182 templates/web/fixmystreet/report/new/fill_in_details_form.html:119 templates/web/fixmystreet/report/new/fill_in_details_form.html:180 msgid "Name" msgstr "" @@ -1053,7 +1065,7 @@ msgstr "" msgid "Nearest named road to the pin placed on the map (automatically generated using OpenStreetMap): %s%s" msgstr "" -#: perllib/FixMyStreet/Cobrand/UK.pm:161 +#: perllib/FixMyStreet/Cobrand/UK.pm:153 msgid "Nearest postcode to the pin placed on the map (automatically generated): %s (%sm away)" msgstr "" @@ -1147,7 +1159,7 @@ msgstr "" msgid "No council" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:328 +#: perllib/FixMyStreet/DB/Result/Problem.pm:334 msgid "No council selected" msgstr "" @@ -1175,6 +1187,10 @@ msgstr "" msgid "No problems have been reported yet." msgstr "" +#: templates/web/fixmybarangay/report/_support.html:3 +msgid "No supporters" +msgstr "" + #: templates/web/default/admin/council_list.html:5 templates/web/default/admin/report_edit.html:16 msgid "None" msgstr "" @@ -1203,7 +1219,7 @@ msgstr "" msgid "Note: <strong>%s</strong>" msgstr "" -#: templates/web/fixmystreet/report/new/fill_in_details_form.html:149 +#: templates/web/fixmystreet/report/new/fill_in_details_form.html:153 msgid "Now to submit your report…" msgstr "" @@ -1211,7 +1227,7 @@ msgstr "" msgid "Now to submit your report… do you have a FixMyStreet password?" msgstr "" -#: templates/web/fixmystreet/report/display.html:127 +#: templates/web/fixmystreet/report/display.html:132 msgid "Now to submit your update…" msgstr "" @@ -1251,7 +1267,7 @@ msgstr "" msgid "Older problems" msgstr "" -#: templates/web/bromley/report/display.html:80 templates/web/default/admin/report_edit.html:18 templates/web/default/admin/update_edit.html:19 templates/web/default/dashboard/index.html:136 templates/web/default/report/display.html:79 templates/web/fixmystreet/report/display.html:74 +#: templates/web/bromley/report/display.html:80 templates/web/default/admin/report_edit.html:18 templates/web/default/admin/update_edit.html:19 templates/web/default/dashboard/index.html:138 templates/web/default/report/display.html:79 templates/web/fixmystreet/report/display.html:79 msgid "Open" msgstr "" @@ -1279,7 +1295,7 @@ msgstr "" msgid "Or you can subscribe to an alert based upon what ward or council you’re in:" msgstr "" -#: perllib/FixMyStreet/App/Controller/Report/New.pm:655 perllib/FixMyStreet/App/Controller/Report/New.pm:656 perllib/FixMyStreet/App/Controller/Report/New.pm:999 perllib/FixMyStreet/DB/Result/Problem.pm:497 perllib/FixMyStreet/DB/Result/Problem.pm:507 perllib/FixMyStreet/DB/Result/Problem.pm:517 perllib/FixMyStreet/DB/Result/Problem.pm:529 perllib/FixMyStreet/DB/ResultSet/Problem.pm:329 perllib/FixMyStreet/DB/ResultSet/Problem.pm:338 +#: perllib/FixMyStreet/App/Controller/Report/New.pm:655 perllib/FixMyStreet/App/Controller/Report/New.pm:656 perllib/FixMyStreet/App/Controller/Report/New.pm:999 perllib/FixMyStreet/DB/Result/Problem.pm:503 perllib/FixMyStreet/DB/Result/Problem.pm:513 perllib/FixMyStreet/DB/Result/Problem.pm:523 perllib/FixMyStreet/DB/Result/Problem.pm:535 perllib/FixMyStreet/DB/ResultSet/Problem.pm:329 perllib/FixMyStreet/DB/ResultSet/Problem.pm:338 msgid "Other" msgstr "" @@ -1299,7 +1315,7 @@ msgstr "" msgid "Partial" msgstr "" -#: templates/web/bromley/report/display.html:145 templates/web/bromley/report/new/fill_in_details_form.html:186 templates/web/fixmystreet/auth/general.html:55 templates/web/fixmystreet/report/display.html:157 templates/web/fixmystreet/report/new/fill_in_details_form.html:197 +#: templates/web/bromley/report/display.html:145 templates/web/bromley/report/new/fill_in_details_form.html:186 templates/web/fixmystreet/auth/general.html:59 templates/web/fixmystreet/report/display.html:162 templates/web/fixmystreet/report/new/fill_in_details_form.html:201 msgid "Password (optional)" msgstr "" @@ -1307,7 +1323,7 @@ msgstr "" msgid "Password:" msgstr "" -#: templates/web/bromley/report/new/fill_in_details_form.html:136 templates/web/bromley/report/new/fill_in_details_form.html:183 templates/web/fixmystreet/report/new/fill_in_details_form.html:133 templates/web/fixmystreet/report/new/fill_in_details_form.html:194 +#: templates/web/bromley/report/new/fill_in_details_form.html:136 templates/web/bromley/report/new/fill_in_details_form.html:183 templates/web/fixmystreet/report/new/fill_in_details_form.html:137 templates/web/fixmystreet/report/new/fill_in_details_form.html:198 msgid "Phone number (optional)" msgstr "" @@ -1315,7 +1331,7 @@ msgstr "" msgid "Phone:" msgstr "" -#: templates/web/bromley/report/display.html:109 templates/web/bromley/report/new/fill_in_details_form.html:104 templates/web/fixmystreet/report/display.html:103 templates/web/fixmystreet/report/new/fill_in_details_form.html:108 +#: templates/web/bromley/report/display.html:109 templates/web/bromley/report/new/fill_in_details_form.html:104 templates/web/fixmystreet/report/display.html:108 templates/web/fixmystreet/report/new/fill_in_details_form.html:110 msgid "Photo" msgstr "" @@ -1327,7 +1343,7 @@ msgstr "" msgid "Photos of recent nearby reports" msgstr "" -#: templates/web/bromley/report/display.html:80 templates/web/bromley/report/display.html:81 templates/web/default/admin/report_edit.html:18 templates/web/default/admin/report_edit.html:19 templates/web/default/dashboard/index.html:136 templates/web/default/dashboard/index.html:137 templates/web/default/report/display.html:79 templates/web/default/report/display.html:80 templates/web/fixmystreet/report/display.html:74 templates/web/fixmystreet/report/display.html:75 +#: templates/web/bromley/report/display.html:80 templates/web/bromley/report/display.html:81 templates/web/default/admin/report_edit.html:18 templates/web/default/admin/report_edit.html:19 templates/web/default/dashboard/index.html:138 templates/web/default/dashboard/index.html:139 templates/web/default/report/display.html:79 templates/web/default/report/display.html:80 templates/web/fixmystreet/report/display.html:79 templates/web/fixmystreet/report/display.html:80 msgid "Planned" msgstr "" @@ -1351,11 +1367,11 @@ msgstr "" msgid "Please check your email address is correct" msgstr "" -#: perllib/FixMyStreet/App/Controller/Report/New.pm:819 perllib/FixMyStreet/App/Controller/Report/New.pm:826 perllib/FixMyStreet/App/Controller/Report/New.pm:845 perllib/FixMyStreet/App/Controller/Report/New.pm:884 perllib/FixMyStreet/DB/Result/Problem.pm:347 templates/web/default/js/validation_strings.html:9 +#: perllib/FixMyStreet/App/Controller/Report/New.pm:819 perllib/FixMyStreet/App/Controller/Report/New.pm:826 perllib/FixMyStreet/App/Controller/Report/New.pm:845 perllib/FixMyStreet/App/Controller/Report/New.pm:884 perllib/FixMyStreet/DB/Result/Problem.pm:353 templates/web/default/js/validation_strings.html:9 msgid "Please choose a category" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:353 +#: perllib/FixMyStreet/DB/Result/Problem.pm:359 msgid "Please choose a property type" msgstr "" @@ -1382,7 +1398,7 @@ msgstr "" msgid "Please enter a password" msgstr "" -#: perllib/FixMyStreet/App/Controller/Contact.pm:97 perllib/FixMyStreet/DB/Result/Problem.pm:322 templates/web/default/js/validation_strings.html:3 +#: perllib/FixMyStreet/App/Controller/Contact.pm:97 perllib/FixMyStreet/DB/Result/Problem.pm:328 templates/web/default/js/validation_strings.html:3 msgid "Please enter a subject" msgstr "" @@ -1394,7 +1410,7 @@ msgstr "" msgid "Please enter a valid email address" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:325 templates/web/default/js/validation_strings.html:4 +#: perllib/FixMyStreet/DB/Result/Problem.pm:331 templates/web/default/js/validation_strings.html:4 msgid "Please enter some details" msgstr "" @@ -1402,7 +1418,7 @@ msgstr "" msgid "Please enter your email" msgstr "" -#: templates/web/bromley/report/new/fill_in_details_form.html:149 templates/web/fixmystreet/report/new/fill_in_details_form.html:146 +#: templates/web/bromley/report/new/fill_in_details_form.html:149 templates/web/fixmystreet/report/new/fill_in_details_form.html:150 msgid "Please enter your email address" msgstr "" @@ -1410,11 +1426,11 @@ msgstr "" msgid "Please enter your first name" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:340 templates/web/default/js/validation_strings.html:7 +#: perllib/FixMyStreet/DB/Result/Problem.pm:346 templates/web/default/js/validation_strings.html:7 msgid "Please enter your full name, councils need this information – if you do not wish your name to be shown on the site, untick the box below" msgstr "" -#: perllib/FixMyStreet/App/Controller/Contact.pm:95 perllib/FixMyStreet/DB/Result/Comment.pm:143 perllib/FixMyStreet/DB/Result/Problem.pm:333 perllib/FixMyStreet/DB/Result/User.pm:97 templates/web/default/js/validation_strings.html:6 +#: perllib/FixMyStreet/App/Controller/Contact.pm:95 perllib/FixMyStreet/DB/Result/Comment.pm:143 perllib/FixMyStreet/DB/Result/Problem.pm:339 perllib/FixMyStreet/DB/Result/User.pm:97 templates/web/default/js/validation_strings.html:6 msgid "Please enter your name" msgstr "" @@ -1448,11 +1464,11 @@ msgid "" "photo of the problem if you have one), etc." msgstr "" -#: templates/web/fixmystreet/report/new/fill_in_details_form.html:68 +#: templates/web/fixmystreet/report/new/fill_in_details_form.html:70 msgid "Please fill in details of the problem." msgstr "" -#: templates/web/bromley/report/new/fill_in_details_form.html:28 templates/web/default/report/new/fill_in_details_form.html:27 templates/web/fixmystreet/report/new/fill_in_details_form.html:34 +#: templates/web/bromley/report/new/fill_in_details_form.html:28 templates/web/default/report/new/fill_in_details_form.html:27 templates/web/fixmystreet/report/new/fill_in_details_form.html:35 msgid "Please fill in the form below with details of the problem, and describe the location as precisely as possible in the details box." msgstr "" @@ -1472,7 +1488,7 @@ msgstr "" msgid "Please note that updates are not sent to the relevant department. If you leave your name it will be public. Your information will only be used in accordance with our <a href=\"/faq#privacy\">privacy policy</a>" msgstr "" -#: templates/web/bromley/report/new/fill_in_details_form.html:23 templates/web/default/report/new/fill_in_details_form.html:5 templates/web/fixmystreet/report/new/fill_in_details_form.html:25 +#: templates/web/bromley/report/new/fill_in_details_form.html:23 templates/web/default/report/new/fill_in_details_form.html:5 templates/web/fixmystreet/report/new/fill_in_details_form.html:26 msgid "Please note your report has <strong>not yet been sent</strong>. Choose a category and add further information below, then submit." msgstr "" @@ -1520,11 +1536,11 @@ msgstr "" msgid "Please write a message" msgstr "" -#: templates/web/bromley/report/display.html:70 templates/web/fixmystreet/report/display.html:69 +#: templates/web/bromley/report/display.html:70 templates/web/fixmystreet/report/display.html:74 msgid "Please write your update here" msgstr "" -#: templates/web/bromley/report/display.html:121 templates/web/bromley/report/display.html:149 templates/web/bromley/report/display.html:161 templates/web/default/contact/index.html:93 templates/web/default/report/display.html:119 templates/web/default/report/display.html:156 templates/web/default/report/display.html:178 templates/web/fixmystreet/contact/index.html:93 templates/web/fixmystreet/report/display.html:115 templates/web/fixmystreet/report/display.html:139 templates/web/fixmystreet/report/display.html:161 +#: templates/web/bromley/report/display.html:121 templates/web/bromley/report/display.html:149 templates/web/bromley/report/display.html:161 templates/web/default/contact/index.html:93 templates/web/default/report/display.html:119 templates/web/default/report/display.html:156 templates/web/default/report/display.html:178 templates/web/fixmystreet/contact/index.html:93 templates/web/fixmystreet/report/display.html:120 templates/web/fixmystreet/report/display.html:144 templates/web/fixmystreet/report/display.html:166 msgid "Post" msgstr "" @@ -1576,11 +1592,11 @@ msgstr "" msgid "Problems in this area" msgstr "" -#: templates/web/bromley/report/display.html:31 templates/web/fixmystreet/around/display_location.html:98 templates/web/fixmystreet/report/display.html:24 +#: templates/web/bromley/report/display.html:31 templates/web/fixmystreet/around/tabbed_lists.html:4 templates/web/fixmystreet/report/display.html:28 msgid "Problems nearby" msgstr "" -#: templates/web/fixmystreet/around/display_location.html:97 +#: templates/web/fixmystreet/around/tabbed_lists.html:3 msgid "Problems on the map" msgstr "" @@ -1592,11 +1608,11 @@ msgstr "" msgid "Problems within %.1fkm of this location" msgstr "" -#: perllib/FixMyStreet/Cobrand/Default.pm:609 perllib/FixMyStreet/Cobrand/EmptyHomes.pm:95 perllib/FixMyStreet/Cobrand/FiksGataMi.pm:162 perllib/FixMyStreet/Cobrand/UK.pm:240 +#: perllib/FixMyStreet/Cobrand/Default.pm:609 perllib/FixMyStreet/Cobrand/EmptyHomes.pm:95 perllib/FixMyStreet/Cobrand/FiksGataMi.pm:162 perllib/FixMyStreet/Cobrand/UK.pm:232 msgid "Problems within %s" msgstr "" -#: perllib/FixMyStreet/Cobrand/EmptyHomes.pm:103 perllib/FixMyStreet/Cobrand/UK.pm:254 +#: perllib/FixMyStreet/Cobrand/EmptyHomes.pm:103 perllib/FixMyStreet/Cobrand/UK.pm:246 msgid "Problems within %s ward" msgstr "" @@ -1604,7 +1620,7 @@ msgstr "" msgid "Problems within %s, FixMyStreet" msgstr "" -#: templates/web/default/alert/_list.html:40 templates/web/fixmystreet/alert/_list.html:42 +#: templates/web/default/alert/_list.html:40 templates/web/fixmybarangay/alert/_list.html:13 templates/web/fixmystreet/alert/_list.html:42 msgid "Problems within the boundary of:" msgstr "" @@ -1616,11 +1632,11 @@ msgstr "" msgid "Property type:" msgstr "" -#: templates/web/bromley/report/new/fill_in_details_form.html:52 templates/web/fixmystreet/report/new/fill_in_details_form.html:62 +#: templates/web/bromley/report/new/fill_in_details_form.html:52 templates/web/fixmystreet/report/new/fill_in_details_form.html:64 msgid "Provide a title" msgstr "" -#: templates/web/bromley/report/display.html:57 templates/web/default/report/display.html:51 templates/web/fixmystreet/report/display.html:50 +#: templates/web/bromley/report/display.html:57 templates/web/default/report/display.html:51 templates/web/fixmystreet/report/display.html:55 msgid "Provide an update" msgstr "" @@ -1628,7 +1644,7 @@ msgstr "" msgid "Providing a password is optional, but doing so will allow you to more easily report future problems, leave updates and manage your reports." msgstr "" -#: templates/web/bromley/report/display.html:142 templates/web/default/report/display.html:175 templates/web/default/report/new/fill_in_details_form.html:173 templates/web/fixmystreet/report/display.html:154 templates/web/fixmystreet/report/new/fill_in_details_form.html:191 +#: templates/web/bromley/report/display.html:142 templates/web/default/report/display.html:175 templates/web/default/report/new/fill_in_details_form.html:173 templates/web/fixmystreet/report/display.html:159 templates/web/fixmystreet/report/new/fill_in_details_form.html:195 msgid "Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports." msgstr "" @@ -1648,23 +1664,23 @@ msgstr "" msgid "Questionnaire filled in by problem reporter" msgstr "" -#: templates/web/bromley/report/display.html:37 templates/web/default/alert/_list.html:21 templates/web/default/around/display_location.html:1 templates/web/default/around/display_location.html:3 templates/web/default/report/display.html:42 templates/web/default/reports/_rss.html:1 templates/web/fixmystreet/alert/_list.html:22 templates/web/fixmystreet/alert/updates.html:9 templates/web/fixmystreet/around/display_location.html:1 templates/web/fixmystreet/around/display_location.html:3 templates/web/fixmystreet/report/display.html:30 +#: templates/web/bromley/report/display.html:37 templates/web/default/alert/_list.html:21 templates/web/default/around/display_location.html:1 templates/web/default/around/display_location.html:3 templates/web/default/report/display.html:42 templates/web/default/reports/_rss.html:1 templates/web/fixmystreet/alert/_list.html:22 templates/web/fixmystreet/alert/updates.html:9 templates/web/fixmystreet/around/display_location.html:1 templates/web/fixmystreet/around/display_location.html:3 templates/web/fixmystreet/report/display.html:34 msgid "RSS feed" msgstr "" -#: perllib/FixMyStreet/Cobrand/UK.pm:283 perllib/FixMyStreet/Cobrand/UK.pm:295 +#: perllib/FixMyStreet/Cobrand/UK.pm:275 perllib/FixMyStreet/Cobrand/UK.pm:287 msgid "RSS feed for %s" msgstr "" -#: perllib/FixMyStreet/Cobrand/UK.pm:289 perllib/FixMyStreet/Cobrand/UK.pm:301 +#: perllib/FixMyStreet/Cobrand/UK.pm:281 perllib/FixMyStreet/Cobrand/UK.pm:293 msgid "RSS feed for %s ward, %s" msgstr "" -#: perllib/FixMyStreet/Cobrand/FiksGataMi.pm:178 perllib/FixMyStreet/Cobrand/FiksGataMi.pm:186 perllib/FixMyStreet/Cobrand/FiksGataMi.pm:196 perllib/FixMyStreet/Cobrand/FiksGataMi.pm:204 perllib/FixMyStreet/Cobrand/UK.pm:309 perllib/FixMyStreet/Cobrand/UK.pm:321 +#: perllib/FixMyStreet/Cobrand/FiksGataMi.pm:178 perllib/FixMyStreet/Cobrand/FiksGataMi.pm:186 perllib/FixMyStreet/Cobrand/FiksGataMi.pm:196 perllib/FixMyStreet/Cobrand/FiksGataMi.pm:204 perllib/FixMyStreet/Cobrand/UK.pm:301 perllib/FixMyStreet/Cobrand/UK.pm:313 msgid "RSS feed of %s" msgstr "" -#: perllib/FixMyStreet/Cobrand/UK.pm:314 perllib/FixMyStreet/Cobrand/UK.pm:326 +#: perllib/FixMyStreet/Cobrand/UK.pm:306 perllib/FixMyStreet/Cobrand/UK.pm:318 msgid "RSS feed of %s, within %s ward" msgstr "" @@ -1676,11 +1692,11 @@ msgstr "" msgid "RSS feed of problems in this %s" msgstr "" -#: perllib/FixMyStreet/Cobrand/Default.pm:610 perllib/FixMyStreet/Cobrand/EmptyHomes.pm:96 perllib/FixMyStreet/Cobrand/FiksGataMi.pm:161 perllib/FixMyStreet/Cobrand/UK.pm:247 +#: perllib/FixMyStreet/Cobrand/Default.pm:610 perllib/FixMyStreet/Cobrand/EmptyHomes.pm:96 perllib/FixMyStreet/Cobrand/FiksGataMi.pm:161 perllib/FixMyStreet/Cobrand/UK.pm:239 msgid "RSS feed of problems within %s" msgstr "" -#: perllib/FixMyStreet/Cobrand/EmptyHomes.pm:102 perllib/FixMyStreet/Cobrand/UK.pm:253 +#: perllib/FixMyStreet/Cobrand/EmptyHomes.pm:102 perllib/FixMyStreet/Cobrand/UK.pm:245 msgid "RSS feed of problems within %s ward" msgstr "" @@ -1688,11 +1704,11 @@ msgstr "" msgid "RSS feed of recent local problems" msgstr "" -#: templates/web/bromley/report/display.html:37 templates/web/default/report/display.html:42 templates/web/fixmystreet/alert/updates.html:9 templates/web/fixmystreet/report/display.html:30 +#: templates/web/bromley/report/display.html:37 templates/web/default/report/display.html:42 templates/web/fixmystreet/alert/updates.html:9 templates/web/fixmystreet/report/display.html:34 msgid "RSS feed of updates to this problem" msgstr "" -#: templates/web/bromley/report/display.html:39 templates/web/default/alert/updates.html:9 templates/web/default/report/display.html:33 templates/web/fixmystreet/alert/updates.html:14 templates/web/fixmystreet/report/display.html:32 +#: templates/web/bromley/report/display.html:39 templates/web/default/alert/updates.html:9 templates/web/default/report/display.html:33 templates/web/fixmystreet/alert/updates.html:14 templates/web/fixmystreet/report/display.html:36 msgid "Receive email when updates are left on this problem." msgstr "" @@ -1708,7 +1724,7 @@ msgstr "" msgid "Recently fixed" msgstr "" -#: templates/web/default/index.html:50 templates/web/fixmystreet/index.html:62 +#: templates/web/default/index.html:50 templates/web/fixmystreet/index.html:68 msgid "Recently reported problems" msgstr "" @@ -1732,7 +1748,7 @@ msgstr "" msgid "Report a problem" msgstr "" -#: templates/web/bromley/report/display.html:28 templates/web/fixmystreet/report/display.html:22 +#: templates/web/bromley/report/display.html:28 templates/web/fixmystreet/report/display.html:26 msgid "Report abuse" msgstr "" @@ -1744,7 +1760,7 @@ msgstr "" msgid "Report on %s" msgstr "" -#: templates/web/default/index.html:15 templates/web/fixmystreet/around/postcode_form.html:6 +#: templates/web/default/index.html:15 templates/web/fixmystreet/around/postcode_form.html:9 msgid "Report, view, or discuss local problems" msgstr "" @@ -1756,7 +1772,7 @@ msgstr "" msgid "Reported %s, to %s" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:512 templates/web/default/contact/index.html:45 templates/web/fixmystreet/contact/index.html:46 +#: perllib/FixMyStreet/DB/Result/Problem.pm:518 templates/web/default/contact/index.html:45 templates/web/fixmystreet/contact/index.html:46 msgid "Reported anonymously at %s" msgstr "" @@ -1764,31 +1780,31 @@ msgstr "" msgid "Reported before" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:504 +#: perllib/FixMyStreet/DB/Result/Problem.pm:510 msgid "Reported by %s anonymously at %s" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:535 templates/web/default/contact/index.html:47 templates/web/fixmystreet/contact/index.html:48 +#: perllib/FixMyStreet/DB/Result/Problem.pm:541 templates/web/default/contact/index.html:47 templates/web/fixmystreet/contact/index.html:48 msgid "Reported by %s at %s" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:526 +#: perllib/FixMyStreet/DB/Result/Problem.pm:532 msgid "Reported by %s by %s at %s" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:500 +#: perllib/FixMyStreet/DB/Result/Problem.pm:506 msgid "Reported by %s in the %s category anonymously at %s" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:520 +#: perllib/FixMyStreet/DB/Result/Problem.pm:526 msgid "Reported by %s in the %s category by %s at %s" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:508 +#: perllib/FixMyStreet/DB/Result/Problem.pm:514 msgid "Reported in the %s category anonymously at %s" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:530 +#: perllib/FixMyStreet/DB/Result/Problem.pm:536 msgid "Reported in the %s category by %s at %s" msgstr "" @@ -1840,7 +1856,7 @@ msgstr "" msgid "Select which type of alert you'd like and click the button for an RSS feed, or enter your email address to subscribe to an email alert." msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:618 +#: perllib/FixMyStreet/DB/Result/Problem.pm:624 msgid "Sent to %s %s later" msgstr "" @@ -1869,19 +1885,19 @@ msgid "" " significant contribution to the supply of affordable homes in Wales." msgstr "" -#: templates/web/bromley/report/display.html:203 templates/web/bromley/report/new/fill_in_details_form.html:129 templates/web/bromley/report/new/fill_in_details_form.html:175 templates/web/default/report/display.html:208 templates/web/default/report/new/fill_in_details_form.html:210 templates/web/fixmystreet/report/display.html:185 templates/web/fixmystreet/report/new/fill_in_details_form.html:126 templates/web/fixmystreet/report/new/fill_in_details_form.html:186 +#: templates/web/bromley/report/display.html:203 templates/web/bromley/report/new/fill_in_details_form.html:129 templates/web/bromley/report/new/fill_in_details_form.html:175 templates/web/default/report/display.html:208 templates/web/default/report/new/fill_in_details_form.html:210 templates/web/fixmystreet/report/display.html:190 templates/web/fixmystreet/report/new/fill_in_details_form.html:128 templates/web/fixmystreet/report/new/fill_in_details_form.html:190 msgid "Show my name publicly" msgstr "" -#: templates/web/default/around/display_location.html:60 templates/web/fixmystreet/around/display_location.html:60 +#: templates/web/default/around/display_location.html:60 templates/web/fixmystreet/around/display_location.html:64 msgid "Show old" msgstr "" -#: templates/web/default/around/display_location.html:51 templates/web/fixmystreet/around/display_location.html:52 +#: templates/web/default/around/display_location.html:51 templates/web/fixmystreet/around/display_location.html:56 msgid "Show pins" msgstr "" -#: templates/web/default/auth/general.html:3 templates/web/default/auth/general.html:49 templates/web/fixmybarangay/header.html.orig:46 templates/web/fixmystreet/auth/general.html:3 templates/web/fixmystreet/auth/general.html:38 templates/web/fixmystreet/auth/general.html:58 templates/web/fixmystreet/header.html:51 templates/web/zurich/header.html:51 +#: templates/web/default/auth/general.html:3 templates/web/default/auth/general.html:49 templates/web/fixmybarangay/header.html:66 templates/web/fixmystreet/auth/general.html:3 templates/web/fixmystreet/auth/general.html:42 templates/web/fixmystreet/auth/general.html:62 templates/web/fixmystreet/header.html:51 templates/web/zurich/header.html:51 msgid "Sign in" msgstr "" @@ -1905,7 +1921,7 @@ msgstr "" msgid "Some categories may require additional information." msgstr "" -#: templates/web/default/alert/index.html:42 +#: templates/web/default/alert/index.html:42 templates/web/fixmybarangay/alert/index.html:32 msgid "Some photos of recent reports" msgstr "" @@ -1917,7 +1933,7 @@ msgstr "" msgid "Some unconfirmeds" msgstr "" -#: perllib/FixMyStreet/Cobrand/UK.pm:97 +#: perllib/FixMyStreet/Cobrand/UK.pm:89 msgid "Sorry, that appears to be a Crown dependency postcode, which we don't cover." msgstr "" @@ -1949,7 +1965,7 @@ msgstr "" msgid "Start month:" msgstr "" -#: templates/web/bromley/report/display.html:78 templates/web/default/admin/list_flagged.html:18 templates/web/default/admin/list_updates.html:6 templates/web/default/admin/search_reports.html:21 templates/web/fixmystreet/report/display.html:72 +#: templates/web/bromley/report/display.html:78 templates/web/default/admin/list_flagged.html:18 templates/web/default/admin/list_updates.html:6 templates/web/default/admin/search_reports.html:21 templates/web/fixmystreet/report/display.html:77 msgid "State" msgstr "" @@ -1965,7 +1981,7 @@ msgstr "" msgid "Still open, via questionnaire, %s" msgstr "" -#: templates/web/bromley/report/new/fill_in_details_form.html:48 templates/web/fixmystreet/contact/index.html:79 templates/web/fixmystreet/report/new/fill_in_details_form.html:58 +#: templates/web/bromley/report/new/fill_in_details_form.html:48 templates/web/fixmystreet/contact/index.html:79 templates/web/fixmystreet/report/new/fill_in_details_form.html:60 msgid "Subject" msgstr "" @@ -1973,7 +1989,7 @@ msgstr "" msgid "Subject:" msgstr "" -#: templates/web/bromley/report/new/fill_in_details_form.html:140 templates/web/bromley/report/new/fill_in_details_form.html:190 templates/web/bromley/report/new/fill_in_details_form.html:204 templates/web/default/questionnaire/creator_fixed.html:19 templates/web/default/report/new/fill_in_details_form.html:114 templates/web/default/report/new/fill_in_details_form.html:154 templates/web/default/report/new/fill_in_details_form.html:176 templates/web/fixmystreet/report/new/fill_in_details_form.html:137 templates/web/fixmystreet/report/new/fill_in_details_form.html:162 templates/web/fixmystreet/report/new/fill_in_details_form.html:201 +#: templates/web/bromley/report/new/fill_in_details_form.html:140 templates/web/bromley/report/new/fill_in_details_form.html:190 templates/web/bromley/report/new/fill_in_details_form.html:204 templates/web/default/questionnaire/creator_fixed.html:19 templates/web/default/report/new/fill_in_details_form.html:114 templates/web/default/report/new/fill_in_details_form.html:154 templates/web/default/report/new/fill_in_details_form.html:176 templates/web/fixmystreet/report/new/fill_in_details_form.html:141 templates/web/fixmystreet/report/new/fill_in_details_form.html:166 templates/web/fixmystreet/report/new/fill_in_details_form.html:205 msgid "Submit" msgstr "" @@ -1985,14 +2001,18 @@ msgstr "" msgid "Submit questionnaire" msgstr "" -#: templates/web/bromley/report/display.html:44 templates/web/default/alert/updates.html:17 templates/web/default/report/display.html:38 templates/web/fixmystreet/alert/updates.html:23 templates/web/fixmystreet/report/display.html:37 +#: templates/web/bromley/report/display.html:44 templates/web/default/alert/updates.html:17 templates/web/default/report/display.html:38 templates/web/fixmystreet/alert/updates.html:23 templates/web/fixmystreet/report/display.html:41 msgid "Subscribe" msgstr "" -#: templates/web/default/alert/_list.html:97 templates/web/fixmystreet/alert/_list.html:92 +#: templates/web/default/alert/_list.html:97 templates/web/fixmybarangay/alert/_list.html:42 templates/web/fixmystreet/alert/_list.html:92 msgid "Subscribe me to an email alert" msgstr "" +#: templates/web/fixmybarangay/alert/_list.html:6 +msgid "Subscribe to an alert based upon what baranagay you’re in:" +msgstr "" + #: perllib/FixMyStreet/App/Controller/Admin.pm:1021 templates/web/default/admin/index.html:1 msgid "Summary" msgstr "" @@ -2069,7 +2089,7 @@ msgstr "" msgid "That location does not appear to be in the UK; please try again." msgstr "" -#: perllib/FixMyStreet/Cobrand/FiksGataMi.pm:63 perllib/FixMyStreet/Cobrand/UK.pm:90 +#: perllib/FixMyStreet/Cobrand/FiksGataMi.pm:63 perllib/FixMyStreet/Cobrand/UK.pm:82 msgid "That postcode was not recognised, sorry." msgstr "" @@ -2077,7 +2097,7 @@ msgstr "" msgid "That problem will now be resent." msgstr "" -#: perllib/FixMyStreet/App/Controller/Report.pm:75 +#: perllib/FixMyStreet/App/Controller/Report.pm:92 msgid "That report has been removed from FixMyStreet." msgstr "" @@ -2204,7 +2224,7 @@ msgstr "" msgid "There was a problem showing this page. Please try again later." msgstr "" -#: perllib/FixMyStreet/App/Controller/Report/New.pm:733 perllib/FixMyStreet/App/Controller/Report/Update.pm:130 templates/web/default/auth/general.html:23 templates/web/fixmystreet/auth/general.html:24 +#: perllib/FixMyStreet/App/Controller/Report/New.pm:733 perllib/FixMyStreet/App/Controller/Report/Update.pm:134 templates/web/default/auth/general.html:23 templates/web/fixmystreet/auth/general.html:24 msgid "There was a problem with your email/password combination. If you cannot remember your password, or do not have one, please fill in the ‘sign in by email’ section of the form." msgstr "" @@ -2212,7 +2232,7 @@ msgstr "" msgid "There was a problem with your email/password combination. Please try again." msgstr "" -#: perllib/FixMyStreet/App/Controller/Report/Update.pm:252 +#: perllib/FixMyStreet/App/Controller/Report/Update.pm:256 msgid "There was a problem with your update. Please try again." msgstr "" @@ -2220,7 +2240,7 @@ msgstr "" msgid "There were problems with your report. Please see below." msgstr "" -#: perllib/FixMyStreet/App/Controller/Report/Update.pm:279 +#: perllib/FixMyStreet/App/Controller/Report/Update.pm:283 msgid "There were problems with your update. Please see below." msgstr "" @@ -2236,7 +2256,7 @@ msgstr "" msgid "This email has been sent to several councils covering the location of the problem, as the category selected is provided for all of them; please ignore it if you're not the correct council to deal with the issue." msgstr "" -#: perllib/FixMyStreet/App/Controller/Report/New.pm:865 perllib/FixMyStreet/Cobrand/UK.pm:62 +#: perllib/FixMyStreet/App/Controller/Report/New.pm:865 perllib/FixMyStreet/Cobrand/UK.pm:54 msgid "This information is required" msgstr "" @@ -2260,11 +2280,11 @@ msgstr "" msgid "This problem has been closed" msgstr "" -#: templates/web/bromley/report/display.html:96 templates/web/default/report/banner.html:12 templates/web/default/report/display.html:95 templates/web/emptyhomes/report/display.html:12 templates/web/fixmystreet/report/display.html:90 +#: templates/web/bromley/report/display.html:96 templates/web/default/report/banner.html:12 templates/web/default/report/display.html:95 templates/web/emptyhomes/report/display.html:12 templates/web/fixmystreet/report/display.html:95 msgid "This problem has been fixed" msgstr "" -#: templates/web/bromley/report/display.html:90 templates/web/default/report/display.html:90 templates/web/fixmystreet/report/display.html:84 +#: templates/web/bromley/report/display.html:90 templates/web/default/report/display.html:90 templates/web/fixmystreet/report/display.html:89 msgid "This problem has not been fixed" msgstr "" @@ -2336,11 +2356,11 @@ msgstr "" msgid "Unknown alert type" msgstr "" -#: perllib/FixMyStreet/App/Controller/Report.pm:70 +#: perllib/FixMyStreet/App/Controller/Report.pm:87 msgid "Unknown problem ID" msgstr "" -#: templates/web/bromley/report/display.html:66 templates/web/fixmystreet/report/display.html:65 +#: templates/web/bromley/report/display.html:66 templates/web/fixmystreet/report/display.html:70 msgid "Update" msgstr "" @@ -2452,11 +2472,11 @@ msgstr "" msgid "We may contact you periodically to ask if anything has changed with the property you reported." msgstr "" -#: templates/web/bromley/report/display.html:141 templates/web/fixmystreet/report/display.html:153 +#: templates/web/bromley/report/display.html:141 templates/web/fixmystreet/report/display.html:158 msgid "We never show your email" msgstr "" -#: templates/web/bromley/report/new/fill_in_details_form.html:133 templates/web/bromley/report/new/fill_in_details_form.html:179 templates/web/fixmystreet/report/new/fill_in_details_form.html:130 templates/web/fixmystreet/report/new/fill_in_details_form.html:190 +#: templates/web/bromley/report/new/fill_in_details_form.html:133 templates/web/bromley/report/new/fill_in_details_form.html:179 templates/web/fixmystreet/report/new/fill_in_details_form.html:133 templates/web/fixmystreet/report/new/fill_in_details_form.html:194 msgid "We never show your email address or phone number." msgstr "" @@ -2464,7 +2484,7 @@ msgstr "" msgid "We realise this problem might be the responsibility of %s; however, we don't currently have any contact details for them. If you know of an appropriate contact address, please do get in touch." msgstr "" -#: templates/web/default/index.html:34 templates/web/emptyhomes/index.html:59 templates/web/fixmystreet/index.html:45 +#: templates/web/default/index.html:34 templates/web/emptyhomes/index.html:59 templates/web/fixmystreet/index.html:50 msgid "We send it to the council on your behalf" msgstr "" @@ -2524,7 +2544,7 @@ msgstr "" msgid "Yes" msgstr "" -#: templates/web/bromley/report/display.html:155 templates/web/bromley/report/new/fill_in_details_form.html:198 templates/web/fixmystreet/report/display.html:133 templates/web/fixmystreet/report/new/fill_in_details_form.html:156 +#: templates/web/bromley/report/display.html:155 templates/web/bromley/report/new/fill_in_details_form.html:198 templates/web/fixmystreet/report/display.html:138 templates/web/fixmystreet/report/new/fill_in_details_form.html:160 msgid "Yes I have a password" msgstr "" @@ -2552,11 +2572,11 @@ msgstr "" msgid "You have already answered this questionnaire. If you have a question, please <a href='%s'>get in touch</a>, or <a href='%s'>view your problem</a>.\n" msgstr "" -#: templates/web/bromley/report/new/fill_in_details_form.html:97 templates/web/default/questionnaire/index.html:92 templates/web/default/report/new/fill_in_details_form.html:93 templates/web/fixmystreet/questionnaire/index.html:87 templates/web/fixmystreet/report/new/fill_in_details_form.html:101 +#: templates/web/bromley/report/new/fill_in_details_form.html:97 templates/web/default/questionnaire/index.html:92 templates/web/default/report/new/fill_in_details_form.html:93 templates/web/fixmystreet/questionnaire/index.html:87 templates/web/fixmystreet/report/new/fill_in_details_form.html:103 msgid "You have already attached a photo to this report, attaching another one will replace it." msgstr "" -#: templates/web/bromley/report/display.html:106 templates/web/default/report/display.html:106 templates/web/fixmystreet/report/display.html:100 +#: templates/web/bromley/report/display.html:106 templates/web/default/report/display.html:106 templates/web/fixmystreet/report/display.html:105 msgid "You have already attached a photo to this update, attaching another one will replace it." msgstr "" @@ -2564,7 +2584,7 @@ msgstr "" msgid "You have been signed out" msgstr "" -#: templates/web/bromley/report/new/fill_in_details_form.html:25 templates/web/default/report/new/fill_in_details_form.html:7 templates/web/fixmystreet/report/new/fill_in_details_form.html:27 +#: templates/web/bromley/report/new/fill_in_details_form.html:25 templates/web/default/report/new/fill_in_details_form.html:7 templates/web/fixmystreet/report/new/fill_in_details_form.html:28 msgid "You have located the problem at the point marked with a green pin on the map. If this is not the correct location, simply click on the map again. " msgstr "" @@ -2588,7 +2608,7 @@ msgstr "" msgid "You have successfully deleted your alert." msgstr "" -#: perllib/FixMyStreet/App/Controller/Report/New.pm:740 perllib/FixMyStreet/App/Controller/Report/Update.pm:136 +#: perllib/FixMyStreet/App/Controller/Report/New.pm:740 perllib/FixMyStreet/App/Controller/Report/Update.pm:140 msgid "You have successfully signed in; please check and confirm your details are accurate:" msgstr "" @@ -2604,11 +2624,11 @@ msgstr "" msgid "Your Reports" msgstr "" -#: templates/web/bromley/report/display.html:41 templates/web/bromley/report/display.html:43 templates/web/bromley/report/new/fill_in_details_form.html:145 templates/web/fixmystreet/alert/_list.html:89 templates/web/fixmystreet/alert/updates.html:19 templates/web/fixmystreet/alert/updates.html:22 templates/web/fixmystreet/contact/index.html:72 templates/web/fixmystreet/report/display.html:34 templates/web/fixmystreet/report/display.html:36 templates/web/fixmystreet/report/new/fill_in_details_form.html:142 +#: templates/web/bromley/report/display.html:41 templates/web/bromley/report/display.html:43 templates/web/bromley/report/new/fill_in_details_form.html:145 templates/web/fixmystreet/alert/_list.html:89 templates/web/fixmystreet/alert/updates.html:19 templates/web/fixmystreet/alert/updates.html:22 templates/web/fixmystreet/contact/index.html:72 templates/web/fixmystreet/report/display.html:38 templates/web/fixmystreet/report/display.html:40 templates/web/fixmystreet/report/new/fill_in_details_form.html:146 msgid "Your email" msgstr "" -#: templates/web/bromley/report/display.html:130 templates/web/fixmystreet/auth/general.html:26 templates/web/fixmystreet/report/display.html:124 +#: templates/web/bromley/report/display.html:130 templates/web/fixmystreet/auth/general.html:26 templates/web/fixmystreet/report/display.html:129 msgid "Your email address" msgstr "" @@ -2616,7 +2636,7 @@ msgstr "" msgid "Your email address:" msgstr "" -#: templates/web/default/alert/_list.html:92 templates/web/default/report/display.html:128 templates/web/default/report/new/fill_in_details_form.html:124 +#: templates/web/default/alert/_list.html:92 templates/web/default/report/display.html:128 templates/web/default/report/new/fill_in_details_form.html:124 templates/web/fixmybarangay/alert/_list.html:37 msgid "Your email:" msgstr "" @@ -2632,7 +2652,7 @@ msgstr "" msgid "Your last name" msgstr "" -#: templates/web/fixmystreet/auth/general.html:53 templates/web/fixmystreet/contact/index.html:65 templates/web/fixmystreet/report/display.html:181 templates/web/fixmystreet/report/new/fill_in_details_form.html:121 templates/web/fixmystreet/report/new/fill_in_details_form.html:181 +#: templates/web/fixmystreet/auth/general.html:57 templates/web/fixmystreet/contact/index.html:65 templates/web/fixmystreet/report/display.html:186 templates/web/fixmystreet/report/new/fill_in_details_form.html:123 templates/web/fixmystreet/report/new/fill_in_details_form.html:185 msgid "Your name" msgstr "" @@ -2640,7 +2660,7 @@ msgstr "" msgid "Your name:" msgstr "" -#: templates/web/bromley/report/display.html:160 templates/web/bromley/report/new/fill_in_details_form.html:203 templates/web/fixmystreet/auth/general.html:37 templates/web/fixmystreet/report/display.html:138 templates/web/fixmystreet/report/new/fill_in_details_form.html:161 +#: templates/web/bromley/report/display.html:160 templates/web/bromley/report/new/fill_in_details_form.html:203 templates/web/fixmystreet/auth/general.html:41 templates/web/fixmystreet/report/display.html:143 templates/web/fixmystreet/report/new/fill_in_details_form.html:165 msgid "Your password" msgstr "" @@ -2648,7 +2668,7 @@ msgstr "" msgid "Your password has been changed" msgstr "" -#: templates/web/bromley/report/new/fill_in_details_form.html:137 templates/web/bromley/report/new/fill_in_details_form.html:184 templates/web/fixmystreet/report/new/fill_in_details_form.html:134 templates/web/fixmystreet/report/new/fill_in_details_form.html:195 +#: templates/web/bromley/report/new/fill_in_details_form.html:137 templates/web/bromley/report/new/fill_in_details_form.html:184 templates/web/fixmystreet/report/new/fill_in_details_form.html:138 templates/web/fixmystreet/report/new/fill_in_details_form.html:199 msgid "Your phone number" msgstr "" @@ -2680,7 +2700,7 @@ msgstr "" msgid "didn't use map" msgstr "" -#: templates/web/default/alert/index.html:33 templates/web/fixmystreet/around/postcode_form.html:17 +#: templates/web/default/alert/index.html:33 templates/web/fixmystreet/around/postcode_form.html:26 msgid "e.g. ‘%s’ or ‘%s’" msgstr "" @@ -2704,7 +2724,7 @@ msgstr "" msgid "n/a" msgstr "" -#: templates/web/default/alert/_list.html:87 templates/web/fixmystreet/alert/_list.html:85 +#: templates/web/default/alert/_list.html:87 templates/web/fixmybarangay/alert/_list.html:32 templates/web/fixmystreet/alert/_list.html:85 msgid "or" msgstr "" @@ -2720,7 +2740,7 @@ msgstr "" msgid "reopened" msgstr "" -#: templates/web/barnet/header.html:71 templates/web/bromley/header.html:100 templates/web/bromley/header.html:65 templates/web/fixmybarangay/header.html.orig:43 templates/web/fixmystreet/header.html:48 templates/web/zurich/header.html:48 +#: templates/web/barnet/header.html:71 templates/web/bromley/header.html:100 templates/web/bromley/header.html:65 templates/web/fixmybarangay/header.html:63 templates/web/fixmystreet/header.html:48 templates/web/zurich/header.html:48 msgid "sign out" msgstr "" @@ -2728,11 +2748,11 @@ msgstr "" msgid "the local council" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:541 +#: perllib/FixMyStreet/DB/Result/Problem.pm:547 msgid "the map was not used so pin location may be inaccurate" msgstr "" -#: perllib/FixMyStreet/DB/Result/Problem.pm:603 +#: perllib/FixMyStreet/DB/Result/Problem.pm:609 msgid "their ref: %s" msgstr "" diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index ef299d224..2d1cf2c5a 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -305,6 +305,10 @@ sub update_contacts : Private { $contact->note( $c->req->param('note') ); $contact->whenedited( \'ms_current_timestamp()' ); $contact->editor( $editor ); + $contact->endpoint( $c->req->param('endpoint') ); + $contact->jurisdiction( $c->req->param('jurisdiction') ); + $contact->api_key( $c->req->param('api_key') ); + $contact->send_method( $c->req->param('send_method') ); if ( $contact->in_storage ) { $c->stash->{updated} = _('Values updated'); @@ -341,7 +345,7 @@ sub update_contacts : Private { } elsif ( $posted eq 'open311' ) { $c->forward('check_token'); - my %params = map { $_ => $c->req->param($_) || '' } qw/open311_id endpoint jurisdiction api_key area_id send_method send_comments suppress_alerts comment_user_id/; + my %params = map { $_ => $c->req->param($_) || '' } qw/open311_id endpoint jurisdiction api_key area_id send_method send_comments suppress_alerts comment_user_id devolved/; if ( $params{open311_id} ) { my $conf = $c->model('DB::Open311Conf')->find( { id => $params{open311_id} } ); @@ -353,6 +357,7 @@ sub update_contacts : Private { $conf->send_comments( $params{send_comments} || 0); $conf->suppress_alerts( $params{suppress_alerts} || 0); $conf->comment_user_id( $params{comment_user_id} || undef ); + $conf->can_be_devolved( $params{devolved} || 0 ); $conf->update(); @@ -367,6 +372,7 @@ sub update_contacts : Private { $conf->send_comments( $params{send_comments} || 0); $conf->suppress_alerts( $params{suppress_alerts} || 0); $conf->comment_user_id( $params{comment_user_id} || undef ); + $conf->can_be_devolved( $params{devolved} || 0 ); $conf->insert(); @@ -462,6 +468,9 @@ sub council_edit : Path('council_edit') : Args(2) { $c->stash->{history} = $history; + my @methods = map { $_ =~ s/FixMyStreet::SendReport:://; $_ } keys %{ FixMyStreet::SendReport->get_senders }; + $c->stash->{send_methods} = \@methods; + return 1; } diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm index 3047b195c..f2bb23350 100644 --- a/perllib/FixMyStreet/App/Controller/Around.pm +++ b/perllib/FixMyStreet/App/Controller/Around.pm @@ -45,7 +45,7 @@ sub around_index : Path : Args(0) { || $c->forward('/location/determine_location_from_pc'); # Check to see if the spot is covered by a council - if not show an error. - return unless $c->forward('check_location_is_acceptable'); + return unless $c->cobrand->moniker eq 'fixmybarangay' || $c->forward('check_location_is_acceptable'); # If we have a partial - redirect to /report/new so that it can be # completed. @@ -204,6 +204,7 @@ sub display_location : Private { longitude => $short_longitude, clickable => 1, pins => \@pins, + area => $c->cobrand->areas_on_around, ); return 1; diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm index cda569860..a7e1e8a3a 100644 --- a/perllib/FixMyStreet/App/Controller/Report.pm +++ b/perllib/FixMyStreet/App/Controller/Report.pm @@ -56,6 +56,23 @@ sub display : Path('') : Args(1) { $c->forward( 'format_problem_for_display' ); } +sub support : Path('support') : Args(0) { + my ( $self, $c ) = @_; + + my $id = $c->req->param('id'); + + my $uri = + $id + ? $c->uri_for( '/report', $id ) + : $c->uri_for('/'); + + if ( $id && $c->cobrand->can_support_problems && $c->user && $c->user->from_council ) { + $c->forward( 'load_problem_or_display_error', [ $id ] ); + $c->stash->{problem}->update( { interest_count => \'interest_count +1' } ); + } + $c->res->redirect( $uri ); +} + sub load_problem_or_display_error : Private { my ( $self, $c, $id ) = @_; diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index a2c5e6a0c..a4462e035 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -1010,6 +1010,13 @@ sub save_user_and_report : Private { # Set unknown to DB unknown $report->council( undef ) if $report->council eq '-1'; + # if there is a Message Manager message ID, pass it back to the client view + if ($c->cobrand->moniker eq 'fixmybarangay' && $c->req->param('external_source_id')=~/^\d+$/) { + $c->stash->{external_source_id} = $c->req->param('external_source_id'); + $report->external_source_id( $c->req->param('external_source_id') ); + $report->external_source( $c->config->{MESSAGE_MANAGER_URL} ) ; + } + # save the report; $report->in_storage ? $report->update : $report->insert(); @@ -1080,7 +1087,13 @@ sub redirect_or_confirm_creation : Private { if ( $report->confirmed ) { # Subscribe problem reporter to email updates $c->forward( 'create_reporter_alert' ); - my $report_uri = $c->cobrand->base_url_for_report( $report ) . $report->url; + my $report_uri; + + if ( $c->cobrand->moniker eq 'fixmybarangay' && $c->user->from_council && $c->stash->{external_source_id}) { + $report_uri = $c->uri_for( '/report', $report->id, undef, { external_source_id => $c->stash->{external_source_id} } ); + } else { + $report_uri = $c->cobrand->base_url_for_report( $report ) . $report->url; + } $c->log->info($report->user->id . ' was logged in, redirecting to /report/' . $report->id); $c->res->redirect($report_uri); $c->detach; diff --git a/perllib/FixMyStreet/App/Controller/Report/Update.pm b/perllib/FixMyStreet/App/Controller/Report/Update.pm index c49123a90..da4cc33ca 100644 --- a/perllib/FixMyStreet/App/Controller/Report/Update.pm +++ b/perllib/FixMyStreet/App/Controller/Report/Update.pm @@ -76,6 +76,10 @@ sub update_problem : Private { $problem->state('confirmed'); } + if ( $c->cobrand->can_support_problems && $c->user && $c->user->from_council && $c->req->param('external_source_id') ) { + $problem->interest_count( \'interest_count + 1' ); + } + $problem->lastupdate( \'ms_current_timestamp()' ); $problem->update; @@ -348,6 +352,7 @@ sub redirect_or_confirm_creation : Private { if ( $update->confirmed ) { $c->forward( 'update_problem' ); $c->forward( 'signup_for_alerts' ); + my $report_uri = $c->cobrand->base_url_for_report( $update->problem ) . $update->problem->url; $c->res->redirect($report_uri); $c->detach; diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 8d0b5ab50..cfc9455b5 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -645,7 +645,34 @@ Get stats to display on the council reports page sub get_report_stats { return 0; } -sub get_council_sender { return 'Email' }; +sub get_council_sender { + my ( $self, $area_id, $area_info, $category ) = @_; + + my $send_method; + + my $council_config = FixMyStreet::App->model("DB::Open311conf")->search( { area_id => $area_id } )->first; + $send_method = $council_config->send_method if $council_config; + + if ( $council_config && $council_config->can_be_devolved ) { + # look up via category + my $config = FixMyStreet::App->model("DB::Contact")->search( { area_id => $area_id, category => $category } )->first; + if ( $config->send_method ) { + return { method => $config->send_method, config => $config }; + } else { + return { method => $send_method, config => $council_config }; + } + } elsif ( $send_method ) { + return { method => $send_method, config => $council_config }; + } + + return $self->_fallback_council_sender( $area_id, $area_info, $category ); +} + +sub _fallback_council_sender { + my ( $self, $area_id, $area_info, $category ) = @_; + + return { method => 'Email' }; +}; sub example_places { my $e = FixMyStreet->config('EXAMPLE_PLACES') || [ 'High Street', 'Main Street' ]; @@ -653,6 +680,24 @@ sub example_places { return $e; } +=head2 only_authed_can_create + +If true, only users with the from_council flag set are able to create reports. + +=cut + +sub only_authed_can_create { + return 0; +} + +=head2 areas_on_around + +If set to an arrayref, will plot those area ID(s) from mapit on all the /around pages. + +=cut + +sub areas_on_around {} + sub process_extras {} =head 2 pin_colour @@ -678,5 +723,7 @@ Used in some cobrands to improve the intial display for Internet Explorer. sub tweak_all_reports_map {} +sub can_support_problems { return 0; } + 1; diff --git a/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm b/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm new file mode 100644 index 000000000..e2a8e9f87 --- /dev/null +++ b/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm @@ -0,0 +1,50 @@ +package FixMyStreet::Cobrand::FixMyBarangay; +use base 'FixMyStreet::Cobrand::Default'; + +use strict; +use warnings; + +sub path_to_web_templates { + my $self = shift; + return [ + FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify, + FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify + ]; +} + +sub country { + return 'PH'; +} + +sub language_domain { 'FixMyBarangay' } + +sub area_types { + return [ 'BGY' ]; +} + +sub disambiguate_location { + return { + country => 'ph', + bing_country => 'Philippines', + }; +} + +sub site_title { + my ($self) = @_; + return 'FixMyBarangay'; +} + +sub only_authed_can_create { + return 1; +} + +sub areas_on_around { + return [ 1, 2 ]; +} + +sub can_support_problems { + return 1; +} + +1; + diff --git a/perllib/FixMyStreet/Cobrand/UK.pm b/perllib/FixMyStreet/Cobrand/UK.pm index 0d6f98590..75f6ba061 100644 --- a/perllib/FixMyStreet/Cobrand/UK.pm +++ b/perllib/FixMyStreet/Cobrand/UK.pm @@ -31,19 +31,11 @@ sub disambiguate_location { }; } -sub get_council_sender { - my ( $self, $area_id, $area_info ) = @_; - - my $send_method; - - my $council_config = FixMyStreet::App->model("DB::Open311conf")->search( { area_id => $area_id } )->first; - $send_method = $council_config->send_method if $council_config; - - return $send_method if $send_method; - - return 'London' if $area_info->{type} eq 'LBO'; - return 'NI' if $area_info->{type} eq 'LGD'; - return 'Email'; +sub _fallback_council_sender { + my ( $self, $area_id, $area_info, $category ) = @_; + return { method => 'London' } if $area_info->{type} eq 'LBO'; + return { method => 'NI' } if $area_info->{type} eq 'LGD'; + return { method => 'Email' }; } sub process_extras { diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index 91695d7d0..8c9fea282 100644 --- a/perllib/FixMyStreet/DB/Result/Comment.pm +++ b/perllib/FixMyStreet/DB/Result/Comment.pm @@ -54,10 +54,6 @@ __PACKAGE__->add_columns( { data_type => "boolean", default_value => \"false", is_nullable => 0 }, "problem_state", { data_type => "text", is_nullable => 1 }, - "external_id", - { data_type => "text", is_nullable => 1 }, - "extra", - { data_type => "text", is_nullable => 1 }, "send_fail_count", { data_type => "integer", default_value => 0, is_nullable => 0 }, "send_fail_reason", @@ -66,6 +62,10 @@ __PACKAGE__->add_columns( { data_type => "timestamp", is_nullable => 1 }, "whensent", { data_type => "timestamp", is_nullable => 1 }, + "external_id", + { data_type => "text", is_nullable => 1 }, + "extra", + { data_type => "text", is_nullable => 1 }, ); __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( @@ -82,8 +82,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-03-26 15:44:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nvkElEgSU6XcLd9znSqhmQ +# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-07-11 18:53:26 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tSejJzLxHD/fMWjpa10lfA __PACKAGE__->filter_column( extra => { diff --git a/perllib/FixMyStreet/DB/Result/Contact.pm b/perllib/FixMyStreet/DB/Result/Contact.pm index cad12f1fc..993e3524b 100644 --- a/perllib/FixMyStreet/DB/Result/Contact.pm +++ b/perllib/FixMyStreet/DB/Result/Contact.pm @@ -38,6 +38,14 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 1 }, "non_public", { data_type => "boolean", default_value => \"false", is_nullable => 1 }, + "endpoint", + { data_type => "text", is_nullable => 1 }, + "jurisdiction", + { data_type => "text", default_value => "", is_nullable => 1 }, + "api_key", + { data_type => "text", default_value => "", is_nullable => 1 }, + "send_method", + { data_type => "text", is_nullable => 1 }, ); __PACKAGE__->set_primary_key("id"); __PACKAGE__->add_unique_constraint("contacts_area_id_category_idx", ["area_id", "category"]); diff --git a/perllib/FixMyStreet/DB/Result/Open311conf.pm b/perllib/FixMyStreet/DB/Result/Open311conf.pm index c95b0c8f2..8051e27de 100644 --- a/perllib/FixMyStreet/DB/Result/Open311conf.pm +++ b/perllib/FixMyStreet/DB/Result/Open311conf.pm @@ -34,6 +34,8 @@ __PACKAGE__->add_columns( { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "suppress_alerts", { data_type => "boolean", default_value => \"false", is_nullable => 0 }, + "can_be_devolved", + { data_type => "boolean", default_value => \"false", is_nullable => 0 }, ); __PACKAGE__->set_primary_key("id"); __PACKAGE__->add_unique_constraint("open311conf_area_id_key", ["area_id"]); @@ -50,8 +52,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-05-11 13:30:31 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ByJbRe/Y/9Z1WHdG8kaIHg +# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-08-29 14:04:20 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Yoult8K/ldH6DMAKURtr3Q # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index a1cf107a9..761f57b01 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -94,6 +94,12 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 1 }, "non_public", { data_type => "boolean", default_value => \"false", is_nullable => 1 }, + "external_source", + { data_type => "text", is_nullable => 1 }, + "external_source_id", + { data_type => "text", is_nullable => 1 }, + "interest_count", + { data_type => "integer", is_nullable => 1 }, ); __PACKAGE__->set_primary_key("id"); __PACKAGE__->has_many( diff --git a/perllib/FixMyStreet/DB/ResultSet/Problem.pm b/perllib/FixMyStreet/DB/ResultSet/Problem.pm index 2f426e8ca..f7f88edf0 100644 --- a/perllib/FixMyStreet/DB/ResultSet/Problem.pm +++ b/perllib/FixMyStreet/DB/ResultSet/Problem.pm @@ -310,8 +310,8 @@ sub send_reports { foreach my $council (@councils) { my $name = $areas_info->{$council}->{name}; - my $sender = $cobrand->get_council_sender( $council, $areas_info->{$council} ); - $sender = "FixMyStreet::SendReport::$sender"; + my $sender_info = $cobrand->get_council_sender( $council, $areas_info->{$council}, $row->category ); + my $sender = "FixMyStreet::SendReport::" . $sender_info->{method}; if ( ! exists $senders->{ $sender } ) { warn "No such sender [ $sender ] for council $name ( $council )"; @@ -324,7 +324,7 @@ sub send_reports { $reporters{ $sender }->skipped; } else { push @dear, $name; - $reporters{ $sender }->add_council( $council, $areas_info->{$council} ); + $reporters{ $sender }->add_council( $council, $areas_info->{$council}, $sender_info->{config} ); } } diff --git a/perllib/FixMyStreet/SendReport.pm b/perllib/FixMyStreet/SendReport.pm index f750ef479..9ba507862 100644 --- a/perllib/FixMyStreet/SendReport.pm +++ b/perllib/FixMyStreet/SendReport.pm @@ -39,8 +39,9 @@ sub add_council { my $self = shift; my $council = shift; my $info = shift; + my $config = shift; - $self->councils->{ $council } = $info; + $self->councils->{ $council } = { info => $info, config => $config }; } diff --git a/perllib/FixMyStreet/SendReport/Email.pm b/perllib/FixMyStreet/SendReport/Email.pm index 654ed6b3a..11ca196fb 100644 --- a/perllib/FixMyStreet/SendReport/Email.pm +++ b/perllib/FixMyStreet/SendReport/Email.pm @@ -12,6 +12,7 @@ sub build_recipient_list { my $all_confirmed = 1; foreach my $council ( keys %{ $self->councils } ) { + my $contact = FixMyStreet::App->model("DB::Contact")->find( { deleted => 0, area_id => $council, @@ -32,7 +33,7 @@ sub build_recipient_list { $self->unconfirmed_notes->{$council_email}{$row->category} = $note; } - push @{ $self->to }, [ $council_email, $self->councils->{ $council }->{name} ]; + push @{ $self->to }, [ $council_email, $self->councils->{ $council }->{info}->{name} ]; $recips{$council_email} = 1; } diff --git a/perllib/FixMyStreet/SendReport/EmptyHomes.pm b/perllib/FixMyStreet/SendReport/EmptyHomes.pm index e1b914523..4a6f058fe 100644 --- a/perllib/FixMyStreet/SendReport/EmptyHomes.pm +++ b/perllib/FixMyStreet/SendReport/EmptyHomes.pm @@ -28,7 +28,7 @@ sub build_recipient_list { #$note{$council_email}{$row->category} = $note; } - push @{ $self->to }, [ $council_email, $self->councils->{ $council }->{name} ]; + push @{ $self->to }, [ $council_email, $self->councils->{ $council }->{ info }->{name} ]; $recips{$council_email} = 1; my $country = $self->councils->{$council}->{country}; diff --git a/perllib/FixMyStreet/SendReport/NI.pm b/perllib/FixMyStreet/SendReport/NI.pm index 0783a385b..810ee60e2 100644 --- a/perllib/FixMyStreet/SendReport/NI.pm +++ b/perllib/FixMyStreet/SendReport/NI.pm @@ -23,7 +23,7 @@ sub build_recipient_list { $email = 'N/A' unless $email; } - my $name = $self->councils->{$council}->{name}; + my $name = $self->councils->{$council}->{info}->{name}; if ( $email =~ /^roads.([^@]*)\@drdni/ ) { $name = "Roads Service (\u$1)"; $h->{councils_name} = $name; diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm index 42c103b82..70bce3d47 100644 --- a/perllib/FixMyStreet/SendReport/Open311.pm +++ b/perllib/FixMyStreet/SendReport/Open311.pm @@ -28,7 +28,7 @@ sub send { my $result = -1; foreach my $council ( keys %{ $self->councils } ) { - my $conf = FixMyStreet::App->model("DB::Open311conf")->search( { area_id => $council, endpoint => { '!=', '' } } )->first; + my $conf = $self->councils->{$council}->{config}; my $always_send_latlong = 1; my $send_notpinpointed = 0; @@ -94,10 +94,15 @@ sub send { $row->user->name( $row->user->id . ' ' . $row->user->name ); } + if ($row->cobrand eq 'fixmybarangay') { + # FixMyBarangay endpoints expect external_id as an attribute + $row->extra( [ { 'name' => 'external_id', 'value' => $row->id } ] ); + } + my $resp = $open311->send_service_request( $row, $h, $contact->email ); # make sure we don't save user changes from above - if ( $row->council =~ /2218/ || $row->council =~ /2482/ ) { + if ( $row->council =~ /2218/ || $row->council =~ /2482/ || $row->cobrand eq 'fixmybarangay') { $row->discard_changes(); } diff --git a/perllib/Open311/PopulateServiceList.pm b/perllib/Open311/PopulateServiceList.pm index 7b5f4c7fe..39502f3b1 100644 --- a/perllib/Open311/PopulateServiceList.pm +++ b/perllib/Open311/PopulateServiceList.pm @@ -21,6 +21,7 @@ sub process_councils { while ( my $council = $self->council_list->next ) { next unless $council->endpoint; + next unless $council->send_method eq 'open311'; $self->_current_council( $council ); $self->process_council; } diff --git a/perllib/PoChange.pm b/perllib/PoChange.pm index deecd3b00..06b78fa3f 100644 --- a/perllib/PoChange.pm +++ b/perllib/PoChange.pm @@ -3,6 +3,19 @@ use strict; package PoChange; +sub translate($$) { + my $file = shift; + my $s = shift; + + if ( $file eq 'FixMyStreet-EmptyHomes' ) { + return fixmystreet_to_reportemptyhomes( $s ); + } elsif ( $file eq 'FixMyBarangay' ) { + return fixmystreet_to_fixmybarangay( $s ); + } + + return $s; +} + # Takes a msgid from the main FixMyStreet .po file and # converts it to a msgid for the ReportEmptyHomes .po file sub fixmystreet_to_reportemptyhomes($) { @@ -35,4 +48,16 @@ sub fixmystreet_to_reportemptyhomes($) { return $s; } +sub fixmystreet_to_fixmybarangay($) { + my $s = shift; + + $s =~ s/FixMyStreet/FixMyBarangay/g; + $s =~ s/\bcouncil\b/barangay/g; + $s =~ s/\bCouncil\b/Barangay/g; + $s =~ s/\bcouncils\b/barangays/g; + $s =~ s/\bCouncils\b/Barangays/g; + + return $s; +} + 1; diff --git a/t/cobrand/get_council_sender.t b/t/cobrand/get_council_sender.t index 9004a47f5..e61f36370 100644 --- a/t/cobrand/get_council_sender.t +++ b/t/cobrand/get_council_sender.t @@ -13,8 +13,8 @@ mySociety::Locale::gettext_domain( 'FixMyStreet' ); my $c = FixMyStreet::Cobrand::FixMyStreet->new(); -is $c->get_council_sender( '1000', { type => 'DIS' } ), 'Email', 'defaults to email'; -is $c->get_council_sender( '1000', { type => 'LBO' } ), 'London', 'returns london report it if London borough'; +is_deeply $c->get_council_sender( '1000', { type => 'DIS' } ), { method => 'Email' }, 'defaults to email'; +is_deeply $c->get_council_sender( '1000', { type => 'LBO' } ), { method=> 'London' }, 'returns london report it if London borough'; my $conf = FixMyStreet::App->model('DB::Open311Conf')->find_or_create( area_id => 1000, @@ -22,8 +22,8 @@ my $conf = FixMyStreet::App->model('DB::Open311Conf')->find_or_create( send_method => 'TestMethod' ); -is $c->get_council_sender( '1000', { type => 'LBO' } ), 'TestMethod', 'uses send_method in preference to London'; -is $c->get_council_sender( '1000', { type => 'DIS' } ), 'TestMethod', 'uses send_method in preference to Email'; +is $c->get_council_sender( '1000', { type => 'LBO' } )->{ method }, 'TestMethod', 'uses send_method in preference to London'; +is $c->get_council_sender( '1000', { type => 'DIS' } )->{ method }, 'TestMethod', 'uses send_method in preference to Email'; $conf->delete; diff --git a/templates/web/default/admin/council_contacts.html b/templates/web/default/admin/council_contacts.html index 60e270c7c..eb9606a31 100644 --- a/templates/web/default/admin/council_contacts.html +++ b/templates/web/default/admin/council_contacts.html @@ -1,5 +1,7 @@ [% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), council_name) -%] +[% conf = open311.next %] + [% IF updated %] <p> <em>[% updated %]</em> @@ -36,6 +38,7 @@ <th>[% loc('Email') %]</th> <th>[% loc('Confirmed') %]</th> <th>[% loc('Deleted') %]</th> + <th>[% loc('Devolved') %]</th> <th>[% loc('Last editor') %]</th> <th>[% loc('Note') %]</th> <th>[% loc('Public') %]</th> @@ -48,6 +51,7 @@ <td>[% contact.email | html %]</td> <td>[% IF contact.confirmed %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> <td>[% IF contact.deleted %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> + <td>[% IF conf.can_be_devolved && contact.send_method %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> <td>[% contact.editor %]</td> <td>[% contact.note | html %]</td> <td>[% contact.non_public ? loc('Non Public') : loc('Public') %]</td> @@ -111,7 +115,6 @@ <h2>[% loc('Configure Open311 integration') %]</h2> <form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> - [% conf = open311.next %] <p> <label for="endpoint">Endpoint</label>: <input type="text" name="endpoint" id="endpoint" value="[% conf.endpoint %]" size="50"> @@ -153,6 +156,11 @@ </p> <p> + <label for="devolved">Endpoint lookup can be devolved to contacts</label>: + <input type="checkbox" name="devolved"[% ' checked' IF conf.can_be_devolved %]> + </p> + + <p> <input type="hidden" name="open311_id" value="[% conf.id %]"> <input type="hidden" name="area_id" value="[% area_id %]"> <input type="hidden" name="posted" value="open311"> diff --git a/templates/web/default/admin/council_edit.html b/templates/web/default/admin/council_edit.html index 9ec0578ff..408466b51 100644 --- a/templates/web/default/admin/council_edit.html +++ b/templates/web/default/admin/council_edit.html @@ -31,6 +31,33 @@ <strong>[% loc('Note:') %] </strong><textarea name="note" rows="3" cols="40">[% contact.note | html %]</textarea> <br> + <h2>[% loc('Configure Endpoint') %]</h2> + <form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <p> + <label for="endpoint">Endpoint</label>: + <input type="text" name="endpoint" id="endpoint" value="[% contact.endpoint %]" size="50"> + </p> + + <p> + <label for="jurisdiction">Jurisdiction</label>: + <input type="text" name="jurisdiction" id="jurisdiction" value="[% contact.jurisdiction %]" size="50"> + </p> + + <p> + <label for="api_key">Api Key</label>: + <input type="text" name="api_key" id="api_key" value="[% contact.api_key %]" size="25"> + </p> + + <p> + <label for="send_method">Send Method</label>: + <select name="send_method"> + <option value=""> -- Select a method -- </option> + [% FOR method IN send_methods %] + <option value="[% method %]"[% ' selected' IF contact.send_method == method %]>[% method %]</option> + [% END %] + </select> + </p> + <input type="hidden" name="area_id" value="[% area_id %]"> <input type="hidden" name="posted" value="new"> <input type="submit" name="Save changes" value="[% loc('Save changes') %]"> diff --git a/templates/web/default/dashboard/index.html b/templates/web/default/dashboard/index.html index c2bfa9ea3..169d7d3fe 100644 --- a/templates/web/default/dashboard/index.html +++ b/templates/web/default/dashboard/index.html @@ -17,6 +17,7 @@ </hgroup> <div class="filters"> + [% IF c.cobrand.moniker != 'fixmybarangay' %] <p> <label for="ward">Ward:</label> <select name="ward"><option value=''>All</option> @@ -25,6 +26,7 @@ [% END %] </select> </p> + [% END %] <p> <label for="category">Report category:</label> diff --git a/templates/web/default/maps/openlayers.html b/templates/web/default/maps/openlayers.html index e815642f1..b75e2bbd8 100644 --- a/templates/web/default/maps/openlayers.html +++ b/templates/web/default/maps/openlayers.html @@ -8,7 +8,7 @@ <script type="text/javascript"> var fixmystreet = { 'page': '[% page %]', - 'area': '[% map.area %]', + 'area': [ [% map.area.join(',') %] ], 'all_pins': '[% all_pins %]', 'latitude': [% map.latitude %], 'longitude': [% map.longitude %], diff --git a/templates/web/fixmybarangay/alert/_list.html b/templates/web/fixmybarangay/alert/_list.html new file mode 100644 index 000000000..8491b4562 --- /dev/null +++ b/templates/web/fixmybarangay/alert/_list.html @@ -0,0 +1,45 @@ + <input type="hidden" name="type" value="local"> + <input type="hidden" name="pc" value="[% pc | html %]"> + + + <p> + [% loc("Subscribe to an alert based upon what baranagay you’re in:") %] + </p> + + [% INCLUDE 'errors.html' %] + + <div id="rss_list"> + <p><strong> + [% loc('Problems within the boundary of:') %] + </strong></p> + <ul class="plain-list"> + + [% FOREACH option IN options %] + <li[% IF ! (loop.count % 2) %] class="a"[% END %]> + <input type="radio" name="feed" id="[% option.id %]" value="[% option.id %]"[% IF option.id == selected_feed %] checked[% END %]> + <label class="inline" for="[% option.id %]">[% option.text %]</label> + <a href="[% option.uri %]"><img src="/i/feed.png" width="16" height="16" +title="[% option.rss_text %]" alt="RSS feed" border="0"></a> + </li> + [% END %] +</ul> + + <p> + <input type="submit" name="rss" value="[% loc('Give me an RSS feed') %]"> + <p> + + <p id="alert_or"> + [% loc('or') %] + </p> + + [% UNLESS c.user_exists %] + <p> + [% loc('Your email:') %] <input type="text" id="rznvy" name="rznvy" value="[% rznvy | html %]" size="30"> + </p> + [% END %] + + <p> + <input type="submit" name="alert" value="[% loc('Subscribe me to an email alert') %]"> + </p> + </div> <!-- ???? --> + diff --git a/templates/web/fixmybarangay/alert/index.html b/templates/web/fixmybarangay/alert/index.html new file mode 100644 index 000000000..d9bb74ee9 --- /dev/null +++ b/templates/web/fixmybarangay/alert/index.html @@ -0,0 +1,45 @@ +[% INCLUDE 'header.html', title = loc('Local RSS feeds and email alerts'), bodyclass = 'twothirdswidthpage' %] + +<h1>[% loc('Local RSS feeds and email alerts') %]</h1> + +<p> +FixMyBarangay has a RSS feeds and email alerts for local problems. +</p> + +[% IF location_error %] + <div class="error">[% location_error %]</div> +[% ELSE %] + [% INCLUDE 'errors.html' %] +[% END %] + +[% options = [ { + id => 'council:1:Luz', + text => 'Luz', + uri => '/rss/reports/Luz' + }, + { + id => 'council:2:Basak_San_Nicolas', + text => 'Basak San Nicolas' + uri => '/rss/reports/Basak+San_Nicolas' + } ]; +%] + +<form id="alerts" name="alerts" method="post" action="/alert/subscribe"> + +[% IF photos.size %] +<div class="sticky-sidebar" id="alert_recent"> + <aside> + <h2>[% loc('Some photos of recent reports') %]</h2> + [% FOREACH p IN photos %] + <a href="/report/[% p.id %]"><img border="0" height="100" + src="/photo/[% p.id %].tn.jpeg" alt="[% p.title | html %]" title="[% p.title | html %]"></a> + [% END %] + </aside> +</div> +[% END %] + +[% INCLUDE 'alert/_list.html' %] + +</form> + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/fixmybarangay/around/tabbed_lists.html b/templates/web/fixmybarangay/around/tabbed_lists.html new file mode 100644 index 000000000..14461628c --- /dev/null +++ b/templates/web/fixmybarangay/around/tabbed_lists.html @@ -0,0 +1,18 @@ +[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council); + +IF allow_creation %] +<menu id="problems-nav" class="tab-nav"> + <ul> + <li><a href="#current">Problems on the map</a></li> + <li><a href="#message_manager">Problems via text</a></li> + </ul> +</menu> +[% END %] + +<ul id="current" class="issue-list-a tab"> + [% INCLUDE "around/on_map_list_items.html" %] +</ul> + +[% IF allow_creation %] + [% TRY %][% INCLUDE 'report/_message_manager.html' %][% CATCH file %][% END %] +[% END %] diff --git a/templates/web/fixmybarangay/faq/faq-en-gb.html b/templates/web/fixmybarangay/faq/faq-en-gb.html new file mode 100644 index 000000000..320a7528e --- /dev/null +++ b/templates/web/fixmybarangay/faq/faq-en-gb.html @@ -0,0 +1,135 @@ +[% INCLUDE 'header.html', title => loc('Frequently Asked Questions'), bodyclass => 'twothirdswidthpage' %] + +<div class="sticky-sidebar"> + <aside> + <ul class="plain-list"> + <li><a href="#faq">Frequently Asked Questions</a></li> + <li><a href="#practical">Staff Questions</a></li> + <li><a href="#organisation">Organisation Questions</a></li> + </ul> + </aside> +</div> + +<h1><a name="faq"></a>Frequently Asked Questions</h1> + <dl> + <dt>What is FixMyBarangay?</dt> + <dd>FixMyBarangay is a site to help people report, view, +or discuss local problems they’ve found to the city departments. +The pilot project lets you report the problems by SMS (or dropping +into the barangay center). +</dd> + <dt>What areas are covered?</dt> + <dd> + The pilot project is just running in two barangays in Cebu – + Luz and Basak San Nicolas. + </dd> + <dt>What sort of problems should I report with FixMyBarangay?</dt> + <dd>The FixMyBarangay pilot project is just for potholes (and similar + road surface problems) and broken streetlights. + </dd> + + <dt>What isn’t FixMyBarangay for?</dt> + <dd>FixMyStreet is not a way of getting in touch with Cebu City Hall for other problems + – please use FixMyBarangay only for potholes and streetlights while the pilot + project is running.. + </dd> + + <dt>Staff only: How do I use the site?</dt> + <dd>If you have a staff login, you can view problems already reported in that area, +or report ones of your own simply by clicking on the map at the location of +the problem.</dd> + <dt>How are the problems solved?</dt> + <dd>Problems sent by SMS are initially handled by the barangay staff – they'll + confirm the problem and report it to the relevant department automatically. + Once it's in the department's problem-tracking system, they'll get onto it as + soon as they can.</dd> + <dt>Is it free?</dt> + <dd>The site is free to use, yes. The pilot project has been funded by the World Bank.</dd> + + </dl> + + <h2><a name="practical"></a>Staff questions</h2> + <dl> + <dt>What's my login?</dt> + <dd> + You can use your email address and set a password right away, but your + account won't be enabled as a <em>staff account</em> until one of the + system administrators has checked it. TODO: contact details. + </dd> + <dt>I've forgotten my password, what do I do?</dt> + <dd> + No problem — when you log in, if you can't remember your password we'll + send you a confirmation link which lasts for one session, and you can + reset your password once you've clicked on that. + </dd> + <dt>How do I sign out?</dt> + <dd> + Either click on <a href="/auth/sign_out">sign out</a> on the page you're on, + or quit the browser (just closing the window without quitting the browser is not enough). + </dd> + <dt>Reporting</dt> + <dd>TODO</dd> + <dt>How do I see the SMS messages people have sent?</dt> + <dd>When you look at the barangay problems, click on "Problems via text" + (or, if you're viewing a specific report, click "Show messages") to see the + currently available messages. You'll need a username and password + for the Message Manager (your manager will have told you what these + are). Note that you can only see messages that have not yet been used to + create a report (and also their replies). + </dd> + <dt>Is my Message Manager username and password the same as the ones I use for FixMyBarangay?</dt> + <dd> + No, it's a separate account (some FMB users don't have any access to the SMS messages). + Your manager will tell you what your login for Message Manager system is, if you have one. + </dd> + <dt>I tried to work with a message but it said "lock not granted". What's up?</dt> + <dd> + This means another staff member is working on the message. To prevent you both creating + a report, or sending a reply, we use a first-come-first-serve locking mechanism. + Collisions like this are rare, but if they do happen, try again a few minutes later + because the lock may have expired by then. + </dd> + <dt>Can I delete a message?</dt> + <dd> + Yes. Click on the red cross when you hover over it (although really you're only hiding it). + You need an <em>administrator</em> account in the Message Manager to be able to see the + messages that have been hidden, so hiding them is as good as deleting them. + </dd> + <dt>It looks like an incoming message is wrongly shown as a reply. Can I fix it?</dt> + <dd> + FixMyBarangay tries to recognise SMS replies, and automatically matches them to the right thread. If it + gets this wrong, the reply may appear as a new "available" message, or a new message might be + mistaken for a reply. You need to ask an administrator to log into Message Manager to sort this out for you. + </dd> + <dt>How do the replies get back to the original sender?</dt> + <dd> + Although you're replying from within FixMyBarangay, the replies are sent by SMS. + There may be a delay of a few minutes between the moment you press <strong>reply</strong> + and the message's arrival. + </dd> + + <h2><a name="organisation"></a>Organisation Questions</h2> + <dl> + <dt>Who built FixMyBarangay?</dt> + <dd>This site was built by <a href="http://www.mysociety.org/">mySociety</a>, in conjunction with the <a href="www.worldbank.org/">World Bank</a>. +mySociety is the project of a registered charity which has grown out of the community of +volunteers who built sites like <a href="http://www.theyworkforyou.com/">TheyWorkForYou.com</a> in the UK. +mySociety’s primary mission is to build Internet projects which give people simple, tangible +benefits in the civic and community aspects of their lives. +The charity is called UK Citizens Online Democracy and is charity number 1076346. mySociety +can be contacted by email at <a href="mailto:hello@mysociety.org">hello@mysociety.org</a>, +or by post at:<br> +mySociety<br> +483 Green Lanes<br> +London<br> +N13 4BS<br> +UK</dd> + <dt>I’d like a site like this for my own location/ where’s the "source code" to this site?</dt> + <dd> +The software behind this site is open source, and available +to you mainly under the GNU Affero GPL software license. +See <a href="http://code.fixmystreet.com/">code.fixmystreet.com</a> for more information about setting up +and running sites like these. +</dd> + </dl> +[% INCLUDE 'footer.html' pagefooter = 'yes' %] diff --git a/templates/web/fixmybarangay/footer.html b/templates/web/fixmybarangay/footer.html new file mode 100644 index 000000000..658d654c4 --- /dev/null +++ b/templates/web/fixmybarangay/footer.html @@ -0,0 +1,31 @@ + </div><!-- .content role=main --> + </div><!-- .container --> + </div><!-- .table-cell --> + + <div class="nav-wrapper"> + <div class="nav-wrapper-2"> + <div id="main-nav" role="navigation"> + <ul id="mysoc-menu"> + <li><a id="mysoc-logo" href="http://www.mysociety.org/">mySociety</a></li>[% + %]<!--<li><a href="http://mysociety.org/donate/">Donate</a></li>[% + %]<li><a href="http://www.mysociety.org/projects/">Our Sites</a></li>--> + </ul> + + <ul id="main-menu"> + <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] class="report-a-problem-btn" + >View problems</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/reports' %]span[% ELSE %]a href="/reports"[% END + %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END + %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END + %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li> + </ul> + </div> + </div> + </div> + +<!-- [% INCLUDE 'debug_footer.html' %] --> + </div> <!-- .wrapper --> +</body> +</html> diff --git a/templates/web/fixmybarangay/header.html b/templates/web/fixmybarangay/header.html new file mode 100644 index 000000000..c3ddd154e --- /dev/null +++ b/templates/web/fixmybarangay/header.html @@ -0,0 +1,79 @@ +<!doctype html> +<!--[if lt IE 7]><html class="no-js ie6 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 7]> <html class="no-js ie7 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 8]> <html class="no-js ie8 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 9]> <html class="no-js ie9 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if gt IE 9]><!--><html class="no-js" lang="[% lang_code %]"><!--<![endif]--> + <head> + <meta name="viewport" content="initial-scale=1.0"> + + <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> + <meta name="HandHeldFriendly" content="true"> + <meta name="mobileoptimized" content="0"> + + <link rel="stylesheet" href="[% version('/cobrands/fixmybarangay/base.css') %]"> + <link rel="stylesheet" href="[% version('/cobrands/fixmybarangay/layout.css') %]" media="(min-width:48em)"> + [% extra_css %] + <!--[if (lt IE 9) & (!IEMobile)]> + <link rel="stylesheet" href="[% version('/cobrands/fixmybarangay/layout.css') %]"> + <![endif]--> + + <script src="[% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> + <script src="[% version('/cobrands/fixmybarangay/position_map.js') %]" charset="utf-8"></script> + [% INCLUDE 'common_header_tags.html', site_title = 'FixMyBarangay', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] + [% extra_js %] + + [% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council); %] + [% IF allow_creation %] + + <link rel="stylesheet" href="[% version('/js/fancybox/jquery.fancybox-1.3.4.css') %]"> + <script src="[% version('/js/fancybox/jquery.fancybox-1.3.4.pack.js') %]" charset="utf-8"></script> + + <script src="[% version('/cobrands/fixmybarangay/message_manager_client.js') %]" charset="utf-8"></script> + <script> + $(document).ready(function() { + + $('#mm_sign_out').click(function(){ + message_manager.sign_out(); + }); + + [% IF c.req.params.external_source_id && problem && problem.external_source_id.match('^\d+$') %] + var mm_msg_id ="[% c.req.params.external_source_id %]"; + var fms_id = "[% problem.id %]"; + if (mm_msg_id && fms_id) { + message_manager.config({url_root: "[% c.config.MESSAGE_MANAGER_URL %]"}); + message_manager.assign_fms_id(mm_msg_id, fms_id); + } + [% END %] + }); + </script> + [% END %] + </head> + <body class="[% bodyclass | html IF bodyclass %]"> + + <div class="wrapper"> + <div class="table-cell"> + <header id="site-header" role="banner"> + <div class="container"> + <a href="/" id="site-logo">[% c.cobrand.site_title %]</a> + <a href="#main-nav" id="nav-link">Main Navigation</a> + </div> + </header> + + <div id="user-meta"> + [% IF c.user_exists %] + <p> + [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] + <a href="/auth/sign_out" id="mm_sign_out">[% loc('sign out') %]</a> + </p> + [% ELSE %] + <!-- <a href="/auth">[% loc('Sign in') %]</a> --> + [% END %] + </div> + + [% pre_container_extra %] + + <div class="container"> + <div class="content[% " $mainclass" | html IF mainclass %]" role="main"> + + <!-- [% INCLUDE 'debug_header.html' %] --> diff --git a/templates/web/fixmybarangay/report/_message_manager.html b/templates/web/fixmybarangay/report/_message_manager.html new file mode 100644 index 000000000..1518a9d69 --- /dev/null +++ b/templates/web/fixmybarangay/report/_message_manager.html @@ -0,0 +1,163 @@ +[% IF c.user && c.user.from_council %] + +[% IF problem.id %] + <input type="button" class="green-btn" value="Show Messages" id="show_messages"> +[% END %] + +<ul id="message_manager" class="issue-list-a tab" style="display: none"> + <li id="message-control"> + <div id="mm-username-container">username: <span id="mm-received-username"></span></div> + <div id="mm-status-message-container"> + <div id="mm-status-message"></div> + </div> + <div id="mm-login-container"> + <div> + <label for="mm-htauth-username">Username:</label> + <input name="mm-htauth-username" id="mm-htauth-username" type="text"/> + </div> + <div> + <label for="mm-htauth-password">Password:</label> + <input name="mm-htauth-password" id="mm-htauth-password" type="password"/> + </div> + <div class="submit"> + <input id="available-submit" type="submit" value="Get available messages" class="green-btn"/> + </div> + </div> + </li> + <li> + <div id="mm-message-list" style="min-height:1em;"></div> + </li> +</ul> +<div style="display:none"> + <div id="reply-form-container"> + <div id="reply-form"> + <input type="hidden" name="message_id" id="reply_to_msg_id"/> + <div> + <label for="reply_text">Reply text:</label> + <textarea name="reply_text" id="reply_text"></textarea> + </div> + <div class="submit"> + <input id="reply-submit" type="submit" value="Send Reply" class="green-btn"/> + </div> + </div> + </div> +</div> + +<script type="text/javascript"> + +$(document).ready(function() { + var $mm_message_list = $('#mm-message-list'); + var mm_url = "[% c.config.MESSAGE_MANAGER_URL %]"; // from config + var problem_id = "[% problem.id %]"; + var dummy_busy = false; + var fms_username = "[% c.user.email | replace('\@.*', '') %]"; + + function sanitise_id(css_id) { + return css_id.replace(/\D/g, ""); + } + + var mm_populate_list = function(data) { + $('#mm-status-message-container').text("Accessed Message Manager as " + data['username']); + $('input[name=mm_text]').prop('checked', false); // uncheck all + } + + var mm_selected_message = function(data) { + var msg_text = ""; + var service_id = ""; + $('li.msg-is-active', $mm_message_list).removeClass('msg-is-active'); + if (data['success']) { + // msg_text = $('#form_detail').val( $('input[name=mm_text]:checked').val() ); # == message data + msg_text = data['data']['Message']['message']; + service_id = data['data']['Message']['id']; + $('#msg-' + service_id).addClass('msg-is-active'); + } else { + $('input[name=mm_text]').prop('checked', false); // uncheck all + } + $('#form_detail').val(msg_text); + $('#external_source_id').val(service_id); + } + + var dummy_reply_cleanup = function(data) { + $('#reply_text').val(''); + dummy_busy = false; + } + + var dummy_hide_cleanup = function(data) { + dummy_busy = false; + } + + message_manager.config({url_root: mm_url}); + message_manager.setup_click_listener({callback:mm_selected_message}); + + // problem form hidden input "external_source_id": pass the MM id into FMS, if used + $('<input type="hidden"/>').attr({ + 'id': 'external_source_id', + 'name': 'external_source_id', + }).appendTo($('#form_update_form')); + + $('#available-submit').click(function(e){ + e.preventDefault(); + message_manager.get_available_messages({callback:mm_populate_list, suggest_username:fms_username}); + }); + $('#available-submit').click(); + + $mm_message_list.on('mouseover', 'li.mm-msg', function(e){ + e.stopPropagation(); // because replies are nested + $('.mm-msg-action', $mm_message_list).stop().fadeOut(200); + $(this).find('> .mm-msg-action').stop().show(); + }); + + $mm_message_list.on('click', '.mm-hide', function(e){ + var want_hide = + confirm('Are you sure you want to delete the following message?\n\n"' + + $('p', $(this).parent()).first().text() + '"\n'); + if (want_hide) { + message_manager.hide( + sanitise_id($(this).parent().attr('id')), + {callback:dummy_hide_cleanup}); + } + }); + + $('#reply-submit').click(function(e) { + e.preventDefault(); + if (! dummy_busy) { + dummy_busy = true; + message_manager.reply( + $('#reply_to_msg_id').val(), + $('#reply_text').val(), + {callback:dummy_reply_cleanup}); + } + }); + + $("a#reply").fancybox({onClosed: function(){dummy_busy=false;}}); + + // only show on problem display page + if (problem_id) { + $('<input type="button" value="Copy to update"/>').attr({ + 'id': 'add_support', + 'name': 'add_support', + 'class': 'green-btn' + }).appendTo($('#message_manager')); + } + + $('#add_support').click(function(e){ + e.preventDefault(); + $('#mm-message-list input:checked').each( function(index) { + var id = $(this).attr('id'); + id = id.replace('mm_text_',''); + $('#external_source_id').val(id); + $('#form_update').val( $(this).val() ); + $('#form_update_form').on('submit', function(e) { + message_manager.assign_fms_id( $('#external_source_id').val(), problem_id, { 'is_async': false } ); + }); + }); + }); + + $('#show_messages').on('click', function(e) { + $('#message_manager').toggle(); + $('#show_messages').val( $('#show_messages').val() == 'Show Messages' ? 'Hide Messages' : 'Show Messages' ); + }); +}); + +</script> +[% END %] diff --git a/templates/web/fixmybarangay/report/_support.html b/templates/web/fixmybarangay/report/_support.html new file mode 100644 index 000000000..e8b958940 --- /dev/null +++ b/templates/web/fixmybarangay/report/_support.html @@ -0,0 +1,11 @@ +[% IF c.cobrand.can_support_problems %] +<p id="supporter"><small> + [% IF !problem.interest_count %][% text=loc('No supporters') %][% ELSIF problem.interest_count == 1 %][% text = loc('1 supporter') %][% ELSE %][% text = tprintf( loc('%d supporters' ), problem.interest_count ) %][% END %] + [% IF c.user && c.user.from_council %]<form action="[% c.uri_for( '/report/support' ) %]"> + [% text %] <input type="hidden" name="id" value="[% problem.id %]"><input type="submit" class="green-btn" value="Add support"> + </form> + [% ELSE %] + [% text %] + [% END %] +</small></p> +[% END %] diff --git a/templates/web/fixmybarangay/report/new/councils_text.html b/templates/web/fixmybarangay/report/new/councils_text.html new file mode 100644 index 000000000..7c48011ee --- /dev/null +++ b/templates/web/fixmybarangay/report/new/councils_text.html @@ -0,0 +1,5 @@ +<p> +The information provided here will be displayed publicly on the site as well as being sent to the +relevant authority ( Road, Lighing or National Highways ). If you select the Fix locally category then the +information will not be sent anywhere. +</p> diff --git a/templates/web/fixmystreet/around/display_location.html b/templates/web/fixmystreet/around/display_location.html index a7240688f..bad7c7af0 100755 --- a/templates/web/fixmystreet/around/display_location.html +++ b/templates/web/fixmystreet/around/display_location.html @@ -34,8 +34,11 @@ rss => [ loc('Recent local problems, FixMyStreet'), rss_url ], bodyclass => 'mappage', robots => 'noindex,nofollow'; + + allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council); %] +[% IF allow_creation %] <form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate"> [% IF c.req.params.map_override %] <input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]"> @@ -44,6 +47,7 @@ <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% short_latitude | html %]"> <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% short_longitude | html %]"> +[% END %] [% map_html %] @@ -69,13 +73,13 @@ <div id="side"> - <h1 class="big-green-banner">[% - loc( 'Click map to report a problem' ); - IF c.cobrand.moniker == 'bromley'; - '<span>Yellow pins show existing reports</span>'; - END - %]</h1> - + [% IF allow_creation %] + <h1 class="big-green-banner"> + [% loc( 'Click map to report a problem' ) %] + [% IF c.cobrand.moniker == 'bromley' %] + <span>Yellow pins show existing reports</span> + [% END %] + </h1> <p id="skip-this-step"> [% tprintf( @@ -84,6 +88,7 @@ ) %] </p> + [% END %] <div class="shadow-wrap"> <ul id="key-tools" class="singleton"> @@ -92,23 +97,11 @@ </div> <section class="full-width"> - <menu id="problems-nav" class="tab-nav"> - <ul> - <li><a href="#current">[% loc('Problems on the map') %]</a></li> - <li><a href="#current_near">[% loc( 'Problems nearby' ) %]</a></li> - </ul> - </menu> - - <ul id="current" class="issue-list-a tab"> - [% INCLUDE "around/on_map_list_items.html" %] - </ul> - - <ul id="current_near" class="issue-list-a tab"> - [% INCLUDE "around/around_map_list_items.html" %] - </ul> + [% INCLUDE "around/tabbed_lists.html" %] </section> </div> + [% IF allow_creation %] <div style="display:none" id="side-form"> [% INCLUDE "report/new/fill_in_details_form.html" js = 1, @@ -116,6 +109,10 @@ report.name = c.user.name %] </div> + [% END %] + +[% IF allow_creation %] </form> +[% END %] [% INCLUDE 'footer.html' %] diff --git a/templates/web/fixmystreet/around/postcode_form.html b/templates/web/fixmystreet/around/postcode_form.html index a98959d3a..2561a7710 100644 --- a/templates/web/fixmystreet/around/postcode_form.html +++ b/templates/web/fixmystreet/around/postcode_form.html @@ -2,6 +2,9 @@ <div id="front-main-container"> [% IF c.cobrand.moniker == 'bromley' %] <h1 class="main mob-only">Reporting a problem in Bromley’s streets or parks</h1> + [% ELSIF c.cobrand.moniker == 'fixmybarangay' %] + <h1>View local problems</h1> + <h2>(potholes or street lighting)</h2> [% ELSE %] <h1>[% loc('Report, view, or discuss local problems') %]</h1> <h2>[% loc('(like graffiti, fly tipping, broken paving slabs, or street lighting)') %]</h2> @@ -11,6 +14,12 @@ question = c.cobrand.enter_postcode_text || loc('Enter a nearby street name and area'); %] + [% IF c.cobrand.moniker == 'fixmybarangay' %] + <p id="barangay_buttons"> + <a href="/around?latitude=10.322;longitude=123.907" class="yellow-btn">Bgy. Luz</a> + <a href="/around?latitude=10.288;longitude=123.870" class="yellow-btn">Bgy. Basak San Nicolas</a> + </p> + [% ELSE %] <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm"> <label for="pc">[% question %]:</label> <div> @@ -18,10 +27,11 @@ <input type="submit" value="[% loc('Go') %]" id="submit"> </div> - [% IF partial_token %] - <input type="hidden" name="partial" value="[% partial_token.token %]"> - [% END %] + [% IF partial_token %] + <input type="hidden" name="partial" value="[% partial_token.token %]"> + [% END %] </form> + [% END %] </div> </div> diff --git a/templates/web/fixmystreet/around/tabbed_lists.html b/templates/web/fixmystreet/around/tabbed_lists.html new file mode 100644 index 000000000..77c5a521b --- /dev/null +++ b/templates/web/fixmystreet/around/tabbed_lists.html @@ -0,0 +1,14 @@ +<menu id="problems-nav" class="tab-nav"> + <ul> + <li><a href="#current">[% loc('Problems on the map') %]</a></li> + <li><a href="#current_near">[% loc( 'Problems nearby' ) %]</a></li> + </ul> +</menu> + +<ul id="current" class="issue-list-a tab"> + [% INCLUDE "around/on_map_list_items.html" %] +</ul> + +<ul id="current_near" class="issue-list-a tab"> + [% INCLUDE "around/around_map_list_items.html" %] +</ul> diff --git a/templates/web/fixmystreet/auth/general.html b/templates/web/fixmystreet/auth/general.html index 6ecbcadc5..7fa2b57fe 100644 --- a/templates/web/fixmystreet/auth/general.html +++ b/templates/web/fixmystreet/auth/general.html @@ -26,7 +26,11 @@ <input type="email" class="required email" id="email" name="email" value="[% email | html %]" placeholder="[% loc('Your email address') %]"> <div id="form_sign_in"> + [% IF c.cobrand.moniker == 'fixmybarangay' %] + <h3>[% loc("Do you have a FixMyBarangay password?") %]</h3> + [% ELSE %] <h3>[% loc("Do you have a FixMyStreet password?") %]</h3> + [% END %] <div id="form_sign_in_yes" class="form-box"> <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5> diff --git a/templates/web/fixmystreet/header.html b/templates/web/fixmystreet/header.html index 8d10d4c04..cb6ca8c43 100644 --- a/templates/web/fixmystreet/header.html +++ b/templates/web/fixmystreet/header.html @@ -36,7 +36,7 @@ <div class="table-cell"> <header id="site-header" role="banner"> <div class="container"> - <a href="/" id="site-logo">FixMyStreet</a> + <a href="/" id="site-logo">[% c.cobrand.site_title %]</a> <a href="#main-nav" id="nav-link">Main Navigation</a> </div> </header> diff --git a/templates/web/fixmystreet/index.html b/templates/web/fixmystreet/index.html index 492adbbe5..4bc2c0faf 100644 --- a/templates/web/fixmystreet/index.html +++ b/templates/web/fixmystreet/index.html @@ -36,6 +36,11 @@ kinds of problems like missed bins use our <h2>[% loc('How to report a problem') %]</h2> <ol class="big-numbers"> + [% IF c.cobrand.moniker == 'fixmybarangay' %] + <li>Text LUZ or BSN followed by your report to 12345</li> + <li>Visit the Barangay Center in person</li> + <li>Staff? <a href="/auth">Sign in</a> and click on the map! + [% ELSE %] <li>[% question %]</li> <li>[% loc('Locate the problem on a map of the area') %]</li> <li>[% loc('Enter details of the problem') %]</li> @@ -44,6 +49,7 @@ kinds of problems like missed bins use our [% ELSE %] <li>[% loc('We send it to the council on your behalf') %]</li> [% END %] + [% END %] </ol> <section class="full-width"> diff --git a/templates/web/fixmystreet/report/_main.html b/templates/web/fixmystreet/report/_main.html index 7ceb1f6a5..debd9be73 100644 --- a/templates/web/fixmystreet/report/_main.html +++ b/templates/web/fixmystreet/report/_main.html @@ -13,6 +13,7 @@ <br><small>[% loc('Not reported to council') %]</small> [% END %] </em></p> +[% TRY %][% INCLUDE 'report/_support.html' %][% CATCH file %][% END %] [% INCLUDE 'report/photo.html' object=problem center=1 %] diff --git a/templates/web/fixmystreet/report/display.html b/templates/web/fixmystreet/report/display.html index a22de373d..ab4ee52df 100644 --- a/templates/web/fixmystreet/report/display.html +++ b/templates/web/fixmystreet/report/display.html @@ -7,7 +7,9 @@ title = problem_title rss = [ loc('Updates to this problem, FixMyStreet'), "/rss/$problem.id" ] robots = 'index, nofollow' - bodyclass = 'mappage' + bodyclass = 'mappage'; + + allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council); %] [% map_html %] @@ -15,7 +17,9 @@ </div> [% INCLUDE 'report/banner.html' %] + [% INCLUDE 'report/_main.html' %] +[% TRY %][% INCLUDE 'report/_message_manager.html' %][% CATCH file %][% END %] <div class="shadow-wrap"> <ul id="key-tools"> @@ -46,6 +50,7 @@ [% INCLUDE 'report/updates.html' %] +[% IF allow_creation %] <div id="update_form"> <h2>[% loc( 'Provide an update') %]</h2> @@ -57,7 +62,7 @@ [% INCLUDE 'errors.html' %] - <form method="post" action="[% c.uri_for( '/report/update' ) %]" name="updateForm" class="validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]> + <form method="post" action="[% c.uri_for( '/report/update' ) %]" id="form_update_form" name="updateForm" class="validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]> <fieldset> <input type="hidden" name="submit_update" value="1"> <input type="hidden" name="id" value="[% problem.id | html %]"> @@ -167,7 +172,7 @@ </fieldset> </form> </div> - +[% END %] [% INCLUDE 'footer.html' %] diff --git a/templates/web/fixmystreet/report/new/fill_in_details_form.html b/templates/web/fixmystreet/report/new/fill_in_details_form.html index 237533657..ab427fbe7 100644 --- a/templates/web/fixmystreet/report/new/fill_in_details_form.html +++ b/templates/web/fixmystreet/report/new/fill_in_details_form.html @@ -15,6 +15,7 @@ [% PROCESS 'report/new/councils_text.html' %] [% END %] + [% IF c.cobrand.moniker != 'fixmybarangay' && c.user && c.user.from_council %] <div id="report-a-problem-sidebar"> <!-- The text for this section needs checking, but I can't work out which bit comes from where @@ -35,12 +36,13 @@ [% END %] </p> </div> - + <div class="sidebar-notes"> [% INCLUDE 'report/new/notes.html' %] </div> </div> + [% END %] [% INCLUDE 'errors.html' %] <fieldset> @@ -126,9 +128,11 @@ <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label> </div> + [% IF c.cobrand.moniker != 'fixmybarangay' && c.user && c.user.from_council %] <div class="general-sidebar-notes"> <p>[% loc('We never show your email address or phone number.') %]</p> </div> + [% END %] <label for="form_phone">[% loc('Phone number (optional)') %]</label> <input class="" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]"> diff --git a/web/cobrands/fixmybarangay/_colours.scss b/web/cobrands/fixmybarangay/_colours.scss new file mode 100644 index 000000000..fcaba8924 --- /dev/null +++ b/web/cobrands/fixmybarangay/_colours.scss @@ -0,0 +1,9 @@ +/* COLOURS */ + +$primary: #fff; //E6DBD6 +$primary_b: #000000; +$primary_text: #222222; + +$contrast1: #00BD08; +$contrast1_dark: #4B8304; +$contrast2: #AA8D11; diff --git a/web/cobrands/fixmybarangay/base.scss b/web/cobrands/fixmybarangay/base.scss new file mode 100644 index 000000000..71c2d8205 --- /dev/null +++ b/web/cobrands/fixmybarangay/base.scss @@ -0,0 +1,56 @@ +@import "../fixmystreet/_h5bp"; +@import "./_colours"; +@import "../fixmystreet/_mixins"; +@import "compass"; + +@import "../fixmystreet/_base"; + +#site-logo{ + width: 225px !important; + background: url('images/sprite.png') -3px -3px no-repeat; +} + +#barangay_buttons { + padding: 1em; +} + +.yellow-btn, +a.yellow-btn, +button.yellow-btn, +input.yellow-btn{ + @include button-reset(#FFD000, #cc9000, #aa7000, #300, #FFD000, #cc9000, #aa7000, #300); + &:visited, &:hover { + color:#300; + } +} + +body.mappage .nav-wrapper div.nav-wrapper-2 { + background: url('images/city6.png') 30% 0% repeat-x; + border-bottom: 2px solid #333; +} +#main-nav ul#main-menu li a.report-a-problem-btn:hover { + background: #fff; +} + + +// Replace Sprite with cobrand sprite +.ie6 #site-logo, +.ie7 #site-logo, +.ie6 body.frontpage #site-logo, +.ie6 #main-nav ul#mysoc-menu li a#mysoc-logo, +.ie7 #main-nav ul#mysoc-menu li a#mysoc-logo, +#fms_pan_zoom_panup, #fms_pan_zoom_pandown, +#fms_pan_zoom_panleft, +#fms_pan_zoom_panright, +#fms_pan_zoom_zoomin, +#fms_pan_zoom_zoomout, +.button-right, +a.button-right, +:hover.button-right, +a:hover.button-right, +.button-left, +a.button-left, +:hover.button-left, +a:hover.button-left { + background-image: url('images/sprite.png'); +}
\ No newline at end of file diff --git a/web/cobrands/fixmybarangay/config.rb b/web/cobrands/fixmybarangay/config.rb new file mode 100644 index 000000000..cab97b18f --- /dev/null +++ b/web/cobrands/fixmybarangay/config.rb @@ -0,0 +1,25 @@ +# Require any additional compass plugins here. + +# Set this to the root of your project when deployed: +http_path = "/" +css_dir = "" +sass_dir = "" +images_dir = "" +javascripts_dir = "" + +# You can select your preferred output style here (can be overridden via the command line): +# output_style = :expanded or :nested or :compact or :compressed + +# To enable relative paths to assets via compass helper functions. Uncomment: +# relative_assets = true + +# To disable debugging comments that display the original location of your selectors. Uncomment: +# line_comments = false + +# If you prefer the indented syntax, you might want to regenerate this +# project again passing --syntax sass, or you can uncomment this: +# preferred_syntax = :sass +# and then run: +# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass + +line_comments = false # by Compass.app diff --git a/web/cobrands/fixmybarangay/images/city6.png b/web/cobrands/fixmybarangay/images/city6.png Binary files differnew file mode 100644 index 000000000..63d7e674c --- /dev/null +++ b/web/cobrands/fixmybarangay/images/city6.png diff --git a/web/cobrands/fixmybarangay/images/city7.png b/web/cobrands/fixmybarangay/images/city7.png Binary files differnew file mode 100644 index 000000000..cea65cb82 --- /dev/null +++ b/web/cobrands/fixmybarangay/images/city7.png diff --git a/web/cobrands/fixmybarangay/images/ie_front_logo.gif b/web/cobrands/fixmybarangay/images/ie_front_logo.gif Binary files differnew file mode 100644 index 000000000..2eeda87ef --- /dev/null +++ b/web/cobrands/fixmybarangay/images/ie_front_logo.gif diff --git a/web/cobrands/fixmybarangay/images/ie_logo.png b/web/cobrands/fixmybarangay/images/ie_logo.png Binary files differnew file mode 100644 index 000000000..454297104 --- /dev/null +++ b/web/cobrands/fixmybarangay/images/ie_logo.png diff --git a/web/cobrands/fixmybarangay/images/pat3.png b/web/cobrands/fixmybarangay/images/pat3.png Binary files differnew file mode 100644 index 000000000..a0f755de9 --- /dev/null +++ b/web/cobrands/fixmybarangay/images/pat3.png diff --git a/web/cobrands/fixmybarangay/images/sprite.png b/web/cobrands/fixmybarangay/images/sprite.png Binary files differnew file mode 100644 index 000000000..cbde4ac7f --- /dev/null +++ b/web/cobrands/fixmybarangay/images/sprite.png diff --git a/web/cobrands/fixmybarangay/layout.scss b/web/cobrands/fixmybarangay/layout.scss new file mode 100644 index 000000000..0f575806a --- /dev/null +++ b/web/cobrands/fixmybarangay/layout.scss @@ -0,0 +1,130 @@ +@import "_colours"; +@import "../fixmystreet/_layout"; + +@mixin box_round($radius) { + -webkit-border-radius: $radius; /* Safari 3-4, iOS 1-3.2, Android ≤1.6 */ + border-radius: $radius; /* Opera 10.5, IE9+, Safari 5, Chrome, Firefox 4+, iOS 4, Android 2.1+ */ + + /* useful if you don't want a bg color from leaking outside the border: */ + -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box; +} + +body { + background: #C7B299; + background-image: url(images/pat3.png); + + .wrapper{ + background: url('images/city7.png') 30% 0% repeat-x; + } +} + + + body.frontpage { + #site-logo{ + width: 370px !important; + height: 70px; + background: url('images/sprite.png') -3px -106px no-repeat; + } + + .wrapper{ + background: url('images/city7.png') 30% 0% repeat-x; + } +} +#main-nav ul#mysoc-menu li a#mysoc-logo { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIkAAAAyCAMAAABf9whNAAAA0lBMVEUAAABAQEBAQEBAQEBNTU1NTU1AQEBNTU1AQEBAQEBAQEBAQEBAQEBAQEBAQEBNTU1NTU1AQEBNTU1AQEBNTU1AQEBAQEBNTU2Mxj9NTU33kx5NTU1NTU1NTU3tHCRmLZEpq+JNTU2TJ4/tHCSTJ4/87iEpq+L3kx5NTU387iH87iHtHCSTJ4/3kx51K5CTJ49mLZGMxj/tHCSx0zVmLZH6wSBmLZFmLZFDdb/zYCFbuZGMxj/3kx5AQEBNTU0pq+LtHCSMxj/3kx787iFmLZGTJ49ns3BGAAAAPXRSTlMAQL+AQIAQECBwMGBQj98gn5/Pr+/vzzC/r79wYI9wv69QcK+vcICfv68QQBAwj0AwMBBggIBQr3BwgEBgSmaQCwAAAflJREFUeF7t1Ndy2zAQhtGfAAX2IpFUseSSOLGd3nt27bT3f6UsQHusRFcKmVxkcGa4wvCG34AQ8V/wPM/zPM8zSaOaxGBHtFpF+IfikqwYO0LmELfiHH/XlLokSBrsiurtPdGkMJJFWFWTSQUZC0RhWMFNRQWuvTw9RS/VOolNEBgAudYpkE5pHqRpEACIZQ4x4RkztxMWd6KWa2DDvFDUBeg9urr6cPAZMIqEDogCmDmJKdwtlbjXOCc1sIRnhyxj0vIMNbeQMUNun5DBOTo6/3oASMhUF6krka3IM1lkikqdGaICMVE2sKSNICkR1sxYyMag5TWQd7bFPH4G8eT8zcOUKIGwJUYuSE7hzoldlZAwM7Dkwg4GQjtmXMtvBZHNiZJ7P+5C3P/2oH9SXyKXo1yJq0sbmmLMkg23h7xCryR1W5L8WqKsmz1BSbqjfNSSiMUGMEB/Bp8ePwdeLF/ZAn1TEssFR1MJIZmyGLUENXNrI8pCK6IMx99fn50tvyyBcuvEKuqKXDcuocgAQ/I7conMGgA5BfD23fvLy4/LT0Ba/v4vphRxR9dnlmIMU4ULO0IgsgPr/rya3H7F4JycoCf3sq0vW5ICiLXO3YtsMC4JqbG3uCFKMSb3nYuwNyLKMK6Q6wj7a7oMY4vwJwwG8TzP8zzP834CEcRJKkEhVogAAAAASUVORK5CYII="); +} +#front-main { + color: $primary_text; + background: rgba(255,255,255,0.1); + margin-top: 70px; + + #postcodeForm { + margin-left: 0; + margin-right: 0; + } + + a { + text-decoration:none; + } + + p { + padding-bottom:4px; + } +} + +.nav-wrapper { + .nav-wrapper-2 { + border-top: solid 4px $primary; + @include border-image(none); + } +} +#main-nav { + ul { + &#mysoc-menu { + background:$primary; + padding: 1px 0.5em; + } + &#main-menu{ + padding: 3px 0; + li{ + a{ + //@extend .report-a-problem-btn; + color: #fff; + padding: 0.7em; + background-color: rgba(0,0,0,0); + background-image: none; + &:hover{ + background-color: rgba(0,0,0,0.8); + } + } + } + } + + } +} +body.mappage #main-nav ul#main-menu li a, +body.mappage #main-nav ul#main-menu li span, +body #main-nav ul#main-menu li a, +body #main-nav ul#main-menu li span +{ + color: #fff; + padding: 0.7em; + background-color: rgba(0,0,0,0); + background-image: none; + @include box_round(0.35em); + margin-left: 3px; + + &.report-a-problem-btn{ + color: #fff; + padding: 0.7em; + background-color: rgba(0,0,0,0); + background-image: none; + margin: 0; + } + + &:hover{ + background-color: rgba(0,0,0,0.75); + background-image: none; + } + +} + + +#user-meta { + max-width: 96%; +} + + + +#front-howto { + #front_stats { + border-top: 0.25em solid #000; + div { + big { + color: #000; + } + } + } +} + +@import "message_manager";
\ No newline at end of file diff --git a/web/cobrands/fixmybarangay/message_manager.scss b/web/cobrands/fixmybarangay/message_manager.scss new file mode 100644 index 000000000..e9db9a6ce --- /dev/null +++ b/web/cobrands/fixmybarangay/message_manager.scss @@ -0,0 +1,133 @@ +@import "_colours"; + +$mm_status_message_color: #a66; +$mm_border_color: #eee; + +$color_reply_bg: #cccccc; +$color_bg_reply_0: #E8E8E8; +$color_bg_reply_1: #DEDEDE; +$color_bg_reply_2: #D6D6D6; +$color_bg_reply_3: #D1D1D1; +$color_bg_reply_4: #C9C9C9; +$color_bg_reply_5: #BFBFBF; +$color_bg_reply_6: #B8B8B8; +$color_bg_mm_list: #F6F6F6; + +#message_manager { + + #message-control { + #mm-username-container { + display: none; // hidden during dev + padding: 8px; + text-align: right; + color: $mm_status_message_color; + font-style: italic; + span { + color: #000; + font-style: normal; + } + } + #mm-status-message-container { + min-height: 1.4em; + margin: 0 0 8px 0.5em; + padding: 8px 4px; + color: $mm_status_message_color; + font-style: italic; + } + #mm-login-container { + display: none; // only shown on/after a 403 + border: 1px solid $mm_border_color; + padding: 0 1em; + margin: 1em; + input { + margin-bottom: 1em; + } + } + } + + #mm-message-list { + ul { + list-style-type: none; + padding: 0; + margin: 0; + li, ul.mm-reply-thread li { + position: relative; + clear: both; + margin: 4px 0 0 0; + padding: 0; + cursor: pointer; + background-color: $color_bg_mm_list; + p { + background-color: inherit; + margin: 0.25em 0 0 0; + padding: 0.5em 1em; + // &:hover { background-color: #efe;} + } + ul.mm-reply-thread { + li { + margin:0; + } + .mm-reply { + background-color: #ccc; + &:hover {background-color: #eef;} + } + .mm-reply-0 { margin-left: 0em; background-color: $color_bg_reply_0;} + .mm-reply-1 { margin-left: 1em; background-color: $color_bg_reply_1;} + .mm-reply-2 { margin-left: 2em; background-color: $color_bg_reply_2;} + .mm-reply-3 { margin-left: 3em; background-color: $color_bg_reply_3;} + .mm-reply-4 { margin-left: 4em; background-color: $color_bg_reply_4;} + .mm-reply-5 { margin-left: 5em; background-color: $color_bg_reply_5;} + .mm-reply-6 { margin-left: 6em; background-color: $color_bg_reply_6;} + } + &:hover { background-color: #efe;} + &.msg-is-locked { background-color: #fdd;} + &.msg-is-busy { background-color: #ffd;} + &.msg-is-owned { background-color: #dfd;} + &.msg-is-active { background-color: $contrast1; color:#fff;} + span.msg-tag { + width: 3em; + float:left; + } + input[type=radio] { + display: block; + float: left; + } + label, span.msg-text { + display: block; + font-weight: normal; + margin: 0.1em 0 0.1em 4.5em; + } + .mm-msg-action { + display: none; + padding: 0.2em 0.4em; + color: white; + text-align: center; + position: absolute; + top: 4px; + &:hover { background-color: black;} + } + .mm-hide { + right:0px; + background-color: red; + } + .mm-rep { + right:1.4em; + background-color: green; + } + } + } + } + p.mm-empty { + margin: 1em; + } +} +#show_messages, #add_support, #reply-submit { // COPY TO UPDATE button + margin: 1em; +} +#reply-form-container { + #reply-form{ + margin-top: 2em; + border: 1px solid $mm_border_color; + background-color: #fff; + } +} diff --git a/web/cobrands/fixmybarangay/message_manager_client.js b/web/cobrands/fixmybarangay/message_manager_client.js new file mode 100644 index 000000000..e2c69c6a3 --- /dev/null +++ b/web/cobrands/fixmybarangay/message_manager_client.js @@ -0,0 +1,500 @@ +/* + * message_manager.config(settings) + * + * Accepts settings for the Message Manager client. Even if you accept all the defaults, + * you *MUST* call config when the page is loaded (i.e., call message_manager.config()) + * + * The (optional) single parameter is a hash of name-value pairs: + * + * url_root accepts the root URL to the message manager. + * + * want_unique_locks normally MM clients should relinquish all other locks + * when claiming a new one so want_unique_locks defaults + * to true; but you can set it explicitly here. + * + * msg_prefix all message <li> items have this as their ID prefix + * + * mm_name name of Message Manager (used in error messages shown + * to user, e.g., "please log in to Message Manager" + * + * *_selector these are the jQuery selects that will be used to find + * the respective elements: + * + * message_list_selector: list of messages + * status_selector: status message display + * login_selector: login form + * + * + * Summary of all methods: + * message_manager.config([options]) + * message_manager.setup_click_listener([options]) + * message_manager.get_available_messages([options]) + * message_manager.request_lock(msg_id, [options]) (default use: client code doesn't need to call this explicitly) + * message_manager.assign_fms_id(msg_id, fms_id, [options]) + * message_manager.hide(msg_id, [options]) + * message_manager.reply(msg_id, reply_text, [options]) + * + * Note: options are {name:value, ...} hashes and often include "callback" which is a function that is executed on success + * but see the docs (request_lock executes callback if the call is successful even if the lock was denied, for example). + * Some methods take 'callback' as the only option, but you still need to pass it as a named option. +*/ + +var message_manager = (function() { + + // default/config values: to be overridden using "config({name:value, ...})" + + var _url_root = 'http://www.example.com/message_manager/'; + var _want_unique_locks = true; + var _msg_prefix = "msg-"; + var _username; + var _mm_name = "Message Manager"; + var _use_fancybox = true; // note: currently *must* have fancybox! + + // cached jQuery elements, populated by the (mandatory) call to config() + var $message_list_element; + var $status_element; + var $login_element; + var $htauth_username; + var $htauth_password; + + var config = function(settings) { + var selectors = { + message_list_selector: '#mm-message-list', + status_selector: '#mm-status-message-container', + login_selector: '#mm-login-container', + username_selector: '#mm-received-username', + htauth_username_selector: '#mm-htauth-username', + htauth_password_selector: '#mm-htauth-password' + }; + if (settings) { + if (typeof settings.url_root === 'string') { + _url_root = settings.url_root; + if (_url_root.charAt(_url_root.length-1) !== "/") { + _url_root+="/"; + } + } + if (typeof settings.want_unique_locks !== 'undefined') { + _want_unique_locks = settings.want_unique_locks; + } + if (typeof settings.msg_prefix === 'string') { + _msg_prefix = settings.msg_prefix; + } + for (var sel in selectors) { + if (typeof settings[sel] === 'string') { + selectors[sel] = settings[sel]; + } + } + if (typeof settings.mm_name === 'string') { + _mm_name = settings.mm_name; + } + } + $message_list_element = $(selectors.message_list_selector); + $status_element = $(selectors.status_selector); + $login_element = $(selectors.login_selector); + $htauth_username = $(selectors.htauth_username_selector); + $htauth_password = $(selectors.htauth_password_selector); + }; + + // btoa doesn't work on all browers? + var make_base_auth = function(user, password) { + var tok = user + ':' + password; + var hash = btoa(tok); + return "Basic " + hash; + }; + + var get_current_auth_credentials = function() { + var base_auth = ""; + var htauth_un = ""; + var htauth_pw = ""; + if ($htauth_username.size()) { + htauth_un = $htauth_username.val(); + htauth_pw = $htauth_password.val(); + } + if (htauth_un.length === 0 && Modernizr.sessionstorage && sessionStorage.getItem('mm_auth')) { + base_auth = sessionStorage.getItem('mm_auth'); + } else { + base_auth = make_base_auth(htauth_un, htauth_pw); + if (Modernizr.sessionstorage) { + sessionStorage.mm_auth = base_auth; + } + } + return base_auth; + }; + + var sign_out = function() { // clear_current_auth_credentials + if (Modernizr.sessionstorage) { + sessionStorage.removeItem('mm_auth'); // FF doesn't support .clear()? + } + if ($htauth_password) { + $htauth_password.val(''); + } + }; + + var show_login_form = function(suggest_username) { + $('.mm-msg', $message_list_element).remove(); // remove (old) messages + if ($htauth_username.size() && ! $htauth_username.val()) { + $htauth_username.val(suggest_username); + } + $login_element.stop().slideDown(); + }; + + var say_status = function (msg) { + if ($status_element) { + $status_element.stop().show().text(msg); + } + }; + + var extract_replies = function(replies, depth) { + var $ul = ""; + if (replies && replies.length > 0) { + $ul = $('<ul class="mm-reply-thread"/>'); + for (var i=0; i<replies.length; i++) { + $ul.append(get_message_li(replies[i], depth)); + } + } + return $ul; + }; + + var get_message_li = function(message_root, depth) { + var msg = message_root.Message; // or use label value + var lockkeeper = message_root.Lockkeeper.username; + var escaped_text = $('<div/>').text(msg.message).html(); + var $p = $('<p/>'); + var $hide_button = $('<span class="mm-msg-action mm-hide" id="mm-hide-' + msg.id + '">X</span>'); + var $reply_button = $('<a class="mm-msg-action mm-rep" id="mm-rep-' + msg.id + '" href="#reply-form-container">reply</a>'); + if (_use_fancybox) { + $reply_button.fancybox(); + } + if (depth === 0) { + var tag = (!msg.tag || msg.tag === 'null')? ' ' : msg.tag; + tag = $('<span class="msg-tag"/>').html(tag); + var radio = depth > 0? null : $('<input type="radio"/>').attr({ + 'id': 'mm_text_' + msg.id, + 'name': 'mm_text', + 'value': escaped_text + }).wrap('<p/>').parent().html(); + var label = $('<label/>', { + 'class': 'msg-text', + 'for': 'mm_text_' + msg.id + }).text(escaped_text).wrap('<p/>').parent().html(); + $p.append(tag).append(radio).append(label); + } else { + $p.text(escaped_text).addClass('mm-reply mm-reply-' + depth); + } + var $litem = $('<li id="' + _msg_prefix + msg.id + '" class="mm-msg">').append($p).append($hide_button); + if (msg.is_outbound != 1) { + $litem.append($reply_button); + } + if (lockkeeper) { + $litem.addClass(lockkeeper == _username? 'msg-is-owned' : 'msg-is-locked'); + } + if (message_root.children) { + $litem.append(extract_replies(message_root.children, depth+1)); + } + return $litem; + }; + + var show_available_messages = function(data) { + var messages = data.messages; + _username = data.username; + var $output = $message_list_element; + if (messages instanceof Array) { + if (messages.length === 0) { + $output.html('<p class="mm-empty">No messages available.</p>'); + } else { + var $ul = $('<ul class="mm-root"/>'); + for(var i=0; i< messages.length; i++) { + var litem = get_message_li(messages[i], 0); + $ul.append(litem); + } + $output.empty().append($ul); + } + } else { + $output.html('<p>No messages (server did not send a list).</p>'); + } + }; + + // accept an element (e.g., message_list) and add the click event to the *radio button* within it + // A bit specific to expect li's perhaps. + // options are passed through to the lock + var setup_click_listener = function(options) { + $message_list_element.on('click', 'input[type=radio]', function(event) { + var $li = $(this).closest('li'); + var id = $li.attr('id').replace(_msg_prefix, ''); + if ($li.hasClass('msg-is-locked')) { + say_status("Trying for lock..."); + } else if ($li.hasClass('msg-is-owned')) { + say_status("Checking lock..."); + } else { + say_status("Trying for lock..."); + } + request_lock(id, options); + }); + // clicking the reply button loads the id into the (modal/fancybox) reply form + $message_list_element.on('click', '.mm-rep', function(event) { + $('#reply_to_msg_id').val($(this).closest('li').attr('id').replace(_msg_prefix, '')); + }); + }; + + // gets messages or else requests login + // options: suggest_username, if provided, is preloaded into the login form if provided + var get_available_messages = function(options) { + var base_auth = get_current_auth_credentials(); + var suggest_username = ""; + if (options) { + if (typeof(options.callback) === 'function') { + callback = options.callback; + } + if (typeof options.suggest_username === 'string') { + suggest_username = options.suggest_username; + } + } + if (base_auth === "") { + show_login_form(suggest_username); + return; + } + $login_element.stop().hide(); + $.ajax({ + dataType: "json", + type: "post", + url: _url_root +"messages/available.json", + beforeSend: function (xhr){ + xhr.setRequestHeader('Authorization', get_current_auth_credentials()); + xhr.withCredentials = true; + }, + success: function(data, textStatus) { + show_available_messages(data); + if (typeof(callback) === "function") { + callback.call($(this), data); // execute callback + } + }, + error: function(jqXHR, textStatus, errorThrown) { + var st = jqXHR.status; + if (st == 401 || st == 403) { + var msg = (st == 401 ? "Invalid username or password for" : "Access denied: please log in to") + " " + _mm_name; + say_status(msg); + show_login_form(suggest_username); + } else { + var err_msg = "Unable to load messages: "; + if (st === 0 && textStatus === 'error') { // x-domain hard to detect, sometimes intermittent? + err_msg += "maybe try refreshing page?"; + } else { + err_msg += textStatus + " (" + st + ")"; + } + say_status(err_msg); + } + } + }); + }; + + var request_lock = function(msg_id, options) { + var $li = $('#' + _msg_prefix + msg_id); + var lock_unique = _want_unique_locks; + var callback = null; + if (options) { + if (typeof(options.callback) === 'function') { + callback = options.callback; + } + if (typeof(options.lock_unique) !== undefined && options.lock_unique !== undefined) { + lock_unique = options.lock_unique; + } + } + $li.addClass('msg-is-busy'); + $.ajax({ + dataType:"json", + type:"post", + url: _url_root +"messages/" + + (lock_unique? "lock_unique" : "lock") + + "/" + msg_id + ".json", + beforeSend: function (xhr){ + xhr.setRequestHeader('Authorization', get_current_auth_credentials()); + xhr.withCredentials = true; + }, + success:function(data, textStatus) { + if (data.success) { + if (lock_unique) { + $('.msg-is-owned', $message_list_element).removeClass('msg-is-owned'); + } + $li.removeClass('msg-is-busy msg-is-locked').addClass('msg-is-owned'); + say_status("Lock granted OK"); // to data['data']['Lockkeeper']['username']? + } else { + $li.removeClass('msg-is-busy').addClass('msg-is-locked'); + say_status("failed: " + data.error); + } + if (typeof(callback) === "function") { // note callbacks must check data['success'] + callback.call($(this), data); // returned data['data'] is 'Message', 'Source', 'Lockkeeper' for success + } + }, + error: function(jqXHR, textStatus, errorThrown) { + $li.removeClass('msg-is-busy'); + say_status("error: " + textStatus + ": " + errorThrown); + } + }); + }; + + var assign_fms_id = function(msg_id, fms_id, options) { + var check_li_exists = false; + var is_async = true; + if (options) { + if (typeof(options.callback) === 'function') { + callback = options.callback; + } + if (typeof(options.check_li_exists) !== undefined && options.check_li_exists !== undefined) { + check_li_exists = true; // MM dummy + } + if (typeof(options.is_async) !== undefined && options.is_async !== undefined) { + is_async = options.is_async; + } + } + var $li = $('#' + _msg_prefix + msg_id); + if (check_li_exists) { + if ($li.size() === 0) { + say_status("Couldn't find message with ID " + msg_id); + return; + } + } + if (isNaN(parseInt(fms_id,10))) { + say_status("missing FMS id"); + return; + } + $li.addClass('msg-is-busy'); + $.ajax({ + async:is_async, + dataType:"json", + type:"post", + data: {fms_id: fms_id}, + url: _url_root +"messages/assign_fms_id/" + msg_id + ".json", + beforeSend: function (xhr){ + xhr.setRequestHeader('Authorization', get_current_auth_credentials()); + xhr.withCredentials = true; + }, + success:function(data, textStatus) { + if (data.success) { + $li.removeClass('msg-is-busy msg-is-locked').addClass('msg-is-owned').fadeOut('slow'); // no longer available + say_status("FMS ID assigned"); // to data['data']['Lockkeeper']['username']? + if (typeof(callback) === "function") { + callback.call($(this), data.data); // returned data['data'] is 'Message', 'Source', 'Lockkeeper' for success + } + } else { + $li.removeClass('msg-is-busy').addClass('msg-is-locked'); + say_status("failed: " + data.error); + } + }, + error: function(jqXHR, textStatus, errorThrown) { + say_status("error: " + textStatus + ": " + errorThrown); + $li.removeClass('msg-is-busy'); + } + }); + }; + + var reply = function(msg_id, reply_text, options) { + if (_use_fancybox){ + $.fancybox.close(); + } + var check_li_exists = false; + if (options) { + if (typeof(options.callback) === 'function') { + callback = options.callback; + } + if (typeof(options.check_li_exists) !== undefined && options.check_li_exists !== undefined) { + check_li_exists = true; // MM dummy + } + } + var $li = $('#' + _msg_prefix + msg_id); + if (check_li_exists) { + if ($li.size() === 0) { + say_status("Couldn't find message with ID " + msg_id); + return; + } + } + reply_text = $.trim(reply_text); + if (reply_text === '') { + say_status("won't send empty reply"); + return; + } + $li.addClass('msg-is-busy'); + $.ajax({ + dataType:"json", + type:"post", + data: {reply_text: reply_text}, + url: _url_root +"messages/reply/" + msg_id + ".json", + beforeSend: function (xhr){ + xhr.setRequestHeader('Authorization', get_current_auth_credentials()); + xhr.withCredentials = true; + }, + success:function(data, textStatus) { + if (data.success) { + $li.removeClass('msg-is-busy msg-is-locked').addClass('msg-is-owned'); // no longer available + say_status("Reply sent OK"); + if (typeof(callback) === "function") { + callback.call($(this), data.data); // returned data['data'] is null but may change in future + } + } else { + $li.removeClass('msg-is-busy').addClass('msg-is-locked'); + say_status("failed: " + data.error); + } + }, + error: function(jqXHR, textStatus, errorThrown) { + say_status("error: " + textStatus + ": " + errorThrown); + $li.removeClass('msg-is-busy'); + } + }); + }; + + var hide = function(msg_id, options) { + var check_li_exists = false; + if (options) { + if (typeof(options.callback) === 'function') { + callback = options.callback; + } + if (typeof(options.check_li_exists) !== undefined && options.check_li_exists !== undefined) { + check_li_exists = true; // MM dummy + } + } + var $li = $('#' + _msg_prefix + msg_id); + if (check_li_exists) { + if ($li.size() === 0) { + say_status("Couldn't find message with ID " + msg_id); + return; + } + } + $li.addClass('msg-is-busy'); + $.ajax({ + dataType:"json", + type:"post", + url: _url_root +"messages/hide/" + msg_id + ".json", + beforeSend: function (xhr){ + xhr.setRequestHeader('Authorization', get_current_auth_credentials()); + xhr.withCredentials = true; + }, + success:function(data, textStatus) { + if (data.success) { + $li.removeClass('msg-is-busy msg-is-locked').addClass('msg-is-owned').fadeOut('slow'); // no longer available + say_status("Message hidden"); + if (typeof(callback) === "function") { + callback.call($(this), data.data); + } + } else { + $li.removeClass('msg-is-busy').addClass('msg-is-locked'); + say_status("failed: " + data.error); + } + }, + error: function(jqXHR, textStatus, errorThrown) { + say_status("error: " + textStatus + ": " + errorThrown); + $li.removeClass('msg-is-busy'); + } + }); + }; + + // revealed public methods: + return { + config: config, + setup_click_listener: setup_click_listener, + get_available_messages: get_available_messages, + request_lock: request_lock, + assign_fms_id: assign_fms_id, + reply: reply, + hide: hide, + sign_out: sign_out + }; +})(); diff --git a/web/cobrands/fixmybarangay/messages.js b/web/cobrands/fixmybarangay/messages.js new file mode 100644 index 000000000..aebf35156 --- /dev/null +++ b/web/cobrands/fixmybarangay/messages.js @@ -0,0 +1,26 @@ +$(function(){ + + var mm = $('#message_manager'); + + $.getJSON('/cobrands/fixmybarangay/test-texts.json', function(data) { + var items = []; + $.each(data, function(k, v) { + var item = $('<input type="radio"/>').attr({ + 'id': 'mm_text_' + v.id, + 'name': 'mm_text', + 'value': v.text + }).wrap('<p/>').parent().html(); + var label = $('<label/>', { + 'class': 'inline', + 'for': 'mm_text_' + v.id + }).text(v.text).wrap('<p/>').parent().html(); + item = '<li><p>' + item + ' ' + label + '</p></li>'; + items.push(item); + }); + mm.html(items.join('')); + mm.find('input').click(function(){ + $('#form_detail').val( $('input[name=mm_text]:checked').val() ); + }); + }); + +}); diff --git a/web/cobrands/fixmybarangay/position_map.js b/web/cobrands/fixmybarangay/position_map.js new file mode 100644 index 000000000..753b5f854 --- /dev/null +++ b/web/cobrands/fixmybarangay/position_map.js @@ -0,0 +1,22 @@ +function position_map_box() { + var $html = $('html'); + if ($html.hasClass('ie6')) { + $('#map_box').prependTo('.wrapper').css({ + zIndex: 0, position: 'absolute', + top: 0, left: 0, right: 0, bottom: 0, + width: '100%', height: $(window).height(), + margin: 0 + }); + } else { + $('#map_box').prependTo('.wrapper').css({ + zIndex: 0, position: 'fixed', + top: 0, left: 0, right: 0, bottom: 0, + width: '100%', height: '100%', + margin: 0 + }); + } +} + +function map_fix() {} +var slide_wards_down = 0; + diff --git a/web/cobrands/fixmybarangay/test-texts.json b/web/cobrands/fixmybarangay/test-texts.json new file mode 100644 index 000000000..7acde1e32 --- /dev/null +++ b/web/cobrands/fixmybarangay/test-texts.json @@ -0,0 +1,17 @@ +[ + { + "id" : 1, + "number" : "032-9999999", + "text" : "Pothole on corner of G. De Vera and T. Padilla" + }, + { + "id" : 2, + "number" : "032-1234567", + "text" : "Broken street light on Rahmann Street" + }, + { + "id" : 3, + "number" : "+63 917 0000000", + "text" : "F. Manalo giant pothole" + } +] diff --git a/web/cobrands/fixmystreet/_layout.scss b/web/cobrands/fixmystreet/_layout.scss index 56b2f41d5..0973e645d 100644 --- a/web/cobrands/fixmystreet/_layout.scss +++ b/web/cobrands/fixmystreet/_layout.scss @@ -732,7 +732,7 @@ textarea.form-error { .no-js #report-a-problem-sidebar { position: static; width: auto; - @include box-shadow(rgba(0, 0, 0, 0), 0, 0, 0); + @include box-shadow(rgba(0, 0, 0, 0) 0 0 0); .sidebar-tips, .sidebar-notes { font-size:1em; @@ -1012,7 +1012,7 @@ body.frontpage { .general-sidebar-notes { position: static; width: auto; - @include box-shadow(rgba(0, 0, 0, 0), 0, 0, 0); + @include box-shadow(rgba(0, 0, 0, 0) 0 0 0); .sidebar-tips, .sidebar-notes { font-size:1em; diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js index d98994d84..4c96e771c 100644 --- a/web/js/map-OpenLayers.js +++ b/web/js/map-OpenLayers.js @@ -70,26 +70,30 @@ function fms_markers_list(pins, transform) { } function fixmystreet_onload() { - if ( fixmystreet.area ) { - var area = new OpenLayers.Layer.Vector("KML", { - strategies: [ new OpenLayers.Strategy.Fixed() ], - protocol: new OpenLayers.Protocol.HTTP({ - url: "/mapit/area/" + fixmystreet.area + ".kml?simplify_tolerance=0.0001", - format: new OpenLayers.Format.KML() - }) - }); - fixmystreet.map.addLayer(area); - area.events.register('loadend', null, function(a,b,c) { - var bounds = area.getDataExtent(); - if (bounds) { - var center = bounds.getCenterLonLat(); - var z = fixmystreet.map.getZoomForExtent(bounds); - if ( z < 13 && $('html').hasClass('mobile') ) { - z = 13; - } - fixmystreet.map.setCenter(center, z, false, true); + if ( fixmystreet.area.length ) { + for (var i=0; i<fixmystreet.area.length; i++) { + var area = new OpenLayers.Layer.Vector("KML", { + strategies: [ new OpenLayers.Strategy.Fixed() ], + protocol: new OpenLayers.Protocol.HTTP({ + url: "/mapit/area/" + fixmystreet.area[i] + ".kml?simplify_tolerance=0.0001", + format: new OpenLayers.Format.KML() + }) + }); + fixmystreet.map.addLayer(area); + if ( fixmystreet.area.length == 1 ) { + area.events.register('loadend', null, function(a,b,c) { + var bounds = area.getDataExtent(); + if (bounds) { + var center = bounds.getCenterLonLat(); + var z = fixmystreet.map.getZoomForExtent(bounds); + if ( z < 13 && $('html').hasClass('mobile') ) { + z = 13; + } + fixmystreet.map.setCenter(center, z, false, true); + } + }); } - }); + } } var pin_layer_style_map = new OpenLayers.StyleMap({ diff --git a/web/js/modernizr.custom.js b/web/js/modernizr.custom.js index c4d6ffdfc..026c0efad 100644 --- a/web/js/modernizr.custom.js +++ b/web/js/modernizr.custom.js @@ -1,4 +1,4 @@ -/* Modernizr 2.5.3 (Custom Build) | MIT & BSD
- * Build: http://www.modernizr.com/download/#-shiv-load
+/* Modernizr 2.6.1 (Custom Build) | MIT & BSD
+ * Build: http://modernizr.com/download/#-sessionstorage-shiv-load
*/
-;window.Modernizr=function(a,b,c){function t(a){i.cssText=a}function u(a,b){return t(prefixes.join(a+";")+(b||""))}function v(a,b){return typeof a===b}function w(a,b){return!!~(""+a).indexOf(b)}function x(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:v(f,"function")?f.bind(d||b):f}return!1}var d="2.5.3",e={},f=b.documentElement,g="modernizr",h=b.createElement(g),i=h.style,j,k={}.toString,l={},m={},n={},o=[],p=o.slice,q,r={}.hasOwnProperty,s;!v(r,"undefined")&&!v(r.call,"undefined")?s=function(a,b){return r.call(a,b)}:s=function(a,b){return b in a&&v(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=p.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(p.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(p.call(arguments)))};return e});for(var y in l)s(l,y)&&(q=y.toLowerCase(),e[q]=l[y](),o.push((e[q]?"":"no-")+q));return t(""),h=j=null,function(a,b){function g(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function h(){var a=k.elements;return typeof a=="string"?a.split(" "):a}function i(a){var b={},c=a.createElement,e=a.createDocumentFragment,f=e();a.createElement=function(a){var e=(b[a]||(b[a]=c(a))).cloneNode();return k.shivMethods&&e.canHaveChildren&&!d.test(a)?f.appendChild(e):e},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+h().join().replace(/\w+/g,function(a){return b[a]=c(a),f.createElement(a),'c("'+a+'")'})+");return n}")(k,f)}function j(a){var b;return a.documentShived?a:(k.shivCSS&&!e&&(b=!!g(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),f||(b=!i(a)),b&&(a.documentShived=b),a)}var c=a.html5||{},d=/^<|^(?:button|form|map|select|textarea)$/i,e,f;(function(){var a=b.createElement("a");a.innerHTML="<xyz></xyz>",e="hidden"in a,f=a.childNodes.length==1||function(){try{b.createElement("a")}catch(a){return!0}var c=b.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()})();var k={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:j};a.html5=k,j(b)}(this,b),e._version=d,e}(this,this.document),function(a,b,c){function d(a){return o.call(a)=="[object Function]"}function e(a){return typeof a=="string"}function f(){}function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){a!="img"&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l={},o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),a!="img"&&(r||y[c]===2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return o.call(a)=="[object Array]"},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,i){var j=b(a),l=j.autoCallback;j.url.split(".").pop().split("?").shift(),j.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]||h),j.instead?j.instead(a,e,f,g,i):(y[j.url]?j.noexec=!0:y[j.url]=1,f.load(j.url,j.forceCSS||!j.forceJS&&"css"==j.url.split(".").pop().split("?").shift()?"c":c,j.noexec,j.attrs,j.timeout),(d(e)||d(l))&&f.load(function(){k(),e&&e(j.origUrl,i,g),l&&l(j.origUrl,i,g),y[j.url]=2})))}function i(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var j,l,m=this.yepnope.loader;if(e(a))g(a,0,m,0);else if(w(a))for(j=0;j<a.length;j++)l=a[j],e(l)?g(l,0,m,0):w(l)?B(l):Object(l)===l&&i(l,m);else Object(a)===a&&i(a,m)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
\ No newline at end of file +;window.Modernizr=function(a,b,c){function t(a){i.cssText=a}function u(a,b){return t(prefixes.join(a+";")+(b||""))}function v(a,b){return typeof a===b}function w(a,b){return!!~(""+a).indexOf(b)}function x(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:v(f,"function")?f.bind(d||b):f}return!1}var d="2.6.1",e={},f=b.documentElement,g="modernizr",h=b.createElement(g),i=h.style,j,k={}.toString,l={},m={},n={},o=[],p=o.slice,q,r={}.hasOwnProperty,s;!v(r,"undefined")&&!v(r.call,"undefined")?s=function(a,b){return r.call(a,b)}:s=function(a,b){return b in a&&v(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=p.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(p.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(p.call(arguments)))};return e}),l.sessionstorage=function(){try{return sessionStorage.setItem(g,g),sessionStorage.removeItem(g),!0}catch(a){return!1}};for(var y in l)s(l,y)&&(q=y.toLowerCase(),e[q]=l[y](),o.push((e[q]?"":"no-")+q));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)s(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,enableClasses&&(f.className+=" "+(b?"":"no-")+a),e[a]=b}return e},t(""),h=j=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function p(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?n(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function q(a){a||(a=b);var c=m(a);return r.shivCSS&&!f&&!c.hasCSS&&(c.hasCSS=!!k(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),j||p(a,c),a}var c=a.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i,f,g="_html5shiv",h=0,i={},j;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
\ No newline at end of file |