aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rwxr-xr-xweb/alert.cgi4
-rw-r--r--web/cobrands/barnet/css/layout.css8
-rw-r--r--web/cobrands/fiksgatami/css.css152
-rw-r--r--web/cobrands/fiksgatami/css.scss41
-rw-r--r--web/cobrands/southampton/SCClogo.pngbin0 -> 2698 bytes
-rw-r--r--web/cobrands/southampton/accessInfo.gifbin0 -> 2537 bytes
-rw-r--r--web/cobrands/southampton/bg-box.gifbin0 -> 3009 bytes
-rw-r--r--web/cobrands/southampton/bg-button.gifbin0 -> 53 bytes
-rw-r--r--web/cobrands/southampton/bg-footer.gifbin0 -> 664 bytes
-rw-r--r--web/cobrands/southampton/bg-header.jpgbin0 -> 33045 bytes
-rw-r--r--web/cobrands/southampton/bg-input.gifbin0 -> 66 bytes
-rw-r--r--web/cobrands/southampton/bg-repeat.gifbin0 -> 94 bytes
-rw-r--r--web/cobrands/southampton/blue-line.gifbin0 -> 54 bytes
-rw-r--r--web/cobrands/southampton/bullet.gifbin0 -> 118 bytes
-rw-r--r--web/cobrands/southampton/bulletActiveSG.gifbin0 -> 109 bytes
-rw-r--r--web/cobrands/southampton/css.css47
-rw-r--r--web/cobrands/southampton/css.scss67
-rw-r--r--web/cobrands/southampton/ff.pngbin0 -> 267194 bytes
-rw-r--r--web/cobrands/southampton/forms.pngbin0 -> 303561 bytes
-rw-r--r--web/cobrands/southampton/ie6.pngbin0 -> 199421 bytes
-rw-r--r--web/cobrands/southampton/information.gifbin0 -> 1025 bytes
-rw-r--r--web/cobrands/southampton/line.gifbin0 -> 54 bytes
-rw-r--r--web/cobrands/southampton/logo.pngbin0 -> 1885 bytes
-rw-r--r--web/cobrands/southampton/mctv.pngbin0 -> 3182 bytes
-rw-r--r--web/cobrands/southampton/safari.pngbin0 -> 318409 bytes
-rw-r--r--web/cobrands/southampton/style.css87
-rwxr-xr-xweb/confirm.cgi2
-rw-r--r--web/css/_main.scss139
-rw-r--r--web/css/cobrands/emptyhomes/emptyhomes.css24
-rw-r--r--web/css/core.css845
-rw-r--r--web/css/core.scss503
-rw-r--r--web/css/ie6-378.css2
-rw-r--r--web/css/ie6.css6
-rw-r--r--web/css/main.css182
-rw-r--r--web/css/main.scss14
-rw-r--r--web/down.default.html2
-rw-r--r--web/i/SEHPlogo-bwS.pngbin0 -> 17954 bytes
-rw-r--r--web/i/Sheltercymru47s.pngbin0 -> 9702 bytes
-rwxr-xr-xweb/import.cgi172
-rwxr-xr-xweb/index.cgi54
-rw-r--r--web/js.js8
-rw-r--r--web/js/map-OpenLayers.js182
-rw-r--r--web/js/map-OpenStreetMap.js133
-rw-r--r--web/js/map-bing-ol.js41
-rw-r--r--web/js/map-bing.js3
-rw-r--r--web/js/map-google.js2
-rw-r--r--web/js/map-streetview.js34
-rw-r--r--web/js/map-tilma-ol.js33
-rw-r--r--web/js/map-tilma.js2
-rwxr-xr-xweb/reports.cgi5
-rwxr-xr-xweb/rss.cgi4
-rwxr-xr-xweb/tms-signup.cgi2
-rw-r--r--web/xsl.eha.xsl2
-rw-r--r--web/xsl.xsl2
54 files changed, 1950 insertions, 854 deletions
diff --git a/web/alert.cgi b/web/alert.cgi
index dd4676644..208dc756b 100755
--- a/web/alert.cgi
+++ b/web/alert.cgi
@@ -364,7 +364,7 @@ sub alert_list_options {
my $rss_url = Cobrand::url($cobrand, $url, $q);
$out .= 'value="' . $id . '"> <label for="' . $id . '">' . $text
. '</label> <a href="' . $rss_url . '"><img src="/i/feed.png" width="16" height="16"
-title="' . sprintf(_('RSS feed of %s'), $text) . '" alt="' . _('RSS feed') . '" border="0"></a>';
+title="' . sprintf(_('RSS feed of %s'), $text) . '" alt="' . _('RSS feed') . '" border="0"></a></li>';
}
return $out;
}
@@ -605,6 +605,6 @@ sub alert_do_subscribe {
$h{url} = Page::base_url_with_lang($q, undef, 1) . '/A/'
. mySociety::AuthToken::store('alert', { id => $alert_id, type => 'subscribe', email => $email } );
dbh()->commit();
- return Page::send_email($q, $email, undef, 'alert', %h);
+ return Page::send_confirmation_email($q, $email, undef, 'alert', %h);
}
diff --git a/web/cobrands/barnet/css/layout.css b/web/cobrands/barnet/css/layout.css
index b66f957b6..1445ff419 100644
--- a/web/cobrands/barnet/css/layout.css
+++ b/web/cobrands/barnet/css/layout.css
@@ -1,13 +1,13 @@
/* FixMyStreet additions */
/* Smaller map */
-#map_box {
+#mysociety #map_box {
width: 380px;
}
-#map, #drag {
+#mysociety #map, #mysociety #drag {
width: 378px;
height: 378px;
}
-#watermark {
+#mysociety #watermark {
background: url("/i/mojwatermark-378.png");
height: 84px;
width: 171px;
@@ -16,7 +16,7 @@
right: 0;
}
-p#fixed, p#unknown {
+#mysociety p#fixed, #mysociety p#unknown {
margin-right: 400px;
width: auto;
}
diff --git a/web/cobrands/fiksgatami/css.css b/web/cobrands/fiksgatami/css.css
index 4db2a94e6..54513fb34 100644
--- a/web/cobrands/fiksgatami/css.css
+++ b/web/cobrands/fiksgatami/css.css
@@ -1,64 +1,152 @@
-#front_stats div {
- width: 6.5em;
+#mysociety #front_stats div {
+ width: 6.5em;
+}
+#mysociety label {
+ width: 6em;
+}
+#mysociety #fieldset div.checkbox, #mysociety #problem_submit {
+ padding-left: 6.5em;
}
body {
- font-family: Helmet, Freesans, "Helvetica Neue", Arial, sans-serif;
+ font-family: "Gill Sans", "Gill Sans MT", Helvetica, Arial, sans-serif;
+ margin: 0;
+ padding: 0;
}
-a:link {
- color: #215d93;
-}
-a:visited {
- color: #518dc3;
+h1 {
+ margin: 0;
+ font-size: 175%;
}
-a:hover, a:active {
- color: #cc0000;
+
+h2 {
+ font-size: 140%;
}
-blockquote {
- border-left: solid 4px #1a4f7f;
+select, input, textarea {
+ font-size: 99%;
}
-.a {
- color: #000000;
- background-color: #a9cff1;
+#mysociety a.unsuitable-report {
+ font-size: small;
+}
+#mysociety blockquote {
+ border-left: solid 4px #1a4f7f;
+}
+#mysociety .a {
+ color: #000000;
+ background-color: #a9cff1;
+}
+#mysociety #postcodeForm {
+ background-color: #99bfe1;
+}
+#mysociety #front_stats div {
+ background-color: #99bfe1;
}
#header {
- padding: 0.1em 0.5em 0.15em;
- border-bottom: solid 2px #1a4f7f;
- background-color: #99bfe1;
- color: #1a4f7f;
+ font-size: 200%;
+ font-weight: bold;
+ border-bottom: solid 2px #1a4f7f;
+ margin: 0;
+ padding: 0.15em 0.5em;
+ background-color: #99bfe1;
+ color: #1a4f7f;
+}
+#header a:link, #header a:visited {
+ color: #1a4f7f;
+ background-color: #99bfe1;
+ text-decoration: none;
+}
+#header a:active, #header a:hover {
+ text-decoration: underline;
}
#my {
- color: #0a3f6f;
- background-color: #99bfe1;
+ color: #0a3f6f;
+ background-color: #99bfe1;
}
-#header a:link, #header a:visited {
- color: #1a4f7f;
- background-color: #99bfe1;
+#mysociety {
+ width: 100%;
+ /* Must specify a width or IE goes crazy wrong! */
+ position: relative;
+ margin: 0 auto;
+ max-width: 60em;
+}
+
+/* Can't put the margin in #mysociety because of above IE craziness */
+#wrapper {
+ margin: 2em;
}
+.v {
+ display: none;
+}
+
+#navigation {
+ position: absolute;
+ top: 1em;
+ right: 1em;
+ padding: 0;
+ margin: 0;
+ list-style-type: none;
+}
+#navigation li {
+ display: inline;
+ padding: 0;
+ margin: 0;
+}
+#navigation a {
+ display: -moz-inline-box;
+ display: inline-block;
+ padding: 0.4em 1em;
+}
#navigation a:link, #navigation a:visited {
- color: #1a4f7f;
+ color: #1a4f7f;
}
#navigation a:hover, #navigation a:active {
- background-color: #1a4f7f;
- color: #99bfe1;
+ background-color: #1a4f7f;
+ color: #99bfe1;
+}
+
+#nav_new a {
+ background-image: url("/i/new.png");
+ background-repeat: no-repeat;
+ background-position: 100% 0;
+}
+
+#logo {
+ border: none;
+ position: absolute;
+ top: 3.3em;
+ right: 10px;
}
#footer {
- border-top: solid 1px #1a4f7f;
+ clear: both;
+ text-align: right;
+ font-size: 83%;
+ border-top: solid 1px #1a4f7f;
+ display: table;
+ margin: 2em 0 1em auto;
+ padding: 2px 4px;
}
-#postcodeForm {
- background-color: #99bfe1;
+body {
+ font-family: Helmet, Freesans, "Helvetica Neue", Arial, sans-serif;
}
-#front_stats div {
- background-color: #99bfe1;
+a:link {
+ color: #215d93;
+}
+a:visited {
+ color: #518dc3;
+}
+a:hover, a:active {
+ color: #cc0000;
}
+#header {
+ padding: 0.1em 0.5em 0.15em;
+}
diff --git a/web/cobrands/fiksgatami/css.scss b/web/cobrands/fiksgatami/css.scss
new file mode 100644
index 000000000..aa09b024a
--- /dev/null
+++ b/web/cobrands/fiksgatami/css.scss
@@ -0,0 +1,41 @@
+$header_back: #99bfe1;
+$header_back_lighter: #a9cff1;
+$header_colour: #1a4f7f;
+$header_darker: #0a3f6f;
+
+// Overrides of core.css
+
+#mysociety {
+
+ #front_stats div {
+ width: 6.5em;
+ }
+
+ label {
+ width: 6em;
+ }
+
+ #fieldset div.checkbox, #problem_submit {
+ padding-left: 6.5em;
+ }
+
+}
+
+@import "../../css/_main";
+
+// Overrides of main.css
+
+body {
+ font-family: Helmet, Freesans, "Helvetica Neue", Arial, sans-serif;
+}
+
+a {
+ &:link { color: #215d93; }
+ &:visited { color: #518dc3; }
+ &:hover, &:active { color: #cc0000; }
+}
+
+#header {
+ padding: 0.1em 0.5em 0.15em;
+}
+
diff --git a/web/cobrands/southampton/SCClogo.png b/web/cobrands/southampton/SCClogo.png
new file mode 100644
index 000000000..74a037a8c
--- /dev/null
+++ b/web/cobrands/southampton/SCClogo.png
Binary files differ
diff --git a/web/cobrands/southampton/accessInfo.gif b/web/cobrands/southampton/accessInfo.gif
new file mode 100644
index 000000000..418698ed5
--- /dev/null
+++ b/web/cobrands/southampton/accessInfo.gif
Binary files differ
diff --git a/web/cobrands/southampton/bg-box.gif b/web/cobrands/southampton/bg-box.gif
new file mode 100644
index 000000000..559a5ae00
--- /dev/null
+++ b/web/cobrands/southampton/bg-box.gif
Binary files differ
diff --git a/web/cobrands/southampton/bg-button.gif b/web/cobrands/southampton/bg-button.gif
new file mode 100644
index 000000000..f5f8122dc
--- /dev/null
+++ b/web/cobrands/southampton/bg-button.gif
Binary files differ
diff --git a/web/cobrands/southampton/bg-footer.gif b/web/cobrands/southampton/bg-footer.gif
new file mode 100644
index 000000000..89919c1cd
--- /dev/null
+++ b/web/cobrands/southampton/bg-footer.gif
Binary files differ
diff --git a/web/cobrands/southampton/bg-header.jpg b/web/cobrands/southampton/bg-header.jpg
new file mode 100644
index 000000000..70e0ec46a
--- /dev/null
+++ b/web/cobrands/southampton/bg-header.jpg
Binary files differ
diff --git a/web/cobrands/southampton/bg-input.gif b/web/cobrands/southampton/bg-input.gif
new file mode 100644
index 000000000..267fe9b6b
--- /dev/null
+++ b/web/cobrands/southampton/bg-input.gif
Binary files differ
diff --git a/web/cobrands/southampton/bg-repeat.gif b/web/cobrands/southampton/bg-repeat.gif
new file mode 100644
index 000000000..b68346517
--- /dev/null
+++ b/web/cobrands/southampton/bg-repeat.gif
Binary files differ
diff --git a/web/cobrands/southampton/blue-line.gif b/web/cobrands/southampton/blue-line.gif
new file mode 100644
index 000000000..c7a587ee5
--- /dev/null
+++ b/web/cobrands/southampton/blue-line.gif
Binary files differ
diff --git a/web/cobrands/southampton/bullet.gif b/web/cobrands/southampton/bullet.gif
new file mode 100644
index 000000000..a86ef002b
--- /dev/null
+++ b/web/cobrands/southampton/bullet.gif
Binary files differ
diff --git a/web/cobrands/southampton/bulletActiveSG.gif b/web/cobrands/southampton/bulletActiveSG.gif
new file mode 100644
index 000000000..6f4e3e438
--- /dev/null
+++ b/web/cobrands/southampton/bulletActiveSG.gif
Binary files differ
diff --git a/web/cobrands/southampton/css.css b/web/cobrands/southampton/css.css
new file mode 100644
index 000000000..85f66dcc3
--- /dev/null
+++ b/web/cobrands/southampton/css.css
@@ -0,0 +1,47 @@
+#mysociety #map_box {
+ width: 380px;
+}
+#mysociety #map, #mysociety #drag {
+ width: 378px;
+ height: 378px;
+}
+#mysociety #watermark {
+ background: url("/i/mojwatermark-378.png");
+ height: 84px;
+ width: 171px;
+ position: absolute;
+ bottom: 0;
+ right: 0;
+}
+#mysociety p#fixed, #mysociety p#unknown {
+ margin-right: 400px;
+ width: auto;
+}
+#mysociety h1 {
+ margin: 0;
+ font-size: 175%;
+}
+#mysociety h2 {
+ font-size: 140%;
+}
+#mysociety select, #mysociety input, #mysociety textarea {
+ font-size: 99%;
+}
+#mysociety a.unsuitable-report {
+ font-size: small;
+}
+#mysociety blockquote {
+ border-left: solid 4px #768eb5;
+}
+#mysociety .a {
+ color: #000000;
+ background-color: #e9eef7;
+}
+#mysociety #postcodeForm {
+ background-color: #e9eef7;
+}
+#mysociety #front_stats div {
+ background-color: #e9eef7;
+ width: 6em;
+ padding: 0.5em;
+}
diff --git a/web/cobrands/southampton/css.scss b/web/cobrands/southampton/css.scss
new file mode 100644
index 000000000..57cb95a8f
--- /dev/null
+++ b/web/cobrands/southampton/css.scss
@@ -0,0 +1,67 @@
+$map_width: 378px;
+$background: #E9EEF7;
+$darker: #768EB5;
+
+#mysociety {
+
+ // Smaller map
+
+ #map_box {
+ width: $map_width + 2px;
+ }
+ #map, #drag {
+ width: $map_width;
+ height: $map_width;
+ }
+ #watermark {
+ background: url("/i/mojwatermark-378.png");
+ height: 84px;
+ width: 171px;
+ position: absolute;
+ bottom: 0;
+ right: 0;
+ }
+
+ p#fixed, p#unknown {
+ margin-right: $map_width + 22px;
+ width: auto;
+ }
+
+ // Generics
+
+ h1 {
+ margin: 0;
+ font-size: 175%;
+ }
+ h2 {
+ font-size: 140%;
+ }
+
+ select, input, textarea {
+ font-size: 99%;
+ }
+
+ a.unsuitable-report {
+ font-size: small;
+ }
+
+ blockquote {
+ border-left: solid 4px $darker;
+ }
+
+ .a {
+ color: #000000;
+ background-color: $background;
+ }
+
+ #postcodeForm {
+ background-color: $background;
+ }
+
+ #front_stats div {
+ background-color: $background;
+ width: 6em;
+ padding: 0.5em;
+ }
+
+}
diff --git a/web/cobrands/southampton/ff.png b/web/cobrands/southampton/ff.png
new file mode 100644
index 000000000..ef7d91148
--- /dev/null
+++ b/web/cobrands/southampton/ff.png
Binary files differ
diff --git a/web/cobrands/southampton/forms.png b/web/cobrands/southampton/forms.png
new file mode 100644
index 000000000..4f278e9ae
--- /dev/null
+++ b/web/cobrands/southampton/forms.png
Binary files differ
diff --git a/web/cobrands/southampton/ie6.png b/web/cobrands/southampton/ie6.png
new file mode 100644
index 000000000..d6179fa02
--- /dev/null
+++ b/web/cobrands/southampton/ie6.png
Binary files differ
diff --git a/web/cobrands/southampton/information.gif b/web/cobrands/southampton/information.gif
new file mode 100644
index 000000000..ea2f14bd2
--- /dev/null
+++ b/web/cobrands/southampton/information.gif
Binary files differ
diff --git a/web/cobrands/southampton/line.gif b/web/cobrands/southampton/line.gif
new file mode 100644
index 000000000..fa6ddca0c
--- /dev/null
+++ b/web/cobrands/southampton/line.gif
Binary files differ
diff --git a/web/cobrands/southampton/logo.png b/web/cobrands/southampton/logo.png
new file mode 100644
index 000000000..71bdc9d97
--- /dev/null
+++ b/web/cobrands/southampton/logo.png
Binary files differ
diff --git a/web/cobrands/southampton/mctv.png b/web/cobrands/southampton/mctv.png
new file mode 100644
index 000000000..17f3ecec6
--- /dev/null
+++ b/web/cobrands/southampton/mctv.png
Binary files differ
diff --git a/web/cobrands/southampton/safari.png b/web/cobrands/southampton/safari.png
new file mode 100644
index 000000000..e99547a7f
--- /dev/null
+++ b/web/cobrands/southampton/safari.png
Binary files differ
diff --git a/web/cobrands/southampton/style.css b/web/cobrands/southampton/style.css
new file mode 100644
index 000000000..cd4c0f490
--- /dev/null
+++ b/web/cobrands/southampton/style.css
@@ -0,0 +1,87 @@
+body {font-family:Verdana, Geneva, sans-serif; font-size:62.5%;}
+
+a {text-decoration:none; color:#1c4384; font-weight:bold;}
+
+a:hover {text-decoration:underline;}
+
+p {margin:0 0 10px 0;}
+
+/* ******* Start of Header ******* */
+
+ul#topMenu {width:860px; height:15px; margin:13px auto 3px auto;}
+ul#topMenu li {float:left; list-style-type:none;}
+ul#topMenu a {padding:0 5px 2px 5px; font-size:0.9em; color:#000; font-weight:400;}
+
+#wrapper {width:960px; height:auto; margin:0 auto; background:url(bg-repeat.gif) repeat-y;}
+#header {width:100%; height:176px; background:url(bg-header.jpg) no-repeat; background-position:1px 0px;}
+#header .logo {float:left; width:87px; height:81px; margin:25px 0 17px 46px;}
+#header a.siteTitle {height:27px; width:287px; background:url(logo.png) no-repeat; display:block; font-family:verdana; float:left; margin:60px 0 0 15px; text-indent:-9999px;}
+
+a.mctv {float:right; height:37px; width:104px; margin:15px 7px 0 0;}
+a.mctv img {border:none;}
+
+#searchWrap {width:210px; height:auto; float:right; margin:10px 30px 0 0;}
+#searchWrap form {border:none; padding:0; margin:0 0 10px 0;}
+#searchWrap fieldset {border:none; padding:0; margin:0;}
+#searchWrap label {color:#1b4384; font-weight:700; font-size:1.1em; margin:0; padding:0;}
+#searchWrap input {float:left; background:url(bg-input.gif) repeat-x; margin:3px 0 0 0; line-height:16px; padding:3px 5px 3px 4px;}
+#searchWrap .button {background:url(bg-button.gif) repeat-x; margin:3px 0 0 5px; float:left; height:26px; padding:0 3px 4px 3px; color:#fff; border:none;}
+
+.moreInfo {margin:0 0 -2px 2px;}
+.text {width:109px; color:#999;}
+.text2 {width:137px; color:#999;}
+
+ul#topNav {width:870px; height:17px; background:#1b4384; clear:both; margin:0 auto; padding:3px 0 1px 0;}
+ul#topNav li {float:left; list-style-type:none; background:url(line.gif) no-repeat 0 2px;}
+ul#topNav li:first-child {background:none;}
+ul#topNav li a {color:#ffffff; font-size:1.2em; padding:0 7px 0 8px; font-size:1.2em; font-weight:400;}
+
+p.atoz {float:left; margin:8px 0 0 43px; padding:5px 5px 3px 0; font-size:1.2em; border-bottom:1px solid #E0DBEF;}
+ul#atoz {width:485px; float:left; margin:13px 0 0 0; border-bottom:1px solid #E0DBEF; padding:0 0 1px 0;}
+ul#atoz li {list-style-type:none; display:inline;}
+ul#atoz li a {font-size:13px; font-weight:400;}
+
+ul#contacts {float:right; margin:13px 36px 0 0; padding:0;}
+ul#contacts li {float:left; list-style-type:none; background:url(blue-line.gif) no-repeat 0 2px;}
+ul#contacts li:first-child {background:none;}
+ul#contacts li a {font-size:1.2em; padding:0 8px 0 10px; font-weight:400;}
+
+/* ******* End of Header ******* */
+
+
+
+/* ******* Start of Left Menu Bar ******* */
+
+#menuBar {width:200px; height:auto; float:left; margin:25px 0 0 43px; padding-bottom:25px; clear:both; }
+
+ul#leftMenu {height:auto; width:199px; float:left; background:#e9eef7 url(bg-box.gif) no-repeat -1px 100%; padding:0 0 10px 0; margin:5px 0 0 0; overflow:hidden;}
+ul#leftMenu li {list-style-type:none; width:199px; padding:0;}
+ul#leftMenu li a {display:block; width:100%; line-height:1.5em; padding:3px 10px 3px 32px; font-size:1.2em; font-weight:700;}
+ul#leftMenu li.parent {background:url(bulletActiveSG.gif) no-repeat #768eb5; background-position:10px 11px; color:#fff; padding:3px 0 3px 0;}
+ul#leftMenu li.parent a {color:#fff}
+ul#leftMenu li.selected {background:url(bullet.gif) no-repeat; background-position:10px 8px; color:#fff; padding:0;}
+
+/* ******* End of Left Menu Bar ******* */
+
+
+
+/* ******* Start of Main Content Area ******* */
+
+#contentArea {width:640px; height:auto; float:left; padding-bottom:25px; font-size:1.1em; margin:15px 0 0 0; padding:15px 0 20px 25px;}
+
+/* ******* End of Main Content Area ******* */
+
+
+
+/* ******* Start of Footer ******* */
+
+#footer {width:100%; height:54px; clear:both; background:url(bg-footer.gif) no-repeat;}
+
+a.accessInfo {float:left; height:32px; width:117px; margin:0 10px 0 43px;}
+a.accessInfo img {border:none;}
+
+ul#bottomMenu {float:left; margin:10px 0 0 10px;}
+ul#bottomMenu li {float:left; list-style-type:none;}
+ul#bottomMenu a {padding:0 4px 2px 4px; font-size:0.9em; color:#000; font-weight:400;}
+
+/* ******* End of Footer ******* */
diff --git a/web/confirm.cgi b/web/confirm.cgi
index 8836431ab..cb9f5d4c8 100755
--- a/web/confirm.cgi
+++ b/web/confirm.cgi
@@ -124,7 +124,7 @@ sub ask_questionnaire {
my $qn_thanks = _("Thanks, glad to hear it's been fixed! Could we just ask if you have ever reported a problem to a council before?");
my $yes = _('Yes');
my $no = _('No');
- my $go = _('Go');
+ my $go = _('Submit');
my $form_action = Cobrand::url($cobrand, "/confirm", $q);
my $form_extra_elements = Cobrand::form_elements($cobrand, 'questionnaire', $q);
my $out = <<EOF;
diff --git a/web/css/_main.scss b/web/css/_main.scss
new file mode 100644
index 000000000..44fd82b3b
--- /dev/null
+++ b/web/css/_main.scss
@@ -0,0 +1,139 @@
+// Generics
+
+body {
+ font-family: "Gill Sans", "Gill Sans MT", Helvetica, Arial, sans-serif;
+ margin: 0;
+ padding: 0;
+ // color: #a9aeb0;
+}
+
+h1 {
+ margin: 0;
+ font-size: 175%;
+}
+h2 {
+ font-size: 140%;
+}
+
+select, input, textarea {
+ font-size: 99%;
+}
+
+#mysociety {
+
+ a.unsuitable-report {
+ font-size: small;
+ }
+
+ blockquote {
+ border-left: solid 4px $header_colour;
+ }
+
+ .a {
+ color: #000000;
+ background-color: $header_back_lighter;
+ }
+
+ #postcodeForm {
+ background-color: $header_back;
+ }
+
+ #front_stats div {
+ background-color: $header_back;
+ }
+
+}
+
+// Site layout
+
+#header {
+ font-size: 200%;
+ font-weight: bold;
+ border-bottom: solid 2px $header_colour;
+ margin: 0;
+ padding: 0.15em 0.5em;
+ background-color: $header_back;
+ color: $header_colour;
+
+ a:link, a:visited {
+ color: $header_colour;
+ background-color: $header_back;
+ text-decoration: none;
+ }
+ a:active, a:hover {
+ text-decoration: underline;
+ }
+}
+
+#my {
+ color: $header_darker;
+ background-color: $header_back;
+}
+
+#mysociety {
+ width: 100%; /* Must specify a width or IE goes crazy wrong! */
+ position: relative;
+ margin: 0 auto;
+ max-width: 60em;
+}
+
+/* Can't put the margin in #mysociety because of above IE craziness */
+#wrapper {
+ margin: 2em;
+}
+
+.v {
+ display: none;
+}
+
+#navigation {
+ position: absolute;
+ top: 1em;
+ right: 1em;
+ padding: 0;
+ margin: 0;
+ list-style-type: none;
+
+ li {
+ display: inline;
+ padding: 0;
+ margin: 0;
+ }
+
+ a {
+ display: -moz-inline-box;
+ display: inline-block;
+ padding: 0.4em 1em;
+ }
+ a:link, a:visited {
+ color: $header_colour;
+ }
+ a:hover, a:active {
+ background-color: $header_colour;
+ color: $header_back;
+ }
+}
+
+#nav_new a {
+ background-image: url("/i/new.png");
+ background-repeat: no-repeat;
+ background-position: 100% 0;
+}
+
+#logo {
+ border: none;
+ position: absolute;
+ top: 3.3em;
+ right: 10px;
+}
+
+#footer {
+ clear: both;
+ text-align: right;
+ font-size: 83%;
+ border-top: solid 1px $header_colour;
+ display: table;
+ margin: 2em 0 1em auto;
+ padding: 2px 4px;
+}
+
diff --git a/web/css/cobrands/emptyhomes/emptyhomes.css b/web/css/cobrands/emptyhomes/emptyhomes.css
index c3d514807..15afee568 100644
--- a/web/css/cobrands/emptyhomes/emptyhomes.css
+++ b/web/css/cobrands/emptyhomes/emptyhomes.css
@@ -74,8 +74,6 @@ blockquote {
/* Site layout */
#header {
- font-size: 200%;
- font-weight: bold;
margin: 0;
padding: 5px 0;
float: left;
@@ -85,14 +83,24 @@ blockquote {
margin-left: 0.5em;
}
-#content {
+#header #eha-logo {
+ float: left;
+ margin-right: 1em;
+}
+
+#header div {
+ float: left;
+ margin-top: 0.5em;
+}
+
+#mysociety {
width: 100%; /* Must specify a width or IE goes crazy wrong! */
position: relative;
margin: 0 auto;
max-width: 60em;
}
-/* Can't put the margin in #content because of above IE craziness */
+/* Can't put the margin in #mysociety because of above IE craziness */
#wrapper {
clear: both;
margin: 0 2em 2em;
@@ -146,7 +154,7 @@ blockquote {
right: 10px;
}
-#footer {
+#emptyhomes-footer {
clear: both;
font-size: 83%;
border-top: solid 2em #ffffff;
@@ -156,11 +164,11 @@ blockquote {
padding: 20px;
overflow: auto;
}
-#footer div {
+#emptyhomes-footer div {
float: left;
- margin-right: 1em;
+ margin-right: 2em;
}
-#footer a {
+#emptyhomes-footer a {
color: #FFFFFF;
}
diff --git a/web/css/core.css b/web/css/core.css
index 0ff8fb1a2..5b64d67b9 100644
--- a/web/css/core.css
+++ b/web/css/core.css
@@ -1,488 +1,379 @@
-/* Generics */
-blockquote {
- border-left: solid 4px #666666;
- padding-left: 0.5em;
+#mysociety blockquote {
+ border-left: solid 4px #666666;
+ padding-left: 0.5em;
+}
+#mysociety blockquote h2, #mysociety blockquote p {
+ margin: 0;
+}
+#mysociety dt {
+ font-weight: bold;
+ margin-top: 0.5em;
+}
+#mysociety .gone {
+ color: #666666;
+ background-color: #cccccc;
+}
+#mysociety p.error {
+ text-align: center;
+ color: #cc0000;
+ font-size: larger;
+}
+#mysociety ul {
+ padding: 0 0 0 1.5em;
+ margin: 0;
+}
+#mysociety ul.error {
+ color: #cc0000;
+ background-color: #ffeeee;
+ padding-right: 4px;
+ text-align: left;
+ font-size: larger;
+}
+#mysociety div.form-error {
+ color: #cc0000;
+ margin: 5px 1em 5px 1em;
+ padding: 2px 5px 2px 5px;
+ float: left;
+ background-color: #ffeeee;
+ text-align: left;
+}
+#mysociety div.form-field {
+ clear: both;
+}
+#mysociety #advert_thin {
+ width: 50%;
+ margin: 1em auto;
+ border-top: dotted 1px #999999;
+}
+#mysociety #advert_hfymp {
+ border-top: dotted 1px #999999;
+ text-align: center;
+}
+#mysociety p#expl {
+ text-align: center;
+ font-size: 150%;
+ margin: 0 2em;
+}
+#mysociety #postcodeForm {
+ display: table;
+ _width: 33em;
+ text-align: center;
+ font-size: 150%;
+ margin: 1em auto;
+ padding: 1em;
+ -moz-border-radius: 1em;
+ -webkit-border-radius: 1em;
+ border-radius: 1em;
+}
+#mysociety #postcodeForm label {
+ float: none;
+ padding-right: 0;
+}
+#mysociety #postcodeForm #submit {
+ font-size: 83%;
+}
+#mysociety #front_intro {
+ float: left;
+ width: 48%;
+}
+#mysociety #front_intro p {
+ clear: both;
+ margin-top: 0;
+}
+#mysociety #front_stats div {
+ text-align: center;
+ width: 5.5em;
+ -moz-border-radius: 0.5em;
+ -webkit-border-radius: 0.5em;
+ border-radius: 0.5em;
+ float: left;
+ margin: 0 1em 1em;
+}
+#mysociety #front_stats div big {
+ font-size: 150%;
+ display: block;
+}
+#mysociety #front_recent {
+ float: right;
+ width: 48%;
+ margin-bottom: 1em;
+}
+#mysociety #front_recent img, #mysociety #alert_recent img {
+ margin-right: 0.25em;
+ margin-bottom: 0.25em;
+}
+#mysociety #front_recent > h2:first-child, #mysociety #front_intro > h2:first-child {
+ margin-top: 0;
+}
+#mysociety form {
+ margin: 0;
+}
+#mysociety label {
+ float: left;
+ text-align: right;
+ padding-right: 0.5em;
+ width: 5em;
+}
+#mysociety fieldset, #mysociety #fieldset {
+ border: none;
+ padding: 0.5em;
+}
+#mysociety fieldset div, #mysociety #fieldset div {
+ margin-top: 2px;
+ clear: left;
+}
+#mysociety legend {
+ display: none;
+}
+#mysociety #fieldset div.checkbox, #mysociety #problem_submit {
+ padding-left: 5.5em;
+}
+#mysociety #fieldset div.checkbox label, #mysociety label.n {
+ float: none;
+ text-align: left;
+ padding-right: 0;
+ width: auto;
+ cursor: pointer;
+ cursor: hand;
+}
+#mysociety #questionnaire label, #mysociety #alerts label {
+ float: none;
+}
+#mysociety .confirmed {
+ background-color: #ccffcc;
+ border: solid 2px #009900;
+ padding: 5px;
+ text-align: center;
+}
+#mysociety #watermark {
+ background: url("/i/mojwatermark6.png");
+ height: 113px;
+ width: 231px;
+ position: absolute;
+ bottom: 0;
+ right: 0;
+}
+#mysociety #map_box {
+ float: right;
+ width: 502px;
+ position: relative;
+ padding-left: 20px;
+ background-color: #ffffff;
+}
+#mysociety p#copyright {
+ float: right;
+ margin: 0 0 1em 0;
+ font-size: 78%;
+}
+#mysociety #map {
+ border: solid 1px #000000;
+ width: 500px;
+ height: 500px;
+ overflow: hidden;
+ position: relative;
+ background-color: #f1f1f1;
+}
+#mysociety #drag {
+ position: absolute;
+ width: 500px;
+ height: 500px;
+ right: 0;
+ top: 0;
+}
+#mysociety #drag input, #mysociety #drag img {
+ position: absolute;
+ border: none;
+}
+#mysociety #drag input {
+ cursor: crosshair;
+ background-color: #cccccc;
+}
+#mysociety #drag img {
+ cursor: move;
+}
+#mysociety #drag img.pin {
+ z-index: 100;
+ background-color: inherit;
+}
+#mysociety #drag a img.pin {
+ cursor: pointer;
+ cursor: hand;
+}
+#mysociety form#mapForm #map {
+ cursor: pointer;
+}
+#mysociety form#mapForm .olTileImage {
+ cursor: crosshair;
+}
+#mysociety #compass {
+ background-color: #ffffff;
+ border: solid 1px #000000;
+ border-width: 0 1px 1px 0;
+ color: #000000;
+ position: absolute;
+ top: 0px;
+ left: 0px;
+}
+#mysociety #compass img {
+ border: 0;
+}
+#mysociety #text_map {
+ margin-top: 0.5em;
+ margin-bottom: 1em;
+ font-size: 110%;
+}
+#mysociety #text_no_map {
+ margin-top: 0;
+}
+#mysociety #sub_map_links {
+ float: right;
+ clear: right;
+ margin-top: 0;
+}
+#mysociety #fixed {
+ margin: 0 530px 1em 0;
+ padding: 5px;
+ text-align: center;
+ position: relative;
+ background-color: #ccffcc;
+ border: solid 2px #009900;
+}
+#mysociety #unknown {
+ margin: 0 530px 1em 0;
+ padding: 5px;
+ text-align: center;
+ position: relative;
+ background-color: #ffcccc;
+ border: solid 2px #990000;
+}
+#mysociety #updates div {
+ padding: 0 0 0.5em;
+ margin: 0 0 0.25em;
+ border-bottom: dotted 1px #5e552b;
+}
+#mysociety #updates div .problem-update, #mysociety #updates div .update-text {
+ padding: 0;
+ margin: 0;
+ border-bottom: 0;
+}
+#mysociety #updates p {
+ margin: 0;
+}
+#mysociety #nearby_lists h2 {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+}
+#mysociety #alert_links {
+ float: right;
+}
+#mysociety #alert_links_area {
+ background-color: #ffeecc;
+ border: solid 1px #ff9900;
+ border-width: 1px 0;
+ padding: 3px 10px;
+ margin: 0;
+}
+#mysociety #rss_alert {
+ text-decoration: none;
+}
+#mysociety #rss_alert span {
+ text-decoration: underline;
+}
+#mysociety #email_alert_box {
+ display: none;
+ position: absolute;
+ padding: 3px;
+ font-size: 83%;
+ border: solid 1px #7399C3;
+ background-color: #eeeeff;
+ color: #000000;
+}
+#mysociety #email_alert_box p {
+ margin: 0;
+}
+#mysociety .council_sent_info {
+ font-size: smaller;
+}
+#mysociety #rss_items {
+ width: 62%;
+ float: left;
+}
+#mysociety #rss_rhs {
+ border-left: 1px dashed #999;
+ width: 36%;
+ float: right;
+ padding: 0 0 0 0.5em;
+ margin: 0 0 1em 0.5em;
+}
+#mysociety #rss_box {
+ padding: 10px;
+ border: 1px solid #999999;
+}
+#mysociety #rss_feed {
+ list-style-type: none;
+ margin-bottom: 2em;
+}
+#mysociety #rss_feed li {
+ margin-bottom: 1em;
+}
+#mysociety #alert_or {
+ font-style: italic;
+ font-size: 125%;
+ margin: 0;
+}
+#mysociety #rss_list {
+ float: left;
+ width: 47%;
+}
+#mysociety #rss_list ul {
+ list-style-type: none;
+}
+#mysociety #rss_buttons {
+ float: right;
+ width: 35%;
+ text-align: center;
+ margin-bottom: 2em;
+}
+#mysociety #rss_local {
+ margin-left: 1.5em;
+ margin-bottom: 0;
}
-blockquote h2, blockquote p {
- margin: 0;
+#mysociety #rss_local_alt {
+ margin: 0 0 2em 4em;
+}
+#mysociety #alert_photos {
+ text-align: center;
+ float: right;
+ width: 150px;
+ margin-left: 0.5em;
}
+#mysociety #alert_photos h2 {
+ font-size: 100%;
-form {
- margin: 0;
}
-
-label {
- float: left;
- text-align: right;
- padding-right: 0.5em;
- width: 5em;
-}
-
-fieldset, #fieldset {
- border: none;
- padding: 0.5em;
-}
-
-legend {
- display: none;
-}
-
-dt {
- font-weight: bold;
- margin-top: 0.5em;
-}
-
-.v { display: none; }
-
-.gone {
- color: #666666;
- background-color: #cccccc;
-}
-
-p.error {
- text-align: center;
- color: #cc0000;
- font-size: larger;
-}
-
-span.error {
- color: #cc0000;
-}
-
-ul {
- padding: 0 0 0 1.5em;
- margin: 0;
-}
-
-ul.error {
- color: #cc0000;
- background-color: #ffeeee;
- padding-right: 4px;
- text-align: left;
- font-size: larger;
+#mysociety #alert_photos img {
+ margin-bottom: 0.25em;
}
-
-div.form-error {
- color: #cc0000;
- margin: 5px 1em 5px 1em;
- padding: 2px 5px 2px 5px;
- float: left;
- background-color: #ffeeee;
- text-align: left;
+#mysociety #col_problems, #mysociety #col_fixed {
+ float: left;
+ width: 48%;
+ margin-right: 1em;
}
-
-div.form-field {
- clear: both;
-}
-
-/* Site-wide layout */
-
-#advert_thin {
- width: 50%;
- margin: 1em auto;
- border-top: dotted 1px #999999;
-}
-#advert_hfymp {
- border-top: dotted 1px #999999;
- text-align: center;
-}
-
-/* Front page */
-
-p#expl {
- text-align: center;
- font-size: 150%;
- margin: 0 2em;
-}
-
-#postcodeForm {
- display: table;
- _width: 33em;
- text-align: center;
- font-size: 150%;
- margin: 1em auto;
- padding: 1em;
- -moz-border-radius: 1em;
- -webkit-border-radius: 1em;
- border-radius: 1em;
-}
-
-#postcodeForm label {
- float: none;
- padding-right: 0;
-}
-
-#postcodeForm #submit {
- font-size: 83%;
+#mysociety .contact-details {
+ font-size: 80%;
+ margin-top: 2em;
}
-#front_intro {
- float: left;
- width: 48%;
-}
-
-#front_intro p {
- clear: both;
- margin-top: 0;
-}
-
-#front_stats div {
- text-align: center;
- width: 5.5em;
- -moz-border-radius: 0.5em;
- -webkit-border-radius: 0.5em;
- border-radius: 0.5em;
- float: left;
- margin: 0 1em 1em;
-}
-
-#front_stats div big {
- font-size: 150%;
- display: block;
-}
-
-#front_recent {
- float: right;
- width: 48%;
- margin-bottom: 1em;
-}
-#front_recent img, #alert_recent img {
- margin-right: 0.25em;
- margin-bottom: 0.25em;
-}
-#front_recent > h2:first-child, #front_intro > h2:first-child {
- margin-top: 0;
-}
-
-/* Forms */
-
-fieldset div, #fieldset div {
- margin-top: 2px;
- clear: left;
-}
-#fieldset div.checkbox, #problem_submit {
- padding-left: 5.5em;
-}
-#fieldset div.checkbox label, label.n {
- float: none;
- text-align: left;
- padding-right: 0;
- width: auto;
- cursor: pointer;
- cursor: hand;
-}
-
-#questionnaire label, #alerts label {
- float: none;
-}
-
-.confirmed {
- background-color: #ccffcc;
- border: solid 2px #009900;
- padding: 5px;
- text-align: center;
-}
-
-/* Map */
-
-#watermark {
- background: url("/i/mojwatermark6.png");
- height: 113px;
- width: 231px;
- position: absolute;
- bottom: 0;
- right: 0;
-}
-
-#map_box {
- float: right;
- width: 502px; /* Two pixels more than width of #map */
- position: relative;
- padding-left: 20px;
- background-color: #ffffff;
-}
-
-p#copyright {
- float: right;
- margin: 0 0 1em 0;
- font-size: 78%;
-}
-
-#map {
- border: solid 1px #000000;
- width: 500px; /* Twice a tile width */
- height: 500px;
- overflow: hidden;
- position: relative;
- background-color: #f1f1f1;
-}
-
-#drag {
- position: absolute;
- width: 500px;
- height: 500px;
- right: 0;
- top: 0;
-}
-
-#drag input {
- cursor: crosshair;
- background-color: #cccccc;
-}
-#drag img {
- cursor: move;
-}
-#drag input, #drag img {
- position: absolute;
- border: none;
-}
-#drag img.pin {
- z-index: 100;
- background-color: inherit;
-}
-#drag a img.pin {
- cursor: pointer;
- cursor: hand;
-}
-
-#compass {
- background-color: #ffffff;
- border: solid 1px #000000;
- border-width: 0 1px 1px 0;
- color: #000000;
- position: absolute;
- top: 0px;
- left: 0px;
-}
-
-#compass img {
- border: 0;
-}
-
-#text_map {
- margin-top: 0.5em;
- margin-bottom: 1em;
- font-size: 110%;
-}
-#text_no_map {
- margin-top: 0;
- /* background-color: #ffeecc;
- padding: 4px; */
-}
-
-#sub_map_links {
- float: right;
- clear: right;
- margin-top: 0;
-}
-
-/* Problem pages */
-
-#fixed, #unknown {
- margin: 0 530px 1em 0;
- padding: 5px;
- text-align: center;
- position: relative;
-}
-#fixed {
- background-color: #ccffcc;
- border: solid 2px #009900;
-}
-#unknown {
- background-color: #ffcccc;
- border: solid 2px #990000;
-}
-
-#updates div {
- padding: 0 0 0.5em;
- margin: 0 0 0.25em;
- border-bottom: dotted 1px #5e552b;
-}
-
-#updates div .problem-update,
-#updates div .update-text {
- padding: 0;
- margin: 0;
- border-bottom: 0;
-}
-#updates p {
- margin: 0;
-}
-
-#nearby_lists h2 {
- margin-top: 0.5em;
- margin-bottom: 0;
-}
-#alert_links {
- float: right;
-}
-#alert_links_area {
- background-color: #ffeecc;
- border: solid 1px #ff9900;
- border-width: 1px 0;
- padding: 3px 10px;
- /* padding: 0 3px; */
- margin: 0;
-}
-#rss_alert {
- text-decoration: none;
-}
-#rss_alert span {
- text-decoration: underline;
-}
-#email_alert {
-}
-#email_alert_box {
- display:none;
- position: absolute;
- padding: 3px;
- font-size:83%;
- border:solid 1px #7399C3;
- background-color: #eeeeff;
- color: #000000;
-}
-#email_alert_box p {
- margin: 0;
-}
-
-.council_sent_info {
- font-size: smaller;
-}
-
-/* RSS feed XSL */
-
-#rss_items {
- width:62%;
- float:left;
-}
-#rss_rhs {
- border-left:1px dashed #999;
- width:36%;
- float:right;
- padding: 0 0 0 0.5em;
- margin: 0 0 1em 0.5em;
-}
-#rss_box {
- padding:10px;
- border:1px solid #999999;
-}
-
-/* Alerts */
-#rss_feed {
- list-style-type: none;
- margin-bottom: 2em;
-}
-#rss_feed li {
- margin-bottom: 1em;
-}
-#alert_or {
- font-style: italic;
- font-size: 125%;
- margin: 0;
-}
-#rss_list {
- float: left;
- width: 47%;
-}
-#rss_list ul {
- list-style-type: none;
-}
-#rss_buttons {
- float: right;
- width: 35%;
- text-align: center;
- margin-bottom: 2em;
-}
-#rss_local {
- margin-left: 1.5em;
- margin-bottom: 0;
-}
-#rss_local_alt {
- margin: 0 0 2em 4em;
-}
-
-#alert_photos {
- text-align: center;
- float: right;
- width: 150px;
- margin-left: 0.5em;
-}
-#alert_photos h2 {
- font-size: 100%;
-}
-#alert_photos img {
- margin-bottom: 0.25em;
-}
-
-/* Report page */
-
-#col_problems, #col_fixed {
- float: left;
- width: 48%;
- margin-right: 1em;
-}
-
-/* Contact page */
-.contact-details {
- font-size: 80%;
- margin-top: 2em;
-}
-
-/* Printing */
@media print {
- #map_box { float: none; margin: 0 auto; }
- #content { max-width: none; }
- #side { margin-right: 0; }
-}
-
-/* File upload */
-.progressContainer {
- margin: 5px;
- padding: 4px;
- width: 357px;
- border: solid 1px #E8E8E8;
- background-color: #F7F7F7;
- overflow: hidden;
-}
-.red { border: solid 1px #B50000; background-color: #FFEBEB; }
-.green { border: solid 1px #DDF0DD; background-color: #EBFFEB; }
-.blue { border: solid 1px #CEE2F2; background-color: #F0F5FF; }
-
-.progressName {
- font-size: 8pt;
- font-weight: bold;
- color: #555555;
- width: 323px;
- height: 14px;
- text-align: left;
- white-space: nowrap;
- overflow: hidden;
-}
-.progressBarInProgress, .progressBarComplete, .progressBarError {
- font-size: 0px;
- width: 0%;
- height: 2px;
- background-color: blue;
- margin-top: 2px;
-}
-.progressBarComplete {
- width: 100%;
- background-color: green;
- visibility: hidden;
-}
-.progressBarError {
- width: 100%;
- background-color: red;
- visibility: hidden;
-}
-.progressBarStatus {
- margin-top: 2px;
- width: 337px;
- font-size: 7pt;
- font-family: Verdana;
- text-align: left;
- white-space: nowrap;
+ #mysociety #map_box {
+ float: none;
+ margin: 0 auto;
+ }
+ #mysociety #mysociety {
+ max-width: none;
+ }
+ #mysociety #side {
+ margin-right: 0;
+ }
}
-
-
diff --git a/web/css/core.scss b/web/css/core.scss
new file mode 100644
index 000000000..8bbebfce1
--- /dev/null
+++ b/web/css/core.scss
@@ -0,0 +1,503 @@
+$map_width: 500px;
+
+@mixin problem-banner {
+ margin: 0 $map_width + 30px 1em 0;
+ padding: 5px;
+ text-align: center;
+ position: relative;
+}
+
+// Generics
+
+#mysociety {
+
+ blockquote {
+ border-left: solid 4px #666666;
+ padding-left: 0.5em;
+ h2, p {
+ margin: 0;
+ }
+ }
+
+ dt {
+ font-weight: bold;
+ margin-top: 0.5em;
+ }
+
+ .gone {
+ color: #666666;
+ background-color: #cccccc;
+ }
+
+ p.error {
+ text-align: center;
+ color: #cc0000;
+ font-size: larger;
+ }
+
+ ul {
+ padding: 0 0 0 1.5em;
+ margin: 0;
+ }
+
+ ul.error {
+ color: #cc0000;
+ background-color: #ffeeee;
+ padding-right: 4px;
+ text-align: left;
+ font-size: larger;
+ }
+
+ div.form-error {
+ color: #cc0000;
+ margin: 5px 1em 5px 1em;
+ padding: 2px 5px 2px 5px;
+ float: left;
+ background-color: #ffeeee;
+ text-align: left;
+ }
+
+ div.form-field {
+ clear: both;
+ }
+
+ // Site-wide layout
+
+ #advert_thin {
+ width: 50%;
+ margin: 1em auto;
+ border-top: dotted 1px #999999;
+ }
+ #advert_hfymp {
+ border-top: dotted 1px #999999;
+ text-align: center;
+ }
+
+ // Front page
+
+ p#expl {
+ text-align: center;
+ font-size: 150%;
+ margin: 0 2em;
+ }
+
+ #postcodeForm {
+ display: table;
+ _width: 33em;
+ text-align: center;
+ font-size: 150%;
+ margin: 1em auto;
+ padding: 1em;
+ -moz-border-radius: 1em;
+ -webkit-border-radius: 1em;
+ border-radius: 1em;
+
+ label {
+ float: none;
+ padding-right: 0;
+ }
+
+ #submit {
+ font-size: 83%;
+ }
+ }
+
+ #front_intro {
+ float: left;
+ width: 48%;
+
+ p {
+ clear: both;
+ margin-top: 0;
+ }
+ }
+
+ #front_stats div {
+ text-align: center;
+ width: 5.5em;
+ -moz-border-radius: 0.5em;
+ -webkit-border-radius: 0.5em;
+ border-radius: 0.5em;
+ float: left;
+ margin: 0 1em 1em;
+
+ big {
+ font-size: 150%;
+ display: block;
+ }
+ }
+
+ #front_recent {
+ float: right;
+ width: 48%;
+ margin-bottom: 1em;
+ }
+ #front_recent img, #alert_recent img {
+ margin-right: 0.25em;
+ margin-bottom: 0.25em;
+ }
+ #front_recent > h2:first-child, #front_intro > h2:first-child {
+ margin-top: 0;
+ }
+
+ // Forms
+
+ form {
+ margin: 0;
+ }
+
+ label {
+ float: left;
+ text-align: right;
+ padding-right: 0.5em;
+ width: 5em;
+ }
+
+ fieldset, #fieldset {
+ border: none;
+ padding: 0.5em;
+ div {
+ margin-top: 2px;
+ clear: left;
+ }
+ }
+
+ legend {
+ display: none;
+ }
+
+ #fieldset div.checkbox, #problem_submit {
+ padding-left: 5.5em;
+ }
+ #fieldset div.checkbox label, label.n {
+ float: none;
+ text-align: left;
+ padding-right: 0;
+ width: auto;
+ cursor: pointer;
+ cursor: hand;
+ }
+
+ #questionnaire label, #alerts label {
+ float: none;
+ }
+
+ .confirmed {
+ background-color: #ccffcc;
+ border: solid 2px #009900;
+ padding: 5px;
+ text-align: center;
+ }
+
+ // Map
+
+ #watermark {
+ background: url("/i/mojwatermark6.png");
+ height: 113px;
+ width: 231px;
+ position: absolute;
+ bottom: 0;
+ right: 0;
+ }
+
+ #map_box {
+ float: right;
+ width: $map_width + 2px;
+ position: relative;
+ padding-left: 20px;
+ background-color: #ffffff;
+ }
+
+ p#copyright {
+ float: right;
+ margin: 0 0 1em 0;
+ font-size: 78%;
+ }
+
+ #map {
+ border: solid 1px #000000;
+ width: $map_width; // Twice a tile width
+ height: $map_width;
+ overflow: hidden;
+ position: relative;
+ background-color: #f1f1f1;
+ }
+
+ #drag {
+ position: absolute;
+ width: $map_width;
+ height: $map_width;
+ right: 0;
+ top: 0;
+
+ input, img {
+ position: absolute;
+ border: none;
+ }
+ input {
+ cursor: crosshair;
+ background-color: #cccccc;
+ }
+ img {
+ cursor: move;
+ }
+ img.pin {
+ z-index: 100;
+ background-color: inherit;
+ }
+ a img.pin {
+ cursor: pointer;
+ cursor: hand;
+ }
+ }
+
+ form#mapForm #map {
+ cursor: pointer;
+ }
+
+ form#mapForm .olTileImage {
+ cursor: crosshair;
+ }
+
+ #compass {
+ background-color: #ffffff;
+ border: solid 1px #000000;
+ border-width: 0 1px 1px 0;
+ color: #000000;
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ img {
+ border: 0;
+ }
+ }
+
+ #text_map {
+ margin-top: 0.5em;
+ margin-bottom: 1em;
+ font-size: 110%;
+ }
+ #text_no_map {
+ margin-top: 0;
+ // background-color: #ffeecc;
+ // padding: 4px;
+ }
+
+ #sub_map_links {
+ float: right;
+ clear: right;
+ margin-top: 0;
+ }
+
+ // Problem pages
+
+ #fixed {
+ @include problem-banner;
+ background-color: #ccffcc;
+ border: solid 2px #009900;
+ }
+
+ #unknown {
+ @include problem-banner;
+ background-color: #ffcccc;
+ border: solid 2px #990000;
+ }
+
+ #updates {
+ div {
+ padding: 0 0 0.5em;
+ margin: 0 0 0.25em;
+ border-bottom: dotted 1px #5e552b;
+
+ .problem-update, .update-text {
+ padding: 0;
+ margin: 0;
+ border-bottom: 0;
+ }
+ }
+
+ p {
+ margin: 0;
+ }
+ }
+
+ #nearby_lists h2 {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ }
+ #alert_links {
+ float: right;
+ }
+ #alert_links_area {
+ background-color: #ffeecc;
+ border: solid 1px #ff9900;
+ border-width: 1px 0;
+ padding: 3px 10px;
+ // padding: 0 3px;
+ margin: 0;
+ }
+ #rss_alert {
+ text-decoration: none;
+ span {
+ text-decoration: underline;
+ }
+ }
+ #email_alert {
+ }
+ #email_alert_box {
+ display:none;
+ position: absolute;
+ padding: 3px;
+ font-size:83%;
+ border:solid 1px #7399C3;
+ background-color: #eeeeff;
+ color: #000000;
+ }
+ #email_alert_box p {
+ margin: 0;
+ }
+
+ .council_sent_info {
+ font-size: smaller;
+ }
+
+ // RSS feed XSL
+
+ #rss_items {
+ width:62%;
+ float:left;
+ }
+ #rss_rhs {
+ border-left:1px dashed #999;
+ width:36%;
+ float:right;
+ padding: 0 0 0 0.5em;
+ margin: 0 0 1em 0.5em;
+ }
+ #rss_box {
+ padding:10px;
+ border:1px solid #999999;
+ }
+
+ // Alerts
+ #rss_feed {
+ list-style-type: none;
+ margin-bottom: 2em;
+ }
+ #rss_feed li {
+ margin-bottom: 1em;
+ }
+ #alert_or {
+ font-style: italic;
+ font-size: 125%;
+ margin: 0;
+ }
+ #rss_list {
+ float: left;
+ width: 47%;
+ }
+ #rss_list ul {
+ list-style-type: none;
+ }
+ #rss_buttons {
+ float: right;
+ width: 35%;
+ text-align: center;
+ margin-bottom: 2em;
+ }
+ #rss_local {
+ margin-left: 1.5em;
+ margin-bottom: 0;
+ }
+ #rss_local_alt {
+ margin: 0 0 2em 4em;
+ }
+
+ #alert_photos {
+ text-align: center;
+ float: right;
+ width: 150px;
+ margin-left: 0.5em;
+ }
+ #alert_photos h2 {
+ font-size: 100%;
+ }
+ #alert_photos img {
+ margin-bottom: 0.25em;
+ }
+
+ // Report page
+
+ #col_problems, #col_fixed {
+ float: left;
+ width: 48%;
+ margin-right: 1em;
+ }
+
+ // Contact page
+ .contact-details {
+ font-size: 80%;
+ margin-top: 2em;
+ }
+
+ // File upload
+ // .progressContainer {
+ // margin: 5px;
+ // padding: 4px;
+ // width: 357px;
+ // border: solid 1px #E8E8E8;
+ // background-color: #F7F7F7;
+ // overflow: hidden;
+ // }
+ // .red { border: solid 1px #B50000; background-color: #FFEBEB; }
+ // .green { border: solid 1px #DDF0DD; background-color: #EBFFEB; }
+ // .blue { border: solid 1px #CEE2F2; background-color: #F0F5FF; }
+
+ // .progressName {
+ // font-size: 8pt;
+ // font-weight: bold;
+ // color: #555555;
+ // width: 323px;
+ // height: 14px;
+ // text-align: left;
+ // white-space: nowrap;
+ // overflow: hidden;
+ // }
+ // .progressBarInProgress, .progressBarComplete, .progressBarError {
+ // font-size: 0px;
+ // width: 0%;
+ // height: 2px;
+ // background-color: blue;
+ // margin-top: 2px;
+ // }
+ // .progressBarComplete {
+ // width: 100%;
+ // background-color: green;
+ // visibility: hidden;
+ // }
+ // .progressBarError {
+ // width: 100%;
+ // background-color: red;
+ // visibility: hidden;
+ // }
+ // .progressBarStatus {
+ // margin-top: 2px;
+ // width: 337px;
+ // font-size: 7pt;
+ // font-family: Verdana;
+ // text-align: left;
+ // white-space: nowrap;
+ // }
+
+}
+
+// Printing, SCSS doesn't handle @media nesting
+
+@media print {
+ #mysociety {
+ #map_box { float: none; margin: 0 auto; }
+ #mysociety { max-width: none; }
+ #side { margin-right: 0; }
+ }
+}
+
diff --git a/web/css/ie6-378.css b/web/css/ie6-378.css
index e22f519ff..83efdb634 100644
--- a/web/css/ie6-378.css
+++ b/web/css/ie6-378.css
@@ -1,4 +1,4 @@
-#watermark {
+#mysociety #watermark {
background: none;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/i/mojwatermark-378.png',sizingMethod='scale');
}
diff --git a/web/css/ie6.css b/web/css/ie6.css
index 051a117db..3bb91aa31 100644
--- a/web/css/ie6.css
+++ b/web/css/ie6.css
@@ -1,4 +1,4 @@
-#watermark {
+#mysociety #watermark {
background: none;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/i/mojwatermark6.png',sizingMethod='scale');
}
@@ -16,3 +16,7 @@
right: 10px;
cursor: pointer;
}
+
+#emptyhomes-footer {
+ zoom: 1;
+}
diff --git a/web/css/main.css b/web/css/main.css
index f1d416773..ddea37970 100644
--- a/web/css/main.css
+++ b/web/css/main.css
@@ -1,146 +1,134 @@
-/* Generics */
+a:link {
+ color: #0000ff;
+}
+a:visited {
+ color: #000099;
+}
+a:hover, a:active {
+ color: #ff0000;
+}
body {
- font-family: "Gill Sans", "Gill Sans MT", Helvetica, Arial, sans-serif;
- margin: 0;
- padding: 0;
- /* color: #a9aeb0; */
+ font-family: "Gill Sans", "Gill Sans MT", Helvetica, Arial, sans-serif;
+ margin: 0;
+ padding: 0;
}
h1 {
- margin: 0;
- font-size: 175%;
+ margin: 0;
+ font-size: 175%;
}
+
h2 {
- font-size: 140%;
+ font-size: 140%;
}
select, input, textarea {
- font-size: 99%;
+ font-size: 99%;
}
-a:link {
- color: #0000ff;
+#mysociety a.unsuitable-report {
+ font-size: small;
}
-a:visited {
- color: #000099;
-}
-a:hover, a:active {
- color: #ff0000;
+#mysociety blockquote {
+ border-left: solid 4px #5e552b;
}
-
-a.unsuitable-report {
- font-size: small;
+#mysociety .a {
+ color: #000000;
+ background-color: #f3e5a5;
}
-
-blockquote {
- border-left: solid 4px #5e552b;
+#mysociety #postcodeForm {
+ background-color: #e3d595;
}
-
-.a {
- color: #000000;
- background-color: #f3e5a5;
+#mysociety #front_stats div {
+ background-color: #e3d595;
}
-/* Site layout */
-
#header {
- font-size: 200%;
- font-weight: bold;
- border-bottom: solid 2px #5e552b;
- margin: 0;
- padding: 0.15em 0.5em;
- background-color: #e3d595;
- color: #5e552b;
+ font-size: 200%;
+ font-weight: bold;
+ border-bottom: solid 2px #5e552b;
+ margin: 0;
+ padding: 0.15em 0.5em;
+ background-color: #e3d595;
+ color: #5e552b;
}
-
-#my {
- color: #4e451b;
- background-color: #e3d595;
-}
-#beta {
- color: #6e653b;
- background-color: #e3d595;
- font-size: 50%;
- font-style: italic;
-}
-
#header a:link, #header a:visited {
- color: #5e552b;
- background-color: #e3d595;
- text-decoration: none;
+ color: #5e552b;
+ background-color: #e3d595;
+ text-decoration: none;
}
#header a:active, #header a:hover {
- text-decoration: underline;
+ text-decoration: underline;
}
-#content {
- width: 100%; /* Must specify a width or IE goes crazy wrong! */
- position: relative;
- margin: 0 auto;
- max-width: 60em;
+#my {
+ color: #4e451b;
+ background-color: #e3d595;
+}
+
+#mysociety {
+ width: 100%;
+ /* Must specify a width or IE goes crazy wrong! */
+ position: relative;
+ margin: 0 auto;
+ max-width: 60em;
}
-/* Can't put the margin in #content because of above IE craziness */
+/* Can't put the margin in #mysociety because of above IE craziness */
#wrapper {
- margin: 2em;
+ margin: 2em;
+}
+
+.v {
+ display: none;
}
#navigation {
- position: absolute;
- top: 1em;
- right: 1em;
- padding: 0;
- margin: 0;
- list-style-type: none;
+ position: absolute;
+ top: 1em;
+ right: 1em;
+ padding: 0;
+ margin: 0;
+ list-style-type: none;
}
#navigation li {
- display: inline;
- padding: 0;
- margin: 0;
+ display: inline;
+ padding: 0;
+ margin: 0;
}
-
#navigation a {
- display: -moz-inline-box;
- display: inline-block;
- padding: 0.4em 1em;
+ display: -moz-inline-box;
+ display: inline-block;
+ padding: 0.4em 1em;
}
#navigation a:link, #navigation a:visited {
- color: #5e552b;
+ color: #5e552b;
}
#navigation a:hover, #navigation a:active {
- background-color: #5e552b;
- color: #e3d595;
+ background-color: #5e552b;
+ color: #e3d595;
}
#nav_new a {
- background-image: url("/i/new.png");
- background-repeat: no-repeat;
- background-position: 100% 0;
+ background-image: url("/i/new.png");
+ background-repeat: no-repeat;
+ background-position: 100% 0;
}
#logo {
- border: none;
- position: absolute;
- top: 3.3em;
- right: 10px;
+ border: none;
+ position: absolute;
+ top: 3.3em;
+ right: 10px;
}
#footer {
- clear: both;
- text-align: right;
- font-size: 83%;
- border-top: solid 1px #5e552b;
- display: table;
- margin: 2em 0 1em auto;
- padding: 2px 4px;
-}
-
-#postcodeForm {
- background-color: #e3d595;
+ clear: both;
+ text-align: right;
+ font-size: 83%;
+ border-top: solid 1px #5e552b;
+ display: table;
+ margin: 2em 0 1em auto;
+ padding: 2px 4px;
}
-
-#front_stats div {
- background-color: #e3d595;
-}
-
diff --git a/web/css/main.scss b/web/css/main.scss
new file mode 100644
index 000000000..bcebc2bd0
--- /dev/null
+++ b/web/css/main.scss
@@ -0,0 +1,14 @@
+// Generics
+
+$header_back: #e3d595;
+$header_back_lighter: #f3e5a5;
+$header_colour: #5e552b;
+$header_darker: #4e451b;
+
+a {
+ &:link { color: #0000ff; }
+ &:visited { color: #000099; }
+ &:hover, &:active { color: #ff0000; }
+}
+
+@import "_main";
diff --git a/web/down.default.html b/web/down.default.html
index 4e432473d..35d2cf237 100644
--- a/web/down.default.html
+++ b/web/down.default.html
@@ -12,7 +12,7 @@
<body>
<h1 id="header">Fix<span id="my">My</span>Street</h1>
-<div id="wrapper"><div id="content">
+<div id="wrapper"><div id="mysociety">
<p id="expl"><strong>FixMyStreet is currently down for maintenance.</strong>
<br><small>Please come back later.</small></p>
diff --git a/web/i/SEHPlogo-bwS.png b/web/i/SEHPlogo-bwS.png
new file mode 100644
index 000000000..496d43115
--- /dev/null
+++ b/web/i/SEHPlogo-bwS.png
Binary files differ
diff --git a/web/i/Sheltercymru47s.png b/web/i/Sheltercymru47s.png
new file mode 100644
index 000000000..5547be1e0
--- /dev/null
+++ b/web/i/Sheltercymru47s.png
Binary files differ
diff --git a/web/import.cgi b/web/import.cgi
new file mode 100755
index 000000000..371e70f7a
--- /dev/null
+++ b/web/import.cgi
@@ -0,0 +1,172 @@
+#!/usr/bin/perl -w -I../perllib
+
+# import.cgi
+# Script to which things like iPhones can POST new data
+#
+# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
+# Email: matthew@mysociety.org. WWW: http://www.mysociety.org
+#
+# $Id: import.cgi,v 1.11 2009-12-10 16:22:49 matthew Exp $
+
+use strict;
+use Error qw(:try);
+use Standard;
+use Utils;
+use mySociety::AuthToken;
+use mySociety::Config;
+use mySociety::EmailUtil;
+
+sub main {
+ my $q = shift;
+
+ my @vars = qw(service subject detail name email phone easting northing lat lon id phone_id);
+ my %input = map { $_ => $q->param($_) || '' } @vars;
+ my @errors;
+
+ unless ($ENV{REQUEST_METHOD} eq 'POST') {
+ print Page::header($q, title=>'External import');
+ docs();
+ print Page::footer($q);
+ return;
+ }
+
+ # If we were given easting, northing convert to lat lon now
+ my $latitude = $input{lat} ||= 0;
+ my $longitude = $input{lon} ||= 0;
+ if (
+ !( $latitude || $longitude ) # have not been given lat or lon
+ && ( $input{easting} && $input{northing} ) # but do have e and n
+ )
+ {
+ ( $latitude, $longitude ) =
+ Utils::convert_en_to_latlon( $input{easting}, $input{northing});
+ }
+
+ my $fh = $q->upload('photo'); # MUST come before $q->header, don't know why!
+ print $q->header(-charset => 'utf-8', -content_type => 'text/plain');
+
+ if ($fh) {
+ my $err = Page::check_photo($q, $fh);
+ push @errors, $err if $err;
+ }
+
+ push @errors, 'You must supply a service' unless $input{service};
+ push @errors, 'Please enter a subject' unless $input{subject} && $input{subject} =~ /\S/;
+ push @errors, 'Please enter your name' unless $input{name} && $input{name} =~ /\S/;
+
+ if (!$input{email} || $input{email} !~ /\S/) {
+ push @errors, 'Please enter your email';
+ } elsif (!mySociety::EmailUtil::is_valid_email($input{email})) {
+ push @errors, 'Please enter a valid email';
+ }
+
+ if ( $latitude && mySociety::Config::get('COUNTRY') eq 'GB' ) {
+ try {
+ Utils::convert_latlon_to_en( $latitude, $longitude );
+ } catch Error::Simple with {
+ my $e = shift;
+ push @errors, "We had a problem with the supplied co-ordinates - outside the UK?";
+ };
+ }
+
+ # TODO: Get location from photo if present in EXIF data?
+
+ my $photo;
+ if ($fh) {
+ try {
+ $photo = Page::process_photo($fh, 1);
+ } catch Error::Simple with {
+ my $e = shift;
+ push @errors, "That photo doesn't appear to have uploaded correctly ($e), please try again.";
+ };
+ }
+
+ unless ( $photo || ( $latitude || $longitude ) ) {
+ push @errors, 'Either a location or a photo must be provided.';
+ }
+
+ if (@errors) {
+ print map { "ERROR:$_\n" } @errors;
+ return;
+ }
+
+ # Store for possible future use
+ if ($input{id} || $input{phone_id}) {
+ my $id = $input{id} || $input{phone_id};
+ my $already = dbh()->selectrow_array('select id from partial_user where service=? and nsid=?', {}, $input{service}, $id);
+ unless ($already) {
+ dbh()->do('insert into partial_user (service, nsid, name, email, phone) values (?, ?, ?, ?, ?)',
+ {}, $input{service}, $id, $input{name}, $input{email}, $input{phone});
+ }
+ }
+
+ # Store what we have so far in the database
+ my $id = dbh()->selectrow_array("select nextval('problem_id_seq')");
+ Utils::workaround_pg_bytea("insert into problem
+ (id, postcode, latitude, longitude, title, detail, name, service,
+ email, phone, photo, state, used_map, anonymous, category, areas)
+ values
+ (?, '', ?, ?, ?, ?, ?, ?, ?, ?, ?, 'partial', 't', 'f', '', '')", 10,
+ $id, $latitude, $longitude, $input{subject},
+ $input{detail}, $input{name}, $input{service}, $input{email}, $input{phone}, $photo);
+
+ my $token = mySociety::AuthToken::store('partial', $id);
+ my %h = (
+ name => $input{name} ? ' ' . $input{name} : '',
+ url => Page::base_url_with_lang($q, undef, 1) . '/L/' . $token,
+ service => $input{service},
+ title => $input{title},
+ detail => $input{detail},
+ );
+
+ Page::send_email($q, $input{email}, $input{name}, 'partial', %h);
+
+ dbh()->commit();
+ print 'SUCCESS';
+}
+
+Page::do_fastcgi(\&main);
+
+sub docs {
+ print <<EOF;
+<p>You may inject problem reports into FixMyStreet programatically using this
+simple interface. Upon receipt, an email will be sent to the address given,
+with a link the user must click in order to check the details of their report,
+add any other information they wish, and then submit to the council.
+
+<p>This interface returns a plain text response; either <samp>SUCCESS</samp> if
+the report has been successfully received, or if not, a list of errors, one per
+line each starting with <samp>ERROR:</samp>.
+
+<p>You may submit the following information by POST to this URL
+(i.e. <samp>http://www.fixmystreet.com/import</samp> ):</p>
+<dl>
+<dt>service
+<dd>
+<em>Required</em>.
+Name of application/service using this interface.
+<dt>id
+<dd>Unique ID of a user/device, for possible future use.
+<br><small>(e.g. used by Flickr import to know which accounts to look at)</small>
+<dt>subject
+<dd>
+<em>Required</em>. Subject of problem report.
+<dt>detail
+<dd>Main body and details of problem report.
+<dt>name
+<dd>
+<em>Required</em>. Name of problem reporter.
+<dt>email
+<dd>
+<em>Required</em>. Email address of problem reporter.
+<dt>phone
+<dd>Telephone number of problem reporter.
+<dt>easting / northing
+<dt>lat / lon
+<dd>Location of problem report. You can either supply eastings/northings, or WGS84 latitude/longitude.
+<dt>photo
+<dd>Photo of problem (JPEG only).
+</dl>
+EOF
+}
+
diff --git a/web/index.cgi b/web/index.cgi
index 6c7a2f86d..14d4177ac 100755
--- a/web/index.cgi
+++ b/web/index.cgi
@@ -12,7 +12,6 @@ use Utils;
use Encode;
use Error qw(:try);
use File::Slurp;
-use RABX;
use CGI::Carp;
use POSIX qw(strcoll);
use URI::Escape;
@@ -198,7 +197,7 @@ EOF
$out .= $q->h2(_('Recently reported problems')) . ' <ul>' if @$probs;
foreach (@$probs) {
$out .= '<li><a href="/report/' . $_->{id} . '">'. ent($_->{title});
- $out .= '</a>';
+ $out .= '</a></li>';
}
$out .= '</ul>' if @$probs;
$out .= '</div>';
@@ -260,7 +259,7 @@ sub submit_update {
$h{url} = $base . '/C/' . mySociety::AuthToken::store('update', { id => $id, add_alert => $input{add_alert} } );
dbh()->commit();
- my $out = Page::send_email($q, $input{rznvy}, $input{name}, 'update', %h);
+ my $out = Page::send_confirmation_email($q, $input{rznvy}, $input{name}, 'update', %h);
return $out;
}
@@ -433,7 +432,7 @@ Please <a href="/contact">let us know what went on</a> and we\'ll look into it.'
$h{url} = $base . '/P/' . mySociety::AuthToken::store('problem', $id);
dbh()->commit();
- $out = Page::send_email($q, $input{email}, $input{name}, 'problem', %h);
+ $out = Page::send_confirmation_email($q, $input{email}, $input{name}, 'problem', %h);
}
return $out;
@@ -500,8 +499,10 @@ sub display_form {
$longitude = $lon;
}
} elsif ($pin_x && $pin_y) {
- # tilma map was clicked on
- ($latitude, $longitude) = FixMyStreet::Map::click_to_wgs84($pin_tile_x, $pin_x, $pin_tile_y, $pin_y);
+
+ # Map was clicked on (tilma, or non-JS OpenLayers, for example)
+ ($latitude, $longitude) = FixMyStreet::Map::click_to_wgs84($q, $pin_tile_x, $pin_x, $pin_tile_y, $pin_y);
+
} elsif ( $input{partial} && $input{pc} && !length $input{latitude} && !length $input{longitude} ) {
my $error;
try {
@@ -517,6 +518,9 @@ sub display_form {
$longitude = $input_h{longitude};
}
+ # Shrink, as don't need accuracy plus we want them as English strings
+ ($latitude, $longitude) = map { Utils::truncate_coordinate($_) } ( $latitude, $longitude );
+
# Look up councils and do checks for the point we've got
my @area_types = Cobrand::area_types($cobrand);
# XXX: I think we want in_gb_locale around the next line, needs testing
@@ -606,6 +610,8 @@ please specify the closest point on land.')) unless %$all_councils;
my $form_action = Cobrand::url($cobrand, '/', $q);
$vars{form_start} = <<EOF;
<form action="$form_action" method="post" name="mapSkippedForm"$enctype>
+<input type="hidden" name="latitude" value="$latitude">
+<input type="hidden" name="longitude" value="$longitude">
<input type="hidden" name="pc" value="$input_h{pc}">
<input type="hidden" name="skipped" value="1">
$cobrand_form_elements
@@ -627,9 +633,9 @@ EOF
if (my $token = $input{partial}) {
$partial_id = mySociety::AuthToken::retrieve('partial', $token);
if ($partial_id) {
- $vars{form_start} .= $q->p({id=>'unknown'}, 'Please note your report has
- <strong>not yet been sent</strong>. Choose a category
- and add further information below, then submit.');
+ $vars{form_start} .=
+ $q->p({ id => 'unknown' },
+ _('Please note your report has <strong>not yet been sent</strong>. Choose a category and add further information below, then submit.'));
}
}
$vars{text_located} = $q->p(_('You have located the problem at the point marked with a purple pin on the map.
@@ -718,10 +724,6 @@ photo of the problem if you have one), etc.'));
$vars{text_help} .= $q->p(_('Please fill in details of the problem below.'));
}
- $vars{text_help} .= '
-<input type="hidden" name="latitude" value="' . $latitude . '">
-<input type="hidden" name="longitude" value="' . $longitude . '">';
-
if (@errors) {
$vars{errors} = '<ul class="error"><li>' . join('</li><li>', @errors) . '</li></ul>';
}
@@ -843,7 +845,7 @@ sub display_location {
return front_page( $q, @errors )
unless ( $x && $y )
|| $input{pc}
- || ( defined $latitude && defined $longitude );
+ || ( $latitude ne '' && $longitude ne '' );
if ( $x && $y ) {
@@ -894,7 +896,7 @@ sub display_location {
}
my $on_list = '';
foreach (@$on_map) {
- my $report_url = NewURL($q, -retain => 1, -url => '/report/' . $_->{id}, pc => undef, x => undef, 'y' => undef);
+ my $report_url = NewURL($q, -url => '/report/' . $_->{id});
$report_url = Cobrand::url($cobrand, $report_url, $q);
$on_list .= '<li><a href="' . $report_url . '">';
$on_list .= ent($_->{title}) . '</a> <small>(';
@@ -907,7 +909,7 @@ sub display_location {
my $around_list = '';
foreach (@$around_map) {
- my $report_url = Cobrand::url($cobrand, NewURL($q, -retain => 1, -url => '/report/' . $_->{id}, pc => undef, x => undef, 'y' => undef), $q);
+ my $report_url = Cobrand::url($cobrand, NewURL($q, -url => '/report/' . $_->{id}), $q);
$around_list .= '<li><a href="' . $report_url . '">';
my $dist = int($_->{distance}*10+0.5);
$dist = $dist / 10;
@@ -929,9 +931,14 @@ sub display_location {
$hide_link = NewURL($q, -retain=>1, no_pins=>1);
$hide_text = _('Hide pins');
}
- my $map_links = "<p id='sub_map_links'><a id='hide_pins_link' rel='nofollow' href='$hide_link'>$hide_text</a> | <a id='all_pins_link' rel='nofollow' href='$all_link'>$all_text</a></p> <input type='hidden' id='all_pins' name='all_pins' value='$input_h{all_pins}'>";
+ my $map_links = "<p id='sub_map_links'><a id='hide_pins_link' rel='nofollow' href='$hide_link'>$hide_text</a>";
+ if (mySociety::Config::get('COUNTRY') eq 'GB') {
+ $map_links .= " | <a id='all_pins_link' rel='nofollow' href='$all_link'>$all_text</a></p> <input type='hidden' id='all_pins' name='all_pins' value='$input_h{all_pins}'>";
+ } else {
+ $map_links .= "</p>";
+ }
- # truncate the lat,lon for nicer rss urls
+ # truncate the lat,lon for nicer rss urls, and strings for outputting
my ( $short_lat, $short_lon ) =
map { Utils::truncate_coordinate($_) } #
( $latitude, $longitude );
@@ -956,14 +963,11 @@ sub display_location {
} else {
$rss_url = "/rss/l/$short_lat,$short_lon";
}
- $rss_url = Cobrand::url( $cobrand,
- NewURL($q, -retain => 1, -url=> $rss_url,
- pc => undef, x => undef, y => undef, lat=> undef, lon => undef ),
- $q);
+ $rss_url = Cobrand::url( $cobrand, NewURL($q, -url=> $rss_url), $q);
my %vars = (
'map' => FixMyStreet::Map::display_map($q,
- latitude => $latitude, longitude => $longitude,
+ latitude => $short_lat, longitude => $short_lon,
type => 1,
pins => \@pins,
post => $map_links
@@ -971,7 +975,7 @@ sub display_location {
map_end => FixMyStreet::Map::display_map_end(1),
url_home => Cobrand::url($cobrand, '/', $q),
url_rss => $rss_url,
- url_email => Cobrand::url($cobrand, NewURL($q, -retain => 1, pc => undef, lat => $short_lat, lon => $short_lon, -url=>'/alert', feed=>"local:$short_lat:$short_lon"), $q),
+ url_email => Cobrand::url($cobrand, NewURL($q, lat => $short_lat, lon => $short_lon, -url=>'/alert', feed=>"local:$short_lat:$short_lon"), $q),
url_skip => $url_skip,
email_me => _('Email me new local problems'),
rss_alt => _('RSS feed'),
@@ -1066,7 +1070,7 @@ sub display_problem {
map_start => FixMyStreet::Map::display_map($q,
latitude => $problem->{latitude}, longitude => $problem->{longitude},
type => 0,
- pins => [ [ $problem->{latitude}, $problem->{longitude}, 'blue' ] ],
+ pins => $problem->{used_map} ? [ [ $problem->{latitude}, $problem->{longitude}, 'blue' ] ] : [],
post => $map_links
),
map_end => FixMyStreet::Map::display_map_end(0),
diff --git a/web/js.js b/web/js.js
index b2012fc84..07bede2d7 100644
--- a/web/js.js
+++ b/web/js.js
@@ -16,8 +16,12 @@ YAHOO.util.Event.onContentReady('mapForm', function() {
this.onsubmit = function() { return false; };
}
- this.x.value = fixmystreet.x + 3;
- this.y.value = fixmystreet.y + 3;
+ /* XXX Should be in Tilma code only */
+ if (this.x) {
+ this.x.value = fixmystreet.x + 3;
+ this.y.value = fixmystreet.y + 3;
+ }
+
/*
if (swfu && swfu.getStats().files_queued > 0) {
swfu.startUpload();
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
new file mode 100644
index 000000000..1134bafb7
--- /dev/null
+++ b/web/js/map-OpenLayers.js
@@ -0,0 +1,182 @@
+YAHOO.util.Event.onContentReady('map', function() {
+
+ fixmystreet.ZOOM_OFFSET = 14;
+
+ var perm = new OpenLayers.Control.Permalink();
+ set_map_config(perm);
+
+ fixmystreet.map = new OpenLayers.Map("map", {
+ controls: fixmystreet.controls,
+ displayProjection: new OpenLayers.Projection("EPSG:4326")
+ });
+
+ fixmystreet.layer_options = OpenLayers.Util.extend({
+ zoomOffset: fixmystreet.ZOOM_OFFSET,
+ transitionEffect: 'resize',
+ numZoomLevels: 4
+ }, fixmystreet.layer_options);
+ var layer = new fixmystreet.map_type("", fixmystreet.layer_options);
+ fixmystreet.map.addLayer(layer);
+
+ if (!fixmystreet.map.getCenter()) {
+ var centre = new OpenLayers.LonLat( fixmystreet.longitude, fixmystreet.latitude );
+ centre.transform(
+ new OpenLayers.Projection("EPSG:4326"),
+ fixmystreet.map.getProjectionObject()
+ );
+ fixmystreet.map.setCenter(centre, 2);
+ }
+
+ if (document.getElementById('mapForm')) {
+ var click = new OpenLayers.Control.Click();
+ fixmystreet.map.addControl(click);
+ click.activate();
+ }
+
+ /* To let permalink not be caught by the Click layer, answer found
+ * at http://www.mail-archive.com/users@openlayers.org/msg12958.html
+ * Not sure why you can't use eventListeners or events.register...
+ */
+ OpenLayers.Event.observe( perm.element, "click", function(e) {
+ OpenLayers.Event.stop(e);
+ location.href = OpenLayers.Event.element(e).href;
+ return false;
+ });
+
+ fixmystreet.markers = new OpenLayers.Layer.Markers("Markers");
+ var cols = { 'red':'R', 'green':'G', 'blue':'B', 'purple':'P' };
+ for (var i=0; i<fixmystreet.pins.length; i++) {
+ var pin = fixmystreet.pins[i];
+ var src = '/i/pin' + cols[pin[2]] + '.gif';
+ var size = new OpenLayers.Size(32, 59);
+ var offset = new OpenLayers.Pixel(-3, -size.h-2);
+ var icon = new OpenLayers.Icon(src, size, offset);
+ var loc = new OpenLayers.LonLat(pin[1], pin[0]);
+ loc.transform(
+ new OpenLayers.Projection("EPSG:4326"),
+ fixmystreet.map.getProjectionObject()
+ );
+ var marker = new OpenLayers.Marker(loc, icon);
+ if (pin[3]) {
+ marker.id = pin[3];
+ marker.events.register('click', marker, function(evt) {
+ window.location = '/report/' + this.id;
+ OpenLayers.Event.stop(evt);
+ });
+ }
+ fixmystreet.markers.addMarker(marker);
+ }
+ fixmystreet.map.addLayer(fixmystreet.markers);
+
+});
+
+YAHOO.util.Event.addListener('hide_pins_link', 'click', function(e) {
+ YAHOO.util.Event.preventDefault(e);
+ var showhide = [
+ 'Show pins', 'Hide pins',
+ 'Dangos pinnau', 'Cuddio pinnau',
+ "Vis nåler", "Gjem nåler"
+ ];
+ for (var i=0; i<showhide.length; i+=2) {
+ if (this.innerHTML == showhide[i]) {
+ fixmystreet.markers.setVisibility(true);
+ this.innerHTML = showhide[i+1];
+ } else if (this.innerHTML == showhide[i+1]) {
+ fixmystreet.markers.setVisibility(false);
+ this.innerHTML = showhide[i];
+ }
+ }
+});
+
+/* Overridding the buttonDown function of PanZoom so that it does
+ zoomTo(0) rather than zoomToMaxExtent()
+*/
+OpenLayers.Control.PanZoomFMS = OpenLayers.Class(OpenLayers.Control.PanZoom, {
+ buttonDown: function (evt) {
+ if (!OpenLayers.Event.isLeftClick(evt)) {
+ return;
+ }
+
+ switch (this.action) {
+ case "panup":
+ this.map.pan(0, -this.getSlideFactor("h"));
+ break;
+ case "pandown":
+ this.map.pan(0, this.getSlideFactor("h"));
+ break;
+ case "panleft":
+ this.map.pan(-this.getSlideFactor("w"), 0);
+ break;
+ case "panright":
+ this.map.pan(this.getSlideFactor("w"), 0);
+ break;
+ case "zoomin":
+ this.map.zoomIn();
+ break;
+ case "zoomout":
+ this.map.zoomOut();
+ break;
+ case "zoomworld":
+ this.map.zoomTo(0);
+ break;
+ }
+
+ OpenLayers.Event.stop(evt);
+ }
+});
+
+/* Overriding Permalink so that it can pass the correct zoom to OSM */
+OpenLayers.Control.PermalinkFMS = OpenLayers.Class(OpenLayers.Control.Permalink, {
+ updateLink: function() {
+ var separator = this.anchor ? '#' : '?';
+ var href = this.base;
+ if (href.indexOf(separator) != -1) {
+ href = href.substring( 0, href.indexOf(separator) );
+ }
+
+ href += separator + OpenLayers.Util.getParameterString(this.createParams(null, this.map.getZoom()+fixmystreet.ZOOM_OFFSET));
+ if (this.anchor && !this.element) {
+ window.location.href = href;
+ }
+ else {
+ this.element.href = href;
+ }
+ }
+});
+
+/* Click handler */
+OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
+ defaultHandlerOptions: {
+ 'single': true,
+ 'double': false,
+ 'pixelTolerance': 0,
+ 'stopSingle': false,
+ 'stopDouble': false
+ },
+
+ initialize: function(options) {
+ this.handlerOptions = OpenLayers.Util.extend(
+ {}, this.defaultHandlerOptions
+ );
+ OpenLayers.Control.prototype.initialize.apply(
+ this, arguments
+ );
+ this.handler = new OpenLayers.Handler.Click(
+ this, {
+ 'click': this.trigger
+ }, this.handlerOptions
+ );
+ },
+
+ trigger: function(e) {
+ var lonlat = fixmystreet.map.getLonLatFromViewPortPx(e.xy);
+ lonlat.transform(
+ fixmystreet.map.getProjectionObject(),
+ new OpenLayers.Projection("EPSG:4326")
+ );
+ document.getElementById('fixmystreet.latitude').value = lonlat.lat;
+ document.getElementById('fixmystreet.longitude').value = lonlat.lon;
+ document.getElementById('mapForm').submit();
+ }
+});
+
diff --git a/web/js/map-OpenStreetMap.js b/web/js/map-OpenStreetMap.js
index 6e350537a..9d226f6a7 100644
--- a/web/js/map-OpenStreetMap.js
+++ b/web/js/map-OpenStreetMap.js
@@ -1,126 +1,13 @@
-YAHOO.util.Event.onContentReady('map', function() {
- fixmystreet.map = new OpenLayers.Map("map", {
- controls: [
- new OpenLayers.Control.ArgParser(),
- //new OpenLayers.Control.LayerSwitcher(),
- new OpenLayers.Control.Navigation(),
- new OpenLayers.Control.PanZoomFMS()
- ],
- displayProjection: new OpenLayers.Projection("EPSG:4326")
- });
- var osm = new fixmystreet.map_type("", {
- zoomOffset: 14,
- numZoomLevels: 4
- });
- fixmystreet.map.addLayer(osm);
-
- var centre = new OpenLayers.LonLat( fixmystreet.longitude, fixmystreet.latitude );
- centre.transform(
- new OpenLayers.Projection("EPSG:4326"),
- fixmystreet.map.getProjectionObject()
- );
- fixmystreet.map.setCenter(centre, 2);
-
- if (document.getElementById('mapForm')) {
- var click = new OpenLayers.Control.Click();
- fixmystreet.map.addControl(click);
- click.activate();
- }
-
- var markers = new OpenLayers.Layer.Markers("Markers");
- var cols = { 'red':'R', 'green':'G', 'blue':'B', 'purple':'P' };
- for (var i=0; i<fixmystreet.pins.length; i++) {
- var pin = fixmystreet.pins[i];
- var src = '/i/pin' + cols[pin[2]] + '.gif';
- var size = new OpenLayers.Size(32, 59);
- var offset = new OpenLayers.Pixel(-3, -size.h-2);
- var icon = new OpenLayers.Icon(src, size, offset);
- var loc = new OpenLayers.LonLat(pin[1], pin[0]);
- loc.transform(
- new OpenLayers.Projection("EPSG:4326"),
- fixmystreet.map.getProjectionObject()
- );
- var marker = new OpenLayers.Marker(loc, icon);
- if (pin[3]) {
- marker.events.register('click', marker, function(evt) { window.location = '/report/' + pin[3]; OpenLayers.Event.stop(evt); });
- }
- markers.addMarker(marker);
- }
- fixmystreet.map.addLayer(markers);
-
-});
-
-/* Overridding the buttonDown function of PanZoom so that it does
- zoomTo(0) rather than zoomToMaxExtent()
-*/
-OpenLayers.Control.PanZoomFMS = OpenLayers.Class(OpenLayers.Control.PanZoom, {
- buttonDown: function (evt) {
- if (!OpenLayers.Event.isLeftClick(evt)) {
- return;
- }
-
- switch (this.action) {
- case "panup":
- this.map.pan(0, -this.getSlideFactor("h"));
- break;
- case "pandown":
- this.map.pan(0, this.getSlideFactor("h"));
- break;
- case "panleft":
- this.map.pan(-this.getSlideFactor("w"), 0);
- break;
- case "panright":
- this.map.pan(this.getSlideFactor("w"), 0);
- break;
- case "zoomin":
- this.map.zoomIn();
- break;
- case "zoomout":
- this.map.zoomOut();
- break;
- case "zoomworld":
- this.map.zoomTo(0);
- break;
- }
-
- OpenLayers.Event.stop(evt);
- }
-});
-
-OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
- defaultHandlerOptions: {
- 'single': true,
- 'double': false,
- 'pixelTolerance': 0,
- 'stopSingle': false,
- 'stopDouble': false
- },
-
- initialize: function(options) {
- this.handlerOptions = OpenLayers.Util.extend(
- {}, this.defaultHandlerOptions
- );
- OpenLayers.Control.prototype.initialize.apply(
- this, arguments
- );
- this.handler = new OpenLayers.Handler.Click(
- this, {
- 'click': this.trigger
- }, this.handlerOptions
- );
- },
-
- trigger: function(e) {
- var lonlat = fixmystreet.map.getLonLatFromViewPortPx(e.xy);
- lonlat.transform(
- fixmystreet.map.getProjectionObject(),
- new OpenLayers.Projection("EPSG:4326")
- );
- document.getElementById('fixmystreet.latitude').value = lonlat.lat;
- document.getElementById('fixmystreet.longitude').value = lonlat.lon;
- document.getElementById('mapForm').submit();
- }
-});
+function set_map_config(perm) {
+ fixmystreet.controls = [
+ new OpenLayers.Control.ArgParser(),
+ //new OpenLayers.Control.LayerSwitcher(),
+ new OpenLayers.Control.Navigation(),
+ perm,
+ new OpenLayers.Control.PermalinkFMS('osm_link', 'http://www.openstreetmap.org/'),
+ new OpenLayers.Control.PanZoomFMS()
+ ];
+}
// http://www.openstreetmap.org/openlayers/OpenStreetMap.js (added maxResolution)
diff --git a/web/js/map-bing-ol.js b/web/js/map-bing-ol.js
index ba9445326..254d407f4 100644
--- a/web/js/map-bing-ol.js
+++ b/web/js/map-bing-ol.js
@@ -1,33 +1,13 @@
-YAHOO.util.Event.onContentReady('map', function() {
- var map = new OpenLayers.Map("map", {
- controls: [
- new OpenLayers.Control.ArgParser(),
- //new OpenLayers.Control.LayerSwitcher(),
- new OpenLayers.Control.Navigation(),
- new OpenLayers.Control.PanZoom()
- ],
- displayProjection: new OpenLayers.Projection("EPSG:4326")
- });
- var bing = new OpenLayers.Layer.Bing("", {
- zoomOffset: 13,
- numZoomLevels: 4
- });
- map.addLayer(bing);
-
- var centre = new OpenLayers.LonLat( fixmystreet.easting, fixmystreet.northing );
- centre.transform(
- new OpenLayers.Projection("EPSG:27700"),
- map.getProjectionObject()
- );
- map.setCenter(centre, 3);
-});
-
-OpenLayers.Util.OS = {};
-OpenLayers.Util.OS.MISSING_TILE_URL = "http://openstreetmap.org/openlayers/img/404.png";
-OpenLayers.Util.OS.originalOnImageLoadError = OpenLayers.Util.onImageLoadError;
-OpenLayers.Util.onImageLoadError = function() {
- OpenLayers.Util.OS.originalOnImageLoadError;
-};
+function set_map_config(perm) {
+ fixmystreet.ZOOM_OFFSET = 13;
+ fixmystreet.controls = [
+ new OpenLayers.Control.ArgParser(),
+ new OpenLayers.Control.Navigation(),
+ perm,
+ new OpenLayers.Control.PanZoomFMS()
+ ];
+ fixmystreet.map_type = OpenLayers.Layer.Bing;
+}
OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
initialize: function(name, options) {
@@ -38,6 +18,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
numZoomLevels: 18,
transitionEffect: "resize",
sphericalMercator: true,
+ buffer: 0,
attribution: "© Microsoft / OS 2010"
}, options);
var newArguments = [name, url, options];
diff --git a/web/js/map-bing.js b/web/js/map-bing.js
index fbbbcc676..748a03525 100644
--- a/web/js/map-bing.js
+++ b/web/js/map-bing.js
@@ -1,6 +1,7 @@
YAHOO.util.Event.onContentReady('map', function() {
- var centre = new Microsoft.Maps.Location( fixmystreet.lat, fixmystreet.lon );
+ var centre = new Microsoft.Maps.Location( fixmystreet.latitude, fixmystreet.longitude );
var map = new Microsoft.Maps.Map(document.getElementById("map"), {
+ credentials: fixmystreet.key,
mapTypeId: Microsoft.Maps.MapTypeId.ordnanceSurvey,
center: centre,
zoom: 15,
diff --git a/web/js/map-google.js b/web/js/map-google.js
index 77e54ab7c..ab9bb9042 100644
--- a/web/js/map-google.js
+++ b/web/js/map-google.js
@@ -1,5 +1,5 @@
YAHOO.util.Event.onContentReady('map', function() {
- var centre = new google.maps.LatLng( fixmystreet.lat, fixmystreet.lon );
+ var centre = new google.maps.LatLng( fixmystreet.latitude, fixmystreet.longitude );
var map = new google.maps.Map(document.getElementById("map"), {
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: centre,
diff --git a/web/js/map-streetview.js b/web/js/map-streetview.js
index 088e5b6a2..cfd595b95 100644
--- a/web/js/map-streetview.js
+++ b/web/js/map-streetview.js
@@ -1,27 +1,13 @@
-YAHOO.util.Event.onContentReady('map', function() {
- var map = new OpenLayers.Map("map", {
- controls: [
- new OpenLayers.Control.ArgParser(),
- //new OpenLayers.Control.LayerSwitcher(),
- new OpenLayers.Control.Navigation(),
- new OpenLayers.Control.PanZoom()
- ],
- displayProjection: new OpenLayers.Projection("EPSG:4326")
- });
- var streetview = new OpenLayers.Layer.StreetView("OS StreetView (1:10000)", {
- zoomOffset: 14,
- numZoomLevels: 4
- });
- map.addLayer(streetview);
-
- var centre = new OpenLayers.LonLat( fixmystreet.easting, fixmystreet.northing );
- centre.transform(
- new OpenLayers.Projection("EPSG:27700"),
- map.getProjectionObject()
- );
- map.setCenter(centre, 2);
-});
-
+function set_map_config(perm) {
+ fixmystreet.controls = [
+ new OpenLayers.Control.ArgParser(),
+ //new OpenLayers.Control.LayerSwitcher(),
+ new OpenLayers.Control.Navigation(),
+ perm,
+ new OpenLayers.Control.PanZoomFMS()
+ ];
+ fixmystreet.map_type = OpenLayers.Layer.StreetView;
+}
// http://os.openstreetmap.org/openlayers/OS.js (added one line)
diff --git a/web/js/map-tilma-ol.js b/web/js/map-tilma-ol.js
index cfd196c1d..5230a5d2c 100644
--- a/web/js/map-tilma-ol.js
+++ b/web/js/map-tilma-ol.js
@@ -1,21 +1,19 @@
-YAHOO.util.Event.onContentReady('map', function() {
- var map = new OpenLayers.Map("map", {
- controls: [
- new OpenLayers.Control.ArgParser(),
- new OpenLayers.Control.Navigation(),
- new OpenLayers.Control.PanPanel()
- ]
- });
- var tilma = new OpenLayers.Layer.Tilma("Tilma", {
+function set_map_config(perm) {
+ fixmystreet.controls = [
+ new OpenLayers.Control.ArgParser(),
+ perm,
+ new OpenLayers.Control.Navigation(),
+ new OpenLayers.Control.PanPanel()
+ ];
+ fixmystreet.map_type = OpenLayers.Layer.Tilma;
+ fixmystreet.layer_options = {
maxResolution: fixmystreet.maxResolution,
tileSize: new OpenLayers.Size(fixmystreet.tilewidth, fixmystreet.tileheight),
- map_type: fixmystreet.tile_type
- });
- map.addLayer(tilma);
-
- var centre = new OpenLayers.LonLat( fixmystreet.easting, fixmystreet.northing );
- map.setCenter(centre);
-});
+ map_type: fixmystreet.tile_type,
+ numZoomLevels: 1,
+ zoomOffset: 0
+ };
+}
OpenLayers.Layer.Tilma = OpenLayers.Class(OpenLayers.Layer.XYZ, {
initialize: function(name, options) {
@@ -23,8 +21,9 @@ OpenLayers.Layer.Tilma = OpenLayers.Class(OpenLayers.Layer.XYZ, {
options = OpenLayers.Util.extend({
transitionEffect: "resize",
numZoomLevels: 1,
+ projection: "EPSG:27700",
units: "m",
- maxExtent: new OpenLayers.Bounds(0, 0, 700000, 1300000),
+ maxExtent: new OpenLayers.Bounds(0, 0, 700000, 1300000)
}, options);
var newArguments = [name, url, options];
OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArguments);
diff --git a/web/js/map-tilma.js b/web/js/map-tilma.js
index 1ae38cff1..1b8cc6450 100644
--- a/web/js/map-tilma.js
+++ b/web/js/map-tilma.js
@@ -135,7 +135,7 @@ function update_tiles(dx, dy, force) {
}
function load_pins(x, y) {
- if (document.getElementById('formX')) {
+ if (document.getElementById('formX') && !document.getElementById('problem_submit')) {
all_pins = '';
if (document.getElementById('all_pins')) {
all_pins = document.getElementById('all_pins').value;
diff --git a/web/reports.cgi b/web/reports.cgi
index 784c52917..22dbe344a 100755
--- a/web/reports.cgi
+++ b/web/reports.cgi
@@ -61,7 +61,6 @@ sub main {
my $areas_f = mySociety::MaPit::call('areas', $fylke, type => \@area_types);
if (keys %$areas_f == 1) {
($fylke) = values %$areas_f;
- $kommune = decode_utf8($kommune);
foreach (values %$areas_k) {
if ($_->{name} eq $kommune && $_->{parent_area} == $fylke->{id}) {
$one_council = $_;
@@ -84,7 +83,7 @@ sub main {
$area_name = $one_council->{name};
} else {
foreach (keys %$areas) {
- if ($areas->{$_}->{name} =~ /^\Q$q_council\E (Borough|City|District|County) Council$/) {
+ if ($areas->{$_}->{name} eq $q_council || $areas->{$_}->{name} =~ /^\Q$q_council\E (Borough|City|District|County) Council$/) {
$one_council = $areas->{$_};
$area_type = $areas->{$_}->{type};
$area_name = $q_council;
@@ -331,7 +330,7 @@ sub list_problems {
$out .= '<li><a href="' . $url . '">';
$out .= ent($_->{title});
$out .= '</a>';
- $out .= ' <small>(sent to both)</small>' if $_->{councils}>1;
+ $out .= ' <small>' . _('(sent to both)') . '</small>' if $_->{councils}>1;
$out .= ' <small>' . _('(not sent to council)') . '</small>' if $_->{councils}==0 && $q->{site} ne 'emptyhomes';
$out .= '<br><small>' . ent($_->{detail}) . '</small>' if $all;
$out .= '</li>';
diff --git a/web/rss.cgi b/web/rss.cgi
index 1273a2a5e..1570ca97f 100755
--- a/web/rss.cgi
+++ b/web/rss.cgi
@@ -15,6 +15,7 @@ use Encode;
use URI::Escape;
use FixMyStreet::Alert;
use FixMyStreet::Geocode;
+use mySociety::Locale;
use mySociety::MaPit;
use mySociety::Gaze;
use Utils;
@@ -143,6 +144,9 @@ sub rss_local_problems {
} else {
$d = mySociety::Gaze::get_radius_containing_population($lat, $lon, 200000);
$d = int($d*10+0.5)/10;
+ mySociety::Locale::in_gb_locale {
+ $d = sprintf("%f", $d);
+ }
}
my $xsl = Cobrand::feed_xsl($cobrand);
diff --git a/web/tms-signup.cgi b/web/tms-signup.cgi
index 44099417f..5975a324f 100755
--- a/web/tms-signup.cgi
+++ b/web/tms-signup.cgi
@@ -108,7 +108,7 @@ sub tms_do_subscribe {
mobile => $input{mobile},
});
dbh()->commit();
- return Page::send_email($q, $input{email}, $input{name}, 'tms', %h);
+ return Page::send_confirmation_email($q, $input{email}, $input{name}, 'tms', %h);
}
sub tms_confirm {
diff --git a/web/xsl.eha.xsl b/web/xsl.eha.xsl
index 6c66037d7..14015cfd9 100644
--- a/web/xsl.eha.xsl
+++ b/web/xsl.eha.xsl
@@ -22,7 +22,7 @@
</ul>
</div>
- <div id="wrapper"><div id="content">
+ <div id="wrapper"><div id="mysociety">
<xsl:apply-templates select="rss/channel"/>
</div></div>
diff --git a/web/xsl.xsl b/web/xsl.xsl
index 2736cb83b..12a4a93d5 100644
--- a/web/xsl.xsl
+++ b/web/xsl.xsl
@@ -12,7 +12,7 @@
</head>
<body>
<div id="header"><a href="/">FixMyStreet</a></div>
- <div id="wrapper"><div id="content">
+ <div id="wrapper"><div id="mysociety">
<xsl:apply-templates select="rss/channel"/>
</div></div>