diff --git a/VIPSWeb/locale/bg/LC_MESSAGES/django.mo b/VIPSWeb/locale/bg/LC_MESSAGES/django.mo index ee05aa1e2e96d67f0a34370c06c636908519c3d4..1047d06569c4d32d535cc4997fba39314ba49259 100755 Binary files a/VIPSWeb/locale/bg/LC_MESSAGES/django.mo and b/VIPSWeb/locale/bg/LC_MESSAGES/django.mo differ diff --git a/VIPSWeb/locale/bg/LC_MESSAGES/django.po b/VIPSWeb/locale/bg/LC_MESSAGES/django.po index 31391364d8a57b525073bcfff0e17100e3f52690..7cf982cc92b55c073e8ebc0392181aa4245dd268 100755 --- a/VIPSWeb/locale/bg/LC_MESSAGES/django.po +++ b/VIPSWeb/locale/bg/LC_MESSAGES/django.po @@ -19,7 +19,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-07 15:56+0200\n" +"POT-Creation-Date: 2018-11-22 13:23+0100\n" "PO-Revision-Date: 2014-05-14 09:31+0200\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -90,17 +90,17 @@ msgstr "" msgid "More info" msgstr "" -#: templates/index.html:25 +#: templates/index.html:25 templates/index_old.html:25 msgid "Welcome" msgstr "Добре дошли" -#: templates/index.html:42 +#: templates/index.html:42 templates/index_old.html:42 msgid "" "WARNING: We recommend using Chrome on Android handsets. Click OK to install " "Chrome, or Cancel to proceed without installing Chrome." msgstr "" -#: templates/index.html:45 +#: templates/index.html:47 templates/index_old.html:47 msgid "" "WARNING: We suspect you are using Internet Explorer to view this site. VIPS " "is not designed to work with Internet Explorer, you may experience errors " @@ -108,77 +108,82 @@ msgid "" "Google Chrome." msgstr "" -#: templates/index.html:75 +#: templates/index.html:78 templates/index_old.html:78 msgid "Surveillance and first observations" msgstr "" -#: templates/index.html:75 +#: templates/index.html:78 templates/index_old.html:78 msgid "All observations" msgstr "" -#: templates/index.html:81 +#: templates/index.html:84 templates/index_old.html:84 #, fuzzy #| msgid "Messages" msgid "Latest messages" msgstr "Съобщения" -#: templates/index.html:81 +#: templates/index.html:84 templates/index_old.html:84 #, fuzzy #| msgid "Messages" msgid "All messages" msgstr "Съобщения" -#: templates/index.html:94 +#: templates/index.html:97 templates/index_old.html:97 msgid "Crops" msgstr "" -#: templates/index.html:112 +#: templates/index.html:114 templates/index.html.py:152 +#: templates/index_old.html:147 +msgid "Forecasts" +msgstr "Прогноза" + +#: templates/index.html:115 +msgid "Observations" +msgstr "" + +#: templates/index.html:119 templates/index_old.html:115 msgid "High risk of infection" msgstr "" -#: templates/index.html:113 +#: templates/index.html:120 templates/index_old.html:116 msgid "Medium risk of infection" msgstr "" -#: templates/index.html:114 +#: templates/index.html:121 templates/index_old.html:117 msgid "No risk of infection" msgstr "" -#: templates/index.html:115 +#: templates/index.html:122 templates/index_old.html:118 msgid "Missing data" msgstr "" -#: templates/index.html:116 +#: templates/index.html:123 templates/index_old.html:119 msgid "No forecast available" msgstr "" -#: templates/index.html:137 +#: templates/index.html:145 templates/index_old.html:140 #, fuzzy #| msgid "Forecasts" msgid "My forecasts" msgstr "Прогноза" -#: templates/index.html:144 -msgid "Forecasts" -msgstr "Прогноза" - -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Sort by" msgstr "" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Weather station" msgstr "" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Pest" msgstr "" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Model" msgstr "" -#: templates/index.html:146 +#: templates/index.html:154 templates/index_old.html:149 msgid "Select crops or zoom in to see list of forecasts" msgstr "" diff --git a/VIPSWeb/locale/bg/LC_MESSAGES/djangojs.mo b/VIPSWeb/locale/bg/LC_MESSAGES/djangojs.mo index 718b9967dbcba5f2cbfa9ad4f5772792b8476376..4635733df7b4fb3837c4ecdb6454aabbe7824fc2 100755 Binary files a/VIPSWeb/locale/bg/LC_MESSAGES/djangojs.mo and b/VIPSWeb/locale/bg/LC_MESSAGES/djangojs.mo differ diff --git a/VIPSWeb/locale/bg/LC_MESSAGES/djangojs.po b/VIPSWeb/locale/bg/LC_MESSAGES/djangojs.po index 28e07b36078a544e2ef4fbcc18c4a8495c58b05b..3f29f29f4e18c07ebe8976f3a9293b63191c6045 100755 --- a/VIPSWeb/locale/bg/LC_MESSAGES/djangojs.po +++ b/VIPSWeb/locale/bg/LC_MESSAGES/djangojs.po @@ -19,7 +19,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-05-22 11:04-0700\n" +"POT-Creation-Date: 2018-11-22 13:23+0100\n" "PO-Revision-Date: 2014-05-14 09:33+0200\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -34,104 +34,124 @@ msgstr "" msgid "\n" msgstr "" -#: static/js/forecastmap.js:41 -msgid "Source hostname not defined." -msgstr "Името на източника не е определно. " - -#: static/js/forecastmap.js:178 -#, fuzzy -#| msgid "No forecasts found for" -msgid "No forecasts found for selected crops" -msgstr "Не е открита прогноза за " - -#: static/js/forecastmap.js:190 -msgid "External resources" -msgstr "" - -#: static/js/frontpage.js:333 +#: static/js/frontpage.js:352 msgid "Remove from my forecasts" msgstr "" -#: static/js/frontpage.js:333 +#: static/js/frontpage.js:352 msgid "Add to my forecasts" msgstr "" -#: static/js/frontpage.js:465 +#: static/js/frontpage.js:484 msgid "No forecast available" msgstr "" -#: static/js/frontpage.js:467 +#: static/js/frontpage.js:486 msgid "Missing data" msgstr "" -#: static/js/frontpage.js:469 +#: static/js/frontpage.js:488 msgid "No risk of infection" msgstr "" -#: static/js/frontpage.js:471 +#: static/js/frontpage.js:490 msgid "Medium risk of infection" msgstr "" -#: static/js/frontpage.js:473 +#: static/js/frontpage.js:492 msgid "High risk of infection" msgstr "" -#: static/js/frontpage.js:475 +#: static/js/frontpage.js:494 msgid "Invalid forecast status" msgstr "" +#: static/js/frontpageMap.js:69 +msgid "Source hostname not defined." +msgstr "Името на източника не е определно. " + +#: static/js/frontpageMap.js:280 +#, fuzzy +#| msgid "No forecasts found for" +msgid "No forecasts found for selected crops" +msgstr "Не е открита прогноза за " + +#: static/js/frontpageMap.js:292 +msgid "External resources" +msgstr "" + +#: static/js/frontpageMap.js:316 +msgid "Observation(s) found at location" +msgstr "" + +#: static/js/frontpageMap.js:331 +msgid "in" +msgstr "" + +#: static/js/frontpageMap.js:566 +msgid "Days since observation" +msgstr "" + +#: static/js/frontpageMap.js:569 +msgid "Days" +msgstr "" + +#: static/js/frontpageMap.js:571 +msgid "Older" +msgstr "" + #: static/js/util.js:235 static/js/util.js:264 msgid "Unnamed" msgstr "" -#: static/js/validateForm.js:118 +#: static/js/validateForm.js:120 #, javascript-format msgid "%s is not equal to %s" msgstr "" -#: static/js/validateForm.js:130 +#: static/js/validateForm.js:132 #, javascript-format msgid "%s is not after %s" msgstr "" -#: static/js/validateForm.js:244 static/js/validateForm.js:262 -#: static/js/validateForm.js:285 static/js/validateForm.js:474 +#: static/js/validateForm.js:247 static/js/validateForm.js:265 +#: static/js/validateForm.js:288 static/js/validateForm.js:477 msgid "Field is required" msgstr "" -#: static/js/validateForm.js:306 +#: static/js/validateForm.js:309 #, javascript-format msgid "Exceeds max length of %s" msgstr "" -#: static/js/validateForm.js:322 static/js/validateForm.js:340 +#: static/js/validateForm.js:325 static/js/validateForm.js:343 #, javascript-format msgid "Does not match format %s" msgstr "" -#: static/js/validateForm.js:357 static/js/validateForm.js:418 +#: static/js/validateForm.js:360 static/js/validateForm.js:421 msgid "Invalid format" msgstr "" -#: static/js/validateForm.js:375 +#: static/js/validateForm.js:378 msgid "Number required" msgstr "" -#: static/js/validateForm.js:380 +#: static/js/validateForm.js:383 #, javascript-format msgid "Lower than minimum (%s)" msgstr "" -#: static/js/validateForm.js:385 +#: static/js/validateForm.js:388 #, javascript-format msgid "Higher than maximum (%s)" msgstr "" -#: static/js/validateForm.js:404 +#: static/js/validateForm.js:407 msgid "Missing separator comma" msgstr "" -#: static/js/validateForm.js:409 +#: static/js/validateForm.js:412 msgid "Too many separator commas" msgstr "" @@ -139,59 +159,59 @@ msgstr "" msgid "Select station" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Sunday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Monday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Tuesday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Wednesday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Thursday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Friday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Saturday" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Sun" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Mon" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Tue" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Wed" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Thu" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Fri" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Sat" msgstr "" @@ -223,118 +243,119 @@ msgstr "" msgid "Sa" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "January" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "February" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "March" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "April" msgstr "" -#: templates/settings.js:16 templates/settings.js:17 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:17 templates/settings.js:44 +#: templates/settings.js:45 msgid "May" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "June" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "July" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "August" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "September" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "October" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "November" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "December" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jan" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Feb" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Mar" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Apr" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jun" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jul" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Aug" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Sep" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Oct" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Nov" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Dec" msgstr "" -#: templates/settings.js:44 +#: templates/settings.js:48 msgid "Print chart" msgstr "" -#: templates/settings.js:45 +#: templates/settings.js:49 msgid "Download PNG image" msgstr "" -#: templates/settings.js:46 +#: templates/settings.js:50 msgid "Download JPEG image" msgstr "" -#: templates/settings.js:47 +#: templates/settings.js:51 msgid "Download PDF document" msgstr "" -#: templates/settings.js:48 +#: templates/settings.js:52 msgid "Download SVG vector image" msgstr "" -#: templates/settings.js:49 +#: templates/settings.js:53 msgid "Chart context menu" msgstr "" diff --git a/VIPSWeb/locale/bs/LC_MESSAGES/django.mo b/VIPSWeb/locale/bs/LC_MESSAGES/django.mo index 2b8f6e762e76f543d6bf1aa8ffa665b052caab13..56acc1b2f6eac93e7db222c100d030049a4f4a2e 100755 Binary files a/VIPSWeb/locale/bs/LC_MESSAGES/django.mo and b/VIPSWeb/locale/bs/LC_MESSAGES/django.mo differ diff --git a/VIPSWeb/locale/bs/LC_MESSAGES/django.po b/VIPSWeb/locale/bs/LC_MESSAGES/django.po index 309cb233f6bc66cffd3d25f816280debeca6d121..09100f273874f0e2244d89a6f94d4c78c05f88ed 100755 --- a/VIPSWeb/locale/bs/LC_MESSAGES/django.po +++ b/VIPSWeb/locale/bs/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-07 15:56+0200\n" +"POT-Creation-Date: 2018-11-22 13:23+0100\n" "PO-Revision-Date: 2015-02-13 11:26+0100\n" "Last-Translator: \n" "Language-Team: \n" @@ -79,17 +79,17 @@ msgstr "" msgid "More info" msgstr "" -#: templates/index.html:25 +#: templates/index.html:25 templates/index_old.html:25 msgid "Welcome" msgstr "Dobrodošli " -#: templates/index.html:42 +#: templates/index.html:42 templates/index_old.html:42 msgid "" "WARNING: We recommend using Chrome on Android handsets. Click OK to install " "Chrome, or Cancel to proceed without installing Chrome." msgstr "" -#: templates/index.html:45 +#: templates/index.html:47 templates/index_old.html:47 msgid "" "WARNING: We suspect you are using Internet Explorer to view this site. VIPS " "is not designed to work with Internet Explorer, you may experience errors " @@ -97,77 +97,82 @@ msgid "" "Google Chrome." msgstr "" -#: templates/index.html:75 +#: templates/index.html:78 templates/index_old.html:78 msgid "Surveillance and first observations" msgstr "" -#: templates/index.html:75 +#: templates/index.html:78 templates/index_old.html:78 msgid "All observations" msgstr "" -#: templates/index.html:81 +#: templates/index.html:84 templates/index_old.html:84 #, fuzzy #| msgid "Messages" msgid "Latest messages" msgstr "Poruke" -#: templates/index.html:81 +#: templates/index.html:84 templates/index_old.html:84 #, fuzzy #| msgid "Messages" msgid "All messages" msgstr "Poruke" -#: templates/index.html:94 +#: templates/index.html:97 templates/index_old.html:97 msgid "Crops" msgstr "Usjevi " -#: templates/index.html:112 +#: templates/index.html:114 templates/index.html.py:152 +#: templates/index_old.html:147 +msgid "Forecasts" +msgstr "Prognoze " + +#: templates/index.html:115 +msgid "Observations" +msgstr "" + +#: templates/index.html:119 templates/index_old.html:115 msgid "High risk of infection" msgstr "Visok rizik infekcije" -#: templates/index.html:113 +#: templates/index.html:120 templates/index_old.html:116 msgid "Medium risk of infection" msgstr "Srednji rizik infekcije" -#: templates/index.html:114 +#: templates/index.html:121 templates/index_old.html:117 msgid "No risk of infection" msgstr "Bez rizika infekcije" -#: templates/index.html:115 +#: templates/index.html:122 templates/index_old.html:118 msgid "Missing data" msgstr "Podaci nedostaju" -#: templates/index.html:116 +#: templates/index.html:123 templates/index_old.html:119 msgid "No forecast available" msgstr "Prognoza nije dostupna" -#: templates/index.html:137 +#: templates/index.html:145 templates/index_old.html:140 #, fuzzy #| msgid "Forecasts" msgid "My forecasts" msgstr "Prognoze " -#: templates/index.html:144 -msgid "Forecasts" -msgstr "Prognoze " - -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Sort by" msgstr "" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Weather station" msgstr "" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Pest" msgstr "" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Model" msgstr "" -#: templates/index.html:146 +#: templates/index.html:154 templates/index_old.html:149 msgid "Select crops or zoom in to see list of forecasts" msgstr "" diff --git a/VIPSWeb/locale/bs/LC_MESSAGES/djangojs.mo b/VIPSWeb/locale/bs/LC_MESSAGES/djangojs.mo index 8671801e449f0ecf45af8db4094cef048dcb14bb..04b2436be61f14e8ee4d5d2ec0a7b1e800a0cfb3 100755 Binary files a/VIPSWeb/locale/bs/LC_MESSAGES/djangojs.mo and b/VIPSWeb/locale/bs/LC_MESSAGES/djangojs.mo differ diff --git a/VIPSWeb/locale/bs/LC_MESSAGES/djangojs.po b/VIPSWeb/locale/bs/LC_MESSAGES/djangojs.po index 23472d9cdee852f8c8a0c78e1437b6bd5583d02c..f05027ddc8315183714d9f9f933ea9f0b6aac344 100755 --- a/VIPSWeb/locale/bs/LC_MESSAGES/djangojs.po +++ b/VIPSWeb/locale/bs/LC_MESSAGES/djangojs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-05-22 11:04-0700\n" +"POT-Creation-Date: 2018-11-22 13:23+0100\n" "PO-Revision-Date: 2015-02-13 11:26+0100\n" "Last-Translator: \n" "Language-Team: \n" @@ -23,106 +23,126 @@ msgstr "" msgid "\n" msgstr "" -#: static/js/forecastmap.js:41 -msgid "Source hostname not defined." -msgstr "Ime izvora nije definisano." - -#: static/js/forecastmap.js:178 -#, fuzzy -#| msgid "No forecasts found for" -msgid "No forecasts found for selected crops" -msgstr "Prognoze nisu pronađene za" - -#: static/js/forecastmap.js:190 -msgid "External resources" -msgstr "" - -#: static/js/frontpage.js:333 +#: static/js/frontpage.js:352 msgid "Remove from my forecasts" msgstr "" -#: static/js/frontpage.js:333 +#: static/js/frontpage.js:352 msgid "Add to my forecasts" msgstr "" -#: static/js/frontpage.js:465 +#: static/js/frontpage.js:484 msgid "No forecast available" msgstr "Prognoza nije dostupna" -#: static/js/frontpage.js:467 +#: static/js/frontpage.js:486 msgid "Missing data" msgstr "Podaci nedostaju" -#: static/js/frontpage.js:469 +#: static/js/frontpage.js:488 msgid "No risk of infection" msgstr "Bez rizika infekcije" -#: static/js/frontpage.js:471 +#: static/js/frontpage.js:490 msgid "Medium risk of infection" msgstr "Srednji rizik infekcije" -#: static/js/frontpage.js:473 +#: static/js/frontpage.js:492 msgid "High risk of infection" msgstr "Visok rizik infekcije" -#: static/js/frontpage.js:475 +#: static/js/frontpage.js:494 msgid "Invalid forecast status" msgstr "Nepravilan status prognoze" +#: static/js/frontpageMap.js:69 +msgid "Source hostname not defined." +msgstr "Ime izvora nije definisano." + +#: static/js/frontpageMap.js:280 +#, fuzzy +#| msgid "No forecasts found for" +msgid "No forecasts found for selected crops" +msgstr "Prognoze nisu pronađene za" + +#: static/js/frontpageMap.js:292 +msgid "External resources" +msgstr "" + +#: static/js/frontpageMap.js:316 +msgid "Observation(s) found at location" +msgstr "" + +#: static/js/frontpageMap.js:331 +msgid "in" +msgstr "" + +#: static/js/frontpageMap.js:566 +msgid "Days since observation" +msgstr "" + +#: static/js/frontpageMap.js:569 +msgid "Days" +msgstr "" + +#: static/js/frontpageMap.js:571 +msgid "Older" +msgstr "" + #: static/js/util.js:235 static/js/util.js:264 msgid "Unnamed" msgstr "Neimenovan" -#: static/js/validateForm.js:118 +#: static/js/validateForm.js:120 #, javascript-format msgid "%s is not equal to %s" msgstr "" -#: static/js/validateForm.js:130 +#: static/js/validateForm.js:132 #, javascript-format msgid "%s is not after %s" msgstr "" -#: static/js/validateForm.js:244 static/js/validateForm.js:262 -#: static/js/validateForm.js:285 static/js/validateForm.js:474 +#: static/js/validateForm.js:247 static/js/validateForm.js:265 +#: static/js/validateForm.js:288 static/js/validateForm.js:477 msgid "Field is required" msgstr "" -#: static/js/validateForm.js:306 +#: static/js/validateForm.js:309 #, javascript-format msgid "Exceeds max length of %s" msgstr "" -#: static/js/validateForm.js:322 static/js/validateForm.js:340 +#: static/js/validateForm.js:325 static/js/validateForm.js:343 #, javascript-format msgid "Does not match format %s" msgstr "" -#: static/js/validateForm.js:357 static/js/validateForm.js:418 +#: static/js/validateForm.js:360 static/js/validateForm.js:421 #, fuzzy msgid "Invalid format" msgstr "Nepravilan status prognoze" -#: static/js/validateForm.js:375 +#: static/js/validateForm.js:378 msgid "Number required" msgstr "" -#: static/js/validateForm.js:380 +#: static/js/validateForm.js:383 #, javascript-format msgid "Lower than minimum (%s)" msgstr "" -#: static/js/validateForm.js:385 +#: static/js/validateForm.js:388 #, javascript-format msgid "Higher than maximum (%s)" msgstr "" -#: static/js/validateForm.js:404 +#: static/js/validateForm.js:407 #, fuzzy msgid "Missing separator comma" msgstr "Podaci nedostaju" -#: static/js/validateForm.js:409 +#: static/js/validateForm.js:412 msgid "Too many separator commas" msgstr "" @@ -130,59 +150,59 @@ msgstr "" msgid "Select station" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Sunday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Monday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Tuesday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Wednesday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Thursday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Friday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Saturday" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Sun" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Mon" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Tue" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Wed" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Thu" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Fri" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Sat" msgstr "" @@ -214,118 +234,119 @@ msgstr "" msgid "Sa" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "January" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "February" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "March" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "April" msgstr "" -#: templates/settings.js:16 templates/settings.js:17 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:17 templates/settings.js:44 +#: templates/settings.js:45 msgid "May" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "June" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "July" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "August" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "September" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "October" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "November" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "December" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jan" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Feb" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Mar" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Apr" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jun" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jul" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Aug" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Sep" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Oct" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Nov" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Dec" msgstr "" -#: templates/settings.js:44 +#: templates/settings.js:48 msgid "Print chart" msgstr "" -#: templates/settings.js:45 +#: templates/settings.js:49 msgid "Download PNG image" msgstr "" -#: templates/settings.js:46 +#: templates/settings.js:50 msgid "Download JPEG image" msgstr "" -#: templates/settings.js:47 +#: templates/settings.js:51 msgid "Download PDF document" msgstr "" -#: templates/settings.js:48 +#: templates/settings.js:52 msgid "Download SVG vector image" msgstr "" -#: templates/settings.js:49 +#: templates/settings.js:53 msgid "Chart context menu" msgstr "" diff --git a/VIPSWeb/locale/de/LC_MESSAGES/django.mo b/VIPSWeb/locale/de/LC_MESSAGES/django.mo index 4fc6ed1c07dd981e10691b83450541bb99b25eae..71cbdf3e9d8d54be31066ec4ad8628bc2c1f2845 100755 Binary files a/VIPSWeb/locale/de/LC_MESSAGES/django.mo and b/VIPSWeb/locale/de/LC_MESSAGES/django.mo differ diff --git a/VIPSWeb/locale/de/LC_MESSAGES/django.po b/VIPSWeb/locale/de/LC_MESSAGES/django.po index 4b39a93a05c4534bc11fa164c8dfab2f9c74a7f9..e12bebdcf0a0347f3a780ae244d59b817d930bc7 100755 --- a/VIPSWeb/locale/de/LC_MESSAGES/django.po +++ b/VIPSWeb/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-07 15:56+0200\n" +"POT-Creation-Date: 2018-11-22 13:23+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -78,17 +78,17 @@ msgstr "" msgid "More info" msgstr "" -#: templates/index.html:25 +#: templates/index.html:25 templates/index_old.html:25 msgid "Welcome" msgstr "" -#: templates/index.html:42 +#: templates/index.html:42 templates/index_old.html:42 msgid "" "WARNING: We recommend using Chrome on Android handsets. Click OK to install " "Chrome, or Cancel to proceed without installing Chrome." msgstr "" -#: templates/index.html:45 +#: templates/index.html:47 templates/index_old.html:47 msgid "" "WARNING: We suspect you are using Internet Explorer to view this site. VIPS " "is not designed to work with Internet Explorer, you may experience errors " @@ -96,71 +96,76 @@ msgid "" "Google Chrome." msgstr "" -#: templates/index.html:75 +#: templates/index.html:78 templates/index_old.html:78 msgid "Surveillance and first observations" msgstr "" -#: templates/index.html:75 +#: templates/index.html:78 templates/index_old.html:78 msgid "All observations" msgstr "" -#: templates/index.html:81 +#: templates/index.html:84 templates/index_old.html:84 msgid "Latest messages" msgstr "" -#: templates/index.html:81 +#: templates/index.html:84 templates/index_old.html:84 msgid "All messages" msgstr "" -#: templates/index.html:94 +#: templates/index.html:97 templates/index_old.html:97 msgid "Crops" msgstr "" -#: templates/index.html:112 +#: templates/index.html:114 templates/index.html.py:152 +#: templates/index_old.html:147 +msgid "Forecasts" +msgstr "" + +#: templates/index.html:115 +msgid "Observations" +msgstr "" + +#: templates/index.html:119 templates/index_old.html:115 msgid "High risk of infection" msgstr "" -#: templates/index.html:113 +#: templates/index.html:120 templates/index_old.html:116 msgid "Medium risk of infection" msgstr "" -#: templates/index.html:114 +#: templates/index.html:121 templates/index_old.html:117 msgid "No risk of infection" msgstr "" -#: templates/index.html:115 +#: templates/index.html:122 templates/index_old.html:118 msgid "Missing data" msgstr "" -#: templates/index.html:116 +#: templates/index.html:123 templates/index_old.html:119 msgid "No forecast available" msgstr "" -#: templates/index.html:137 +#: templates/index.html:145 templates/index_old.html:140 msgid "My forecasts" msgstr "" -#: templates/index.html:144 -msgid "Forecasts" -msgstr "" - -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Sort by" msgstr "" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Weather station" msgstr "" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Pest" msgstr "" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Model" msgstr "" -#: templates/index.html:146 +#: templates/index.html:154 templates/index_old.html:149 msgid "Select crops or zoom in to see list of forecasts" msgstr "" diff --git a/VIPSWeb/locale/de/LC_MESSAGES/djangojs.mo b/VIPSWeb/locale/de/LC_MESSAGES/djangojs.mo index 86dd65299999e07474db5adf81fba873c538f60b..71cbdf3e9d8d54be31066ec4ad8628bc2c1f2845 100755 Binary files a/VIPSWeb/locale/de/LC_MESSAGES/djangojs.mo and b/VIPSWeb/locale/de/LC_MESSAGES/djangojs.mo differ diff --git a/VIPSWeb/locale/de/LC_MESSAGES/djangojs.po b/VIPSWeb/locale/de/LC_MESSAGES/djangojs.po index dfdf5328a8a7bbc6075b69b175dc566bec3b363f..ec571c9c2162043b53e7109ca73f95afdabd2c0d 100755 --- a/VIPSWeb/locale/de/LC_MESSAGES/djangojs.po +++ b/VIPSWeb/locale/de/LC_MESSAGES/djangojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-05-22 11:04-0700\n" +"POT-Creation-Date: 2018-11-22 13:23+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -22,102 +22,122 @@ msgstr "" msgid "\n" msgstr "" -#: static/js/forecastmap.js:41 -msgid "Source hostname not defined." -msgstr "" - -#: static/js/forecastmap.js:178 -msgid "No forecasts found for selected crops" -msgstr "" - -#: static/js/forecastmap.js:190 -msgid "External resources" -msgstr "" - -#: static/js/frontpage.js:333 +#: static/js/frontpage.js:352 msgid "Remove from my forecasts" msgstr "" -#: static/js/frontpage.js:333 +#: static/js/frontpage.js:352 msgid "Add to my forecasts" msgstr "" -#: static/js/frontpage.js:465 +#: static/js/frontpage.js:484 msgid "No forecast available" msgstr "" -#: static/js/frontpage.js:467 +#: static/js/frontpage.js:486 msgid "Missing data" msgstr "" -#: static/js/frontpage.js:469 +#: static/js/frontpage.js:488 msgid "No risk of infection" msgstr "" -#: static/js/frontpage.js:471 +#: static/js/frontpage.js:490 msgid "Medium risk of infection" msgstr "" -#: static/js/frontpage.js:473 +#: static/js/frontpage.js:492 msgid "High risk of infection" msgstr "" -#: static/js/frontpage.js:475 +#: static/js/frontpage.js:494 msgid "Invalid forecast status" msgstr "" +#: static/js/frontpageMap.js:69 +msgid "Source hostname not defined." +msgstr "" + +#: static/js/frontpageMap.js:280 +msgid "No forecasts found for selected crops" +msgstr "" + +#: static/js/frontpageMap.js:292 +msgid "External resources" +msgstr "" + +#: static/js/frontpageMap.js:316 +msgid "Observation(s) found at location" +msgstr "" + +#: static/js/frontpageMap.js:331 +msgid "in" +msgstr "" + +#: static/js/frontpageMap.js:566 +msgid "Days since observation" +msgstr "" + +#: static/js/frontpageMap.js:569 +msgid "Days" +msgstr "" + +#: static/js/frontpageMap.js:571 +msgid "Older" +msgstr "" + #: static/js/util.js:235 static/js/util.js:264 msgid "Unnamed" msgstr "" -#: static/js/validateForm.js:118 +#: static/js/validateForm.js:120 #, javascript-format msgid "%s is not equal to %s" msgstr "" -#: static/js/validateForm.js:130 +#: static/js/validateForm.js:132 #, javascript-format msgid "%s is not after %s" msgstr "" -#: static/js/validateForm.js:244 static/js/validateForm.js:262 -#: static/js/validateForm.js:285 static/js/validateForm.js:474 +#: static/js/validateForm.js:247 static/js/validateForm.js:265 +#: static/js/validateForm.js:288 static/js/validateForm.js:477 msgid "Field is required" msgstr "" -#: static/js/validateForm.js:306 +#: static/js/validateForm.js:309 #, javascript-format msgid "Exceeds max length of %s" msgstr "" -#: static/js/validateForm.js:322 static/js/validateForm.js:340 +#: static/js/validateForm.js:325 static/js/validateForm.js:343 #, javascript-format msgid "Does not match format %s" msgstr "" -#: static/js/validateForm.js:357 static/js/validateForm.js:418 +#: static/js/validateForm.js:360 static/js/validateForm.js:421 msgid "Invalid format" msgstr "" -#: static/js/validateForm.js:375 +#: static/js/validateForm.js:378 msgid "Number required" msgstr "" -#: static/js/validateForm.js:380 +#: static/js/validateForm.js:383 #, javascript-format msgid "Lower than minimum (%s)" msgstr "" -#: static/js/validateForm.js:385 +#: static/js/validateForm.js:388 #, javascript-format msgid "Higher than maximum (%s)" msgstr "" -#: static/js/validateForm.js:404 +#: static/js/validateForm.js:407 msgid "Missing separator comma" msgstr "" -#: static/js/validateForm.js:409 +#: static/js/validateForm.js:412 msgid "Too many separator commas" msgstr "" @@ -125,59 +145,59 @@ msgstr "" msgid "Select station" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Sunday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Monday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Tuesday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Wednesday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Thursday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Friday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Saturday" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Sun" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Mon" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Tue" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Wed" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Thu" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Fri" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Sat" msgstr "" @@ -209,118 +229,119 @@ msgstr "" msgid "Sa" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "January" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "February" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "March" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "April" msgstr "" -#: templates/settings.js:16 templates/settings.js:17 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:17 templates/settings.js:44 +#: templates/settings.js:45 msgid "May" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "June" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "July" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "August" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "September" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "October" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "November" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "December" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jan" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Feb" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Mar" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Apr" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jun" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jul" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Aug" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Sep" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Oct" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Nov" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Dec" msgstr "" -#: templates/settings.js:44 +#: templates/settings.js:48 msgid "Print chart" msgstr "" -#: templates/settings.js:45 +#: templates/settings.js:49 msgid "Download PNG image" msgstr "" -#: templates/settings.js:46 +#: templates/settings.js:50 msgid "Download JPEG image" msgstr "" -#: templates/settings.js:47 +#: templates/settings.js:51 msgid "Download PDF document" msgstr "" -#: templates/settings.js:48 +#: templates/settings.js:52 msgid "Download SVG vector image" msgstr "" -#: templates/settings.js:49 +#: templates/settings.js:53 msgid "Chart context menu" msgstr "" diff --git a/VIPSWeb/locale/fi/LC_MESSAGES/django.mo b/VIPSWeb/locale/fi/LC_MESSAGES/django.mo index 4a912692c33074e1187f10c6b018dcf797693ea0..d81097bbf75b2d8a5c72e567385a7ad659ae031c 100755 Binary files a/VIPSWeb/locale/fi/LC_MESSAGES/django.mo and b/VIPSWeb/locale/fi/LC_MESSAGES/django.mo differ diff --git a/VIPSWeb/locale/fi/LC_MESSAGES/django.po b/VIPSWeb/locale/fi/LC_MESSAGES/django.po index 18edd8ca35ce26ed0df98dff1c75fad9d07eac98..4b51feb2bb73fdcbef0094b94079ee66a77ba079 100755 --- a/VIPSWeb/locale/fi/LC_MESSAGES/django.po +++ b/VIPSWeb/locale/fi/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-07 15:56+0200\n" +"POT-Creation-Date: 2018-11-22 13:23+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -78,17 +78,17 @@ msgstr "" msgid "More info" msgstr "" -#: templates/index.html:25 +#: templates/index.html:25 templates/index_old.html:25 msgid "Welcome" msgstr "Tervetuloa" -#: templates/index.html:42 +#: templates/index.html:42 templates/index_old.html:42 msgid "" "WARNING: We recommend using Chrome on Android handsets. Click OK to install " "Chrome, or Cancel to proceed without installing Chrome." msgstr "" -#: templates/index.html:45 +#: templates/index.html:47 templates/index_old.html:47 msgid "" "WARNING: We suspect you are using Internet Explorer to view this site. VIPS " "is not designed to work with Internet Explorer, you may experience errors " @@ -96,77 +96,82 @@ msgid "" "Google Chrome." msgstr "" -#: templates/index.html:75 +#: templates/index.html:78 templates/index_old.html:78 msgid "Surveillance and first observations" msgstr "" -#: templates/index.html:75 +#: templates/index.html:78 templates/index_old.html:78 msgid "All observations" msgstr "" -#: templates/index.html:81 +#: templates/index.html:84 templates/index_old.html:84 #, fuzzy #| msgid "Messages" msgid "Latest messages" msgstr "Viestit" -#: templates/index.html:81 +#: templates/index.html:84 templates/index_old.html:84 #, fuzzy #| msgid "Messages" msgid "All messages" msgstr "Viestit" -#: templates/index.html:94 +#: templates/index.html:97 templates/index_old.html:97 msgid "Crops" msgstr "Sato" -#: templates/index.html:112 +#: templates/index.html:114 templates/index.html.py:152 +#: templates/index_old.html:147 +msgid "Forecasts" +msgstr "Hälytykset" + +#: templates/index.html:115 +msgid "Observations" +msgstr "" + +#: templates/index.html:119 templates/index_old.html:115 msgid "High risk of infection" msgstr "" -#: templates/index.html:113 +#: templates/index.html:120 templates/index_old.html:116 msgid "Medium risk of infection" msgstr "" -#: templates/index.html:114 +#: templates/index.html:121 templates/index_old.html:117 msgid "No risk of infection" msgstr "" -#: templates/index.html:115 +#: templates/index.html:122 templates/index_old.html:118 msgid "Missing data" msgstr "" -#: templates/index.html:116 +#: templates/index.html:123 templates/index_old.html:119 msgid "No forecast available" msgstr "" -#: templates/index.html:137 +#: templates/index.html:145 templates/index_old.html:140 #, fuzzy #| msgid "Forecasts" msgid "My forecasts" msgstr "Hälytykset" -#: templates/index.html:144 -msgid "Forecasts" -msgstr "Hälytykset" - -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Sort by" msgstr "" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Weather station" msgstr "" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Pest" msgstr "" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Model" msgstr "" -#: templates/index.html:146 +#: templates/index.html:154 templates/index_old.html:149 msgid "Select crops or zoom in to see list of forecasts" msgstr "" diff --git a/VIPSWeb/locale/fi/LC_MESSAGES/djangojs.mo b/VIPSWeb/locale/fi/LC_MESSAGES/djangojs.mo index 86dd65299999e07474db5adf81fba873c538f60b..71cbdf3e9d8d54be31066ec4ad8628bc2c1f2845 100755 Binary files a/VIPSWeb/locale/fi/LC_MESSAGES/djangojs.mo and b/VIPSWeb/locale/fi/LC_MESSAGES/djangojs.mo differ diff --git a/VIPSWeb/locale/fi/LC_MESSAGES/djangojs.po b/VIPSWeb/locale/fi/LC_MESSAGES/djangojs.po index dfdf5328a8a7bbc6075b69b175dc566bec3b363f..ec571c9c2162043b53e7109ca73f95afdabd2c0d 100755 --- a/VIPSWeb/locale/fi/LC_MESSAGES/djangojs.po +++ b/VIPSWeb/locale/fi/LC_MESSAGES/djangojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-05-22 11:04-0700\n" +"POT-Creation-Date: 2018-11-22 13:23+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -22,102 +22,122 @@ msgstr "" msgid "\n" msgstr "" -#: static/js/forecastmap.js:41 -msgid "Source hostname not defined." -msgstr "" - -#: static/js/forecastmap.js:178 -msgid "No forecasts found for selected crops" -msgstr "" - -#: static/js/forecastmap.js:190 -msgid "External resources" -msgstr "" - -#: static/js/frontpage.js:333 +#: static/js/frontpage.js:352 msgid "Remove from my forecasts" msgstr "" -#: static/js/frontpage.js:333 +#: static/js/frontpage.js:352 msgid "Add to my forecasts" msgstr "" -#: static/js/frontpage.js:465 +#: static/js/frontpage.js:484 msgid "No forecast available" msgstr "" -#: static/js/frontpage.js:467 +#: static/js/frontpage.js:486 msgid "Missing data" msgstr "" -#: static/js/frontpage.js:469 +#: static/js/frontpage.js:488 msgid "No risk of infection" msgstr "" -#: static/js/frontpage.js:471 +#: static/js/frontpage.js:490 msgid "Medium risk of infection" msgstr "" -#: static/js/frontpage.js:473 +#: static/js/frontpage.js:492 msgid "High risk of infection" msgstr "" -#: static/js/frontpage.js:475 +#: static/js/frontpage.js:494 msgid "Invalid forecast status" msgstr "" +#: static/js/frontpageMap.js:69 +msgid "Source hostname not defined." +msgstr "" + +#: static/js/frontpageMap.js:280 +msgid "No forecasts found for selected crops" +msgstr "" + +#: static/js/frontpageMap.js:292 +msgid "External resources" +msgstr "" + +#: static/js/frontpageMap.js:316 +msgid "Observation(s) found at location" +msgstr "" + +#: static/js/frontpageMap.js:331 +msgid "in" +msgstr "" + +#: static/js/frontpageMap.js:566 +msgid "Days since observation" +msgstr "" + +#: static/js/frontpageMap.js:569 +msgid "Days" +msgstr "" + +#: static/js/frontpageMap.js:571 +msgid "Older" +msgstr "" + #: static/js/util.js:235 static/js/util.js:264 msgid "Unnamed" msgstr "" -#: static/js/validateForm.js:118 +#: static/js/validateForm.js:120 #, javascript-format msgid "%s is not equal to %s" msgstr "" -#: static/js/validateForm.js:130 +#: static/js/validateForm.js:132 #, javascript-format msgid "%s is not after %s" msgstr "" -#: static/js/validateForm.js:244 static/js/validateForm.js:262 -#: static/js/validateForm.js:285 static/js/validateForm.js:474 +#: static/js/validateForm.js:247 static/js/validateForm.js:265 +#: static/js/validateForm.js:288 static/js/validateForm.js:477 msgid "Field is required" msgstr "" -#: static/js/validateForm.js:306 +#: static/js/validateForm.js:309 #, javascript-format msgid "Exceeds max length of %s" msgstr "" -#: static/js/validateForm.js:322 static/js/validateForm.js:340 +#: static/js/validateForm.js:325 static/js/validateForm.js:343 #, javascript-format msgid "Does not match format %s" msgstr "" -#: static/js/validateForm.js:357 static/js/validateForm.js:418 +#: static/js/validateForm.js:360 static/js/validateForm.js:421 msgid "Invalid format" msgstr "" -#: static/js/validateForm.js:375 +#: static/js/validateForm.js:378 msgid "Number required" msgstr "" -#: static/js/validateForm.js:380 +#: static/js/validateForm.js:383 #, javascript-format msgid "Lower than minimum (%s)" msgstr "" -#: static/js/validateForm.js:385 +#: static/js/validateForm.js:388 #, javascript-format msgid "Higher than maximum (%s)" msgstr "" -#: static/js/validateForm.js:404 +#: static/js/validateForm.js:407 msgid "Missing separator comma" msgstr "" -#: static/js/validateForm.js:409 +#: static/js/validateForm.js:412 msgid "Too many separator commas" msgstr "" @@ -125,59 +145,59 @@ msgstr "" msgid "Select station" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Sunday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Monday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Tuesday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Wednesday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Thursday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Friday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Saturday" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Sun" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Mon" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Tue" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Wed" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Thu" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Fri" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Sat" msgstr "" @@ -209,118 +229,119 @@ msgstr "" msgid "Sa" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "January" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "February" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "March" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "April" msgstr "" -#: templates/settings.js:16 templates/settings.js:17 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:17 templates/settings.js:44 +#: templates/settings.js:45 msgid "May" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "June" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "July" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "August" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "September" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "October" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "November" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "December" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jan" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Feb" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Mar" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Apr" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jun" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jul" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Aug" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Sep" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Oct" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Nov" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Dec" msgstr "" -#: templates/settings.js:44 +#: templates/settings.js:48 msgid "Print chart" msgstr "" -#: templates/settings.js:45 +#: templates/settings.js:49 msgid "Download PNG image" msgstr "" -#: templates/settings.js:46 +#: templates/settings.js:50 msgid "Download JPEG image" msgstr "" -#: templates/settings.js:47 +#: templates/settings.js:51 msgid "Download PDF document" msgstr "" -#: templates/settings.js:48 +#: templates/settings.js:52 msgid "Download SVG vector image" msgstr "" -#: templates/settings.js:49 +#: templates/settings.js:53 msgid "Chart context menu" msgstr "" diff --git a/VIPSWeb/locale/nb/LC_MESSAGES/django.mo b/VIPSWeb/locale/nb/LC_MESSAGES/django.mo index d1bbb0edefb31d7f9d5636bfe02e52170904903c..f3105555983aac53f541202fb62765689a789465 100755 Binary files a/VIPSWeb/locale/nb/LC_MESSAGES/django.mo and b/VIPSWeb/locale/nb/LC_MESSAGES/django.mo differ diff --git a/VIPSWeb/locale/nb/LC_MESSAGES/django.po b/VIPSWeb/locale/nb/LC_MESSAGES/django.po index 4202ee6047fedb195d1391ffb3e40555cd9544c5..a9b16caa82b2044288c603d7cc9dbbb678331d97 100755 --- a/VIPSWeb/locale/nb/LC_MESSAGES/django.po +++ b/VIPSWeb/locale/nb/LC_MESSAGES/django.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: VIPSWeb\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-07 15:56+0200\n" +"POT-Creation-Date: 2018-11-22 13:23+0100\n" "PO-Revision-Date: 2013-11-07 20:18+0200\n" "Last-Translator: Tor-Einar Skog <tor-einar.skog@nibio.no>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -46,8 +46,7 @@ msgstr "Frukt og bær" msgid "Other models and services" msgstr "Andre modeller og tjenester" -#: templates/404.html:3 -#: templates/404.html.py:5 +#: templates/404.html:3 templates/404.html.py:5 msgid "File not found" msgstr "Fil ikke funnet" @@ -91,95 +90,106 @@ msgstr "Skjønner!" msgid "More info" msgstr "Mer informasjon" -#: templates/index.html:25 +#: templates/index.html:25 templates/index_old.html:25 msgid "Welcome" msgstr "Velkommen" -#: templates/index.html:42 +#: templates/index.html:42 templates/index_old.html:42 msgid "" "WARNING: We recommend using Chrome on Android handsets. Click OK to install " "Chrome, or Cancel to proceed without installing Chrome." -msgstr "ADVARSEL: Vi anbefaler å bruke nettleseren Chrome på Android-dingser. Klikk " +msgstr "" +"ADVARSEL: Vi anbefaler å bruke nettleseren Chrome på Android-dingser. Klikk " "OK for å installere Chrome, eller Cancel for å fortsette uten å installere " "Chrome." -#: templates/index.html:45 +#: templates/index.html:47 templates/index_old.html:47 msgid "" "WARNING: We suspect you are using Internet Explorer to view this site. VIPS " "is not designed to work with Internet Explorer, you may experience errors " "and missing features. Please use a different browser, like Microsoft Edge or " "Google Chrome." -msgstr "ADVARSEL: Det ser ut som du bruker Internet Explorer på denne websiden. VIPS er ikke designet for å fungere med Internet Explorer, så du må forvente feil og manglende funksjonalitet. Vennligst bruk en moderne nettleser som Microsoft Edge, Firefox eller Google Chrome." +msgstr "" +"ADVARSEL: Det ser ut som du bruker Internet Explorer på denne websiden. VIPS " +"er ikke designet for å fungere med Internet Explorer, så du må forvente feil " +"og manglende funksjonalitet. Vennligst bruk en moderne nettleser som " +"Microsoft Edge, Firefox eller Google Chrome." -#: templates/index.html:75 +#: templates/index.html:78 templates/index_old.html:78 msgid "Surveillance and first observations" msgstr "Overvåkning og førstefunn" -#: templates/index.html:75 +#: templates/index.html:78 templates/index_old.html:78 msgid "All observations" msgstr "Alle observasjoner" -#: templates/index.html:81 +#: templates/index.html:84 templates/index_old.html:84 msgid "Latest messages" msgstr "Siste meldinger" -#: templates/index.html:81 +#: templates/index.html:84 templates/index_old.html:84 msgid "All messages" msgstr "Alle meldinger" -#: templates/index.html:94 +#: templates/index.html:97 templates/index_old.html:97 msgid "Crops" msgstr "Kulturer" -#: templates/index.html:112 +#: templates/index.html:114 templates/index.html.py:152 +#: templates/index_old.html:147 +msgid "Forecasts" +msgstr "Varsler" + +#: templates/index.html:115 +#, fuzzy +#| msgid "All observations" +msgid "Observations" +msgstr "Alle observasjoner" + +#: templates/index.html:119 templates/index_old.html:115 msgid "High risk of infection" msgstr "Fare for angrep" -#: templates/index.html:113 +#: templates/index.html:120 templates/index_old.html:116 msgid "Medium risk of infection" msgstr "Mulig fare for angrep" -#: templates/index.html:114 +#: templates/index.html:121 templates/index_old.html:117 msgid "No risk of infection" msgstr "Ingen fare for angrep" -#: templates/index.html:115 +#: templates/index.html:122 templates/index_old.html:118 msgid "Missing data" msgstr "Data mangler" -#: templates/index.html:116 +#: templates/index.html:123 templates/index_old.html:119 msgid "No forecast available" msgstr "Varsel beregnes ikke" -#: templates/index.html:137 +#: templates/index.html:145 templates/index_old.html:140 msgid "My forecasts" msgstr "Mine varsler" -#: templates/index.html:144 -msgid "Forecasts" -msgstr "Varsler" - -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Sort by" msgstr "Sorter etter" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Weather station" msgstr "Målestasjon" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Pest" msgstr "Skadegjører" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Model" msgstr "Modell" -#: templates/index.html:146 +#: templates/index.html:154 templates/index_old.html:149 msgid "Select crops or zoom in to see list of forecasts" msgstr "Velg kultur eller zoom inn for å se liste over varsler" #: templatetags/template_helper.py:74 msgid "Information" msgstr "Informasjon" - diff --git a/VIPSWeb/locale/nb/LC_MESSAGES/djangojs.mo b/VIPSWeb/locale/nb/LC_MESSAGES/djangojs.mo index 768f96dc8fa35c7a285073f6e1d69f18c29f51e0..13ac1a0f3b73cc266de576f282c86f96c3d34993 100755 Binary files a/VIPSWeb/locale/nb/LC_MESSAGES/djangojs.mo and b/VIPSWeb/locale/nb/LC_MESSAGES/djangojs.mo differ diff --git a/VIPSWeb/locale/nb/LC_MESSAGES/djangojs.po b/VIPSWeb/locale/nb/LC_MESSAGES/djangojs.po index be018394a374a1f2546c674c98e33edad23091c2..e699bcf54c443aa29f11786042bf09ac8de2391d 100755 --- a/VIPSWeb/locale/nb/LC_MESSAGES/djangojs.po +++ b/VIPSWeb/locale/nb/LC_MESSAGES/djangojs.po @@ -19,7 +19,7 @@ msgid "" msgstr "" "Project-Id-Version: VIPSWeb\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-05-22 11:04-0700\n" +"POT-Creation-Date: 2018-11-22 13:23+0100\n" "PO-Revision-Date: 2014-12-28 15:17+0100\n" "Last-Translator: Tor-Einar Skog <tor-einar.skog@nibio.no>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -33,107 +33,127 @@ msgstr "" msgid "\n" msgstr "" -#: static/js/forecastmap.js:41 -msgid "Source hostname not defined." -msgstr "Kildens hostname er ikke definert" - -#: static/js/forecastmap.js:178 -msgid "No forecasts found for selected crops" -msgstr "Ingen varsler funnet for valgt(e) kultur(er)" - -#: static/js/forecastmap.js:190 -msgid "External resources" -msgstr "Eksterne tjenester" - -#: static/js/frontpage.js:333 +#: static/js/frontpage.js:352 msgid "Remove from my forecasts" msgstr "Fjern fra mine varsler" -#: static/js/frontpage.js:333 +#: static/js/frontpage.js:352 msgid "Add to my forecasts" msgstr "Legg til mine varsler" -#: static/js/frontpage.js:465 +#: static/js/frontpage.js:484 msgid "No forecast available" msgstr "Ingen varsler tilgjengelige" -#: static/js/frontpage.js:467 +#: static/js/frontpage.js:486 msgid "Missing data" msgstr "Data mangler" -#: static/js/frontpage.js:469 +#: static/js/frontpage.js:488 msgid "No risk of infection" msgstr "Ingen infeksjonsrisiko" -#: static/js/frontpage.js:471 +#: static/js/frontpage.js:490 msgid "Medium risk of infection" msgstr "Middels infeksjonsrisiko" -#: static/js/frontpage.js:473 +#: static/js/frontpage.js:492 msgid "High risk of infection" msgstr "Høy infeksjonsrisiko" -#: static/js/frontpage.js:475 +#: static/js/frontpage.js:494 msgid "Invalid forecast status" msgstr "Ikke gyldig varselstatus" +#: static/js/frontpageMap.js:69 +msgid "Source hostname not defined." +msgstr "Kildens hostname er ikke definert" + +#: static/js/frontpageMap.js:280 +msgid "No forecasts found for selected crops" +msgstr "Ingen varsler funnet for valgt(e) kultur(er)" + +#: static/js/frontpageMap.js:292 +msgid "External resources" +msgstr "Eksterne tjenester" + +#: static/js/frontpageMap.js:316 +msgid "Observation(s) found at location" +msgstr "Observasjoner gjort på lokalitet" + +#: static/js/frontpageMap.js:331 +msgid "in" +msgstr "i" + +#: static/js/frontpageMap.js:566 +msgid "Days since observation" +msgstr "Dager siden observasjon" + +#: static/js/frontpageMap.js:569 +msgid "Days" +msgstr "Dager" + +#: static/js/frontpageMap.js:571 +msgid "Older" +msgstr "Eldre" + #: static/js/util.js:235 #: static/js/util.js:264 msgid "Unnamed" msgstr "Uten navn" -#: static/js/validateForm.js:118 +#: static/js/validateForm.js:120 #, javascript-format msgid "%s is not equal to %s" msgstr "%s er ikke lik %s" -#: static/js/validateForm.js:130 +#: static/js/validateForm.js:132 #, javascript-format msgid "%s is not after %s" msgstr "%s er ikke etter %s" -#: static/js/validateForm.js:244 -#: static/js/validateForm.js:262 -#: static/js/validateForm.js:285 -#: static/js/validateForm.js:474 +#: static/js/validateForm.js:247 +#: static/js/validateForm.js:265 +#: static/js/validateForm.js:288 +#: static/js/validateForm.js:477 msgid "Field is required" msgstr "Feltet må fylles ut" -#: static/js/validateForm.js:306 +#: static/js/validateForm.js:309 #, javascript-format msgid "Exceeds max length of %s" msgstr "Overskrider maks lengde på %s" -#: static/js/validateForm.js:322 -#: static/js/validateForm.js:340 +#: static/js/validateForm.js:325 +#: static/js/validateForm.js:343 #, javascript-format msgid "Does not match format %s" msgstr "Stemmer ikke med formatet %s" -#: static/js/validateForm.js:357 -#: static/js/validateForm.js:418 +#: static/js/validateForm.js:360 +#: static/js/validateForm.js:421 msgid "Invalid format" msgstr "Ugyldig format" -#: static/js/validateForm.js:375 +#: static/js/validateForm.js:378 msgid "Number required" msgstr "Verdien må være et tall" -#: static/js/validateForm.js:380 +#: static/js/validateForm.js:383 #, javascript-format msgid "Lower than minimum (%s)" msgstr "Mindre enn minimum (%s)" -#: static/js/validateForm.js:385 +#: static/js/validateForm.js:388 #, javascript-format msgid "Higher than maximum (%s)" msgstr "Høyere enn maksimum (%s)" -#: static/js/validateForm.js:404 +#: static/js/validateForm.js:407 msgid "Missing separator comma" msgstr "Manglende skilletegn (komma)" -#: static/js/validateForm.js:409 +#: static/js/validateForm.js:412 msgid "Too many separator commas" msgstr "For mange skilletegn (komma)" @@ -142,71 +162,78 @@ msgid "Select station" msgstr "Velg stasjon" #: templates/settings.js:13 -#: templates/settings.js:43 +#: templates/settings.js:46 msgid "Sunday" msgstr "Søndag" #: templates/settings.js:13 -#: templates/settings.js:43 +#: templates/settings.js:46 msgid "Monday" msgstr "Mandag" #: templates/settings.js:13 -#: templates/settings.js:43 +#: templates/settings.js:46 msgid "Tuesday" msgstr "Tirsdag" #: templates/settings.js:13 -#: templates/settings.js:43 +#: templates/settings.js:46 msgid "Wednesday" msgstr "Onsdag" #: templates/settings.js:13 -#: templates/settings.js:43 +#: templates/settings.js:46 msgid "Thursday" msgstr "Torsdag" #: templates/settings.js:13 -#: templates/settings.js:43 +#: templates/settings.js:46 msgid "Friday" msgstr "Fredag" #: templates/settings.js:13 -#: templates/settings.js:43 +#: templates/settings.js:46 msgid "Saturday" msgstr "Lørdag" #: templates/settings.js:14 +#: templates/settings.js:47 # Abbreviation for Sunday msgid "Sun" msgstr "Søn" #: templates/settings.js:14 +#: templates/settings.js:47 # Abbreviation for Monday msgid "Mon" msgstr "Man" #: templates/settings.js:14 +#: templates/settings.js:47 # Abbreviation for Tuesday msgid "Tue" msgstr "Tir" #: templates/settings.js:14 +#: templates/settings.js:47 # Abbreviation for Wednesday msgid "Wed" msgstr "Ons" #: templates/settings.js:14 +#: templates/settings.js:47 # Abbreviation for Thursday msgid "Thu" msgstr "Tor" #: templates/settings.js:14 +#: templates/settings.js:47 # Abbreviation for Friday msgid "Fri" msgstr "Fredag" #: templates/settings.js:14 +#: templates/settings.js:47 # Abbreviation for Saturday msgid "Sat" msgstr "Lør" @@ -247,142 +274,154 @@ msgid "Sa" msgstr "Lø" #: templates/settings.js:16 -#: templates/settings.js:42 +#: templates/settings.js:45 msgid "January" msgstr "Januar" #: templates/settings.js:16 -#: templates/settings.js:42 +#: templates/settings.js:45 msgid "February" msgstr "Februar" #: templates/settings.js:16 -#: templates/settings.js:42 +#: templates/settings.js:45 msgid "March" msgstr "Mars" #: templates/settings.js:16 -#: templates/settings.js:42 +#: templates/settings.js:45 msgid "April" msgstr "April" #: templates/settings.js:16 #: templates/settings.js:17 -#: templates/settings.js:42 +#: templates/settings.js:44 +#: templates/settings.js:45 msgid "May" msgstr "Mai" #: templates/settings.js:16 -#: templates/settings.js:42 +#: templates/settings.js:45 msgid "June" msgstr "Juni" #: templates/settings.js:16 -#: templates/settings.js:42 +#: templates/settings.js:45 msgid "July" msgstr "Juli" #: templates/settings.js:16 -#: templates/settings.js:42 +#: templates/settings.js:45 msgid "August" msgstr "August" #: templates/settings.js:16 -#: templates/settings.js:42 +#: templates/settings.js:45 msgid "September" msgstr "September" #: templates/settings.js:16 -#: templates/settings.js:42 +#: templates/settings.js:45 msgid "October" msgstr "Oktober" #: templates/settings.js:16 -#: templates/settings.js:42 +#: templates/settings.js:45 msgid "November" msgstr "November" #: templates/settings.js:16 -#: templates/settings.js:42 +#: templates/settings.js:45 msgid "December" msgstr "Desember" #: templates/settings.js:17 +#: templates/settings.js:44 # Abbreviation for January msgid "Jan" msgstr "Jan" #: templates/settings.js:17 +#: templates/settings.js:44 # Abbreviation for February msgid "Feb" msgstr "Feb" #: templates/settings.js:17 +#: templates/settings.js:44 # Abbreviation for March msgid "Mar" msgstr "Mar" #: templates/settings.js:17 +#: templates/settings.js:44 # Abbreviation for April msgid "Apr" msgstr "Apr" #: templates/settings.js:17 +#: templates/settings.js:44 # Abbreviation for June msgid "Jun" msgstr "Jun" #: templates/settings.js:17 +#: templates/settings.js:44 # Abbreviation for July msgid "Jul" msgstr "Jul" #: templates/settings.js:17 +#: templates/settings.js:44 # Abbreviation for August msgid "Aug" msgstr "Aug" #: templates/settings.js:17 +#: templates/settings.js:44 # Abbreviation for September msgid "Sep" msgstr "Sep" #: templates/settings.js:17 +#: templates/settings.js:44 # Abbreviation for October msgid "Oct" msgstr "Okt" #: templates/settings.js:17 +#: templates/settings.js:44 # Abbreviation for November msgid "Nov" msgstr "Nov" #: templates/settings.js:17 +#: templates/settings.js:44 # Abbreviation for December msgid "Dec" msgstr "Des" -#: templates/settings.js:44 +#: templates/settings.js:48 msgid "Print chart" msgstr "Skriv ut graf" -#: templates/settings.js:45 +#: templates/settings.js:49 msgid "Download PNG image" msgstr "Last ned som PNG" -#: templates/settings.js:46 +#: templates/settings.js:50 msgid "Download JPEG image" msgstr "Last ned som JPEG" -#: templates/settings.js:47 +#: templates/settings.js:51 msgid "Download PDF document" msgstr "Last ned som PDF" -#: templates/settings.js:48 +#: templates/settings.js:52 msgid "Download SVG vector image" msgstr "Last ned som SVG" -#: templates/settings.js:49 +#: templates/settings.js:53 msgid "Chart context menu" msgstr "Grafmeny" diff --git a/VIPSWeb/locale/vi/LC_MESSAGES/django.mo b/VIPSWeb/locale/vi/LC_MESSAGES/django.mo index 17951d7ce5b1ad7c34065fdf9389ec4894d164f2..b8ddca9e6776774e36853a55019b291631a742b9 100755 Binary files a/VIPSWeb/locale/vi/LC_MESSAGES/django.mo and b/VIPSWeb/locale/vi/LC_MESSAGES/django.mo differ diff --git a/VIPSWeb/locale/vi/LC_MESSAGES/django.po b/VIPSWeb/locale/vi/LC_MESSAGES/django.po index 116050518a0295454b791f21982835a886f86ee5..e207d6b0e3e4597720c3a452a2b351b8d5e276f7 100755 --- a/VIPSWeb/locale/vi/LC_MESSAGES/django.po +++ b/VIPSWeb/locale/vi/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-07 15:56+0200\n" +"POT-Creation-Date: 2018-11-22 13:23+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -80,17 +80,17 @@ msgstr "" msgid "More info" msgstr "" -#: templates/index.html:25 +#: templates/index.html:25 templates/index_old.html:25 msgid "Welcome" msgstr "Chào mừng" -#: templates/index.html:42 +#: templates/index.html:42 templates/index_old.html:42 msgid "" "WARNING: We recommend using Chrome on Android handsets. Click OK to install " "Chrome, or Cancel to proceed without installing Chrome." msgstr "" -#: templates/index.html:45 +#: templates/index.html:47 templates/index_old.html:47 msgid "" "WARNING: We suspect you are using Internet Explorer to view this site. VIPS " "is not designed to work with Internet Explorer, you may experience errors " @@ -98,75 +98,80 @@ msgid "" "Google Chrome." msgstr "" -#: templates/index.html:75 +#: templates/index.html:78 templates/index_old.html:78 msgid "Surveillance and first observations" msgstr "" -#: templates/index.html:75 +#: templates/index.html:78 templates/index_old.html:78 msgid "All observations" msgstr "" -#: templates/index.html:81 +#: templates/index.html:84 templates/index_old.html:84 #, fuzzy #| msgid "Messages" msgid "Latest messages" msgstr "Tin nhắn" -#: templates/index.html:81 +#: templates/index.html:84 templates/index_old.html:84 #, fuzzy #| msgid "Messages" msgid "All messages" msgstr "Tin nhắn" -#: templates/index.html:94 +#: templates/index.html:97 templates/index_old.html:97 msgid "Crops" msgstr "mùa gặt" -#: templates/index.html:112 +#: templates/index.html:114 templates/index.html.py:152 +#: templates/index_old.html:147 +msgid "Forecasts" +msgstr "dự báo" + +#: templates/index.html:115 +msgid "Observations" +msgstr "" + +#: templates/index.html:119 templates/index_old.html:115 msgid "High risk of infection" msgstr "Nguy cơ lây nhiễm cao" -#: templates/index.html:113 +#: templates/index.html:120 templates/index_old.html:116 msgid "Medium risk of infection" msgstr "Rủi ro trung bình của nhiễm trùng" -#: templates/index.html:114 +#: templates/index.html:121 templates/index_old.html:117 msgid "No risk of infection" msgstr "Không có nguy cơ lây nhiễm" -#: templates/index.html:115 +#: templates/index.html:122 templates/index_old.html:118 msgid "Missing data" msgstr "Dữ liệu bị mất" -#: templates/index.html:116 +#: templates/index.html:123 templates/index_old.html:119 msgid "No forecast available" msgstr "Không dự báo có sẵn" -#: templates/index.html:137 +#: templates/index.html:145 templates/index_old.html:140 msgid "My forecasts" msgstr "dự báo của tôi" -#: templates/index.html:144 -msgid "Forecasts" -msgstr "dự báo" - -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Sort by" msgstr "Sắp xếp theo" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Weather station" msgstr "Trạm thời tiết" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Pest" msgstr "côn trùng" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Model" msgstr "Kiểu mẫu" -#: templates/index.html:146 +#: templates/index.html:154 templates/index_old.html:149 msgid "Select crops or zoom in to see list of forecasts" msgstr "Chọn cây trồng hoặc phóng to để xem danh sách các dự báo" diff --git a/VIPSWeb/locale/vi/LC_MESSAGES/djangojs.mo b/VIPSWeb/locale/vi/LC_MESSAGES/djangojs.mo index c1ac187538602f593a972be0d06d77d816ffbe67..151ee9280a1603baa3aace2d907c386a901d073d 100755 Binary files a/VIPSWeb/locale/vi/LC_MESSAGES/djangojs.mo and b/VIPSWeb/locale/vi/LC_MESSAGES/djangojs.mo differ diff --git a/VIPSWeb/locale/vi/LC_MESSAGES/djangojs.po b/VIPSWeb/locale/vi/LC_MESSAGES/djangojs.po index 01848b13a7b65f15fc2aff47d2bddfa2d27a4b54..7dd554aa6e86b5a6c0ef38bab17f2051e336baa8 100755 --- a/VIPSWeb/locale/vi/LC_MESSAGES/djangojs.po +++ b/VIPSWeb/locale/vi/LC_MESSAGES/djangojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-05-22 11:04-0700\n" +"POT-Creation-Date: 2018-11-22 13:23+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -22,108 +22,128 @@ msgstr "" msgid "\n" msgstr "" -#: static/js/forecastmap.js:41 -msgid "Source hostname not defined." -msgstr "Nguồn hostname không được định nghĩa." - -#: static/js/forecastmap.js:178 -#, fuzzy -#| msgid "No forecast available" -msgid "No forecasts found for selected crops" -msgstr "Không dự báo có sẵn" - -#: static/js/forecastmap.js:190 -msgid "External resources" -msgstr "" - -#: static/js/frontpage.js:333 +#: static/js/frontpage.js:352 #, fuzzy #| msgid "Remove from my favourites" msgid "Remove from my forecasts" msgstr "Xóa khỏi mục ưa thích của tôi" -#: static/js/frontpage.js:333 +#: static/js/frontpage.js:352 #, fuzzy #| msgid "Add to my favourites" msgid "Add to my forecasts" msgstr "Thêm vào mục yêu thích của tôi" -#: static/js/frontpage.js:465 +#: static/js/frontpage.js:484 msgid "No forecast available" msgstr "Không dự báo có sẵn" -#: static/js/frontpage.js:467 +#: static/js/frontpage.js:486 msgid "Missing data" msgstr "Dữ liệu bị mất" -#: static/js/frontpage.js:469 +#: static/js/frontpage.js:488 msgid "No risk of infection" msgstr "Không có nguy cơ lây nhiễm" -#: static/js/frontpage.js:471 +#: static/js/frontpage.js:490 msgid "Medium risk of infection" msgstr "Rủi ro trung bình của nhiễm trùng" -#: static/js/frontpage.js:473 +#: static/js/frontpage.js:492 msgid "High risk of infection" msgstr "Nguy cơ lây nhiễm cao" -#: static/js/frontpage.js:475 +#: static/js/frontpage.js:494 msgid "Invalid forecast status" msgstr "Tình trạng dự báo không hợp lệ" +#: static/js/frontpageMap.js:69 +msgid "Source hostname not defined." +msgstr "Nguồn hostname không được định nghĩa." + +#: static/js/frontpageMap.js:280 +#, fuzzy +#| msgid "No forecast available" +msgid "No forecasts found for selected crops" +msgstr "Không dự báo có sẵn" + +#: static/js/frontpageMap.js:292 +msgid "External resources" +msgstr "" + +#: static/js/frontpageMap.js:316 +msgid "Observation(s) found at location" +msgstr "" + +#: static/js/frontpageMap.js:331 +msgid "in" +msgstr "" + +#: static/js/frontpageMap.js:566 +msgid "Days since observation" +msgstr "" + +#: static/js/frontpageMap.js:569 +msgid "Days" +msgstr "" + +#: static/js/frontpageMap.js:571 +msgid "Older" +msgstr "" + #: static/js/util.js:235 static/js/util.js:264 msgid "Unnamed" msgstr "Vô danh" -#: static/js/validateForm.js:118 +#: static/js/validateForm.js:120 #, javascript-format msgid "%s is not equal to %s" msgstr "%s không bằng %s" -#: static/js/validateForm.js:130 +#: static/js/validateForm.js:132 #, javascript-format msgid "%s is not after %s" msgstr "%s không phải là sau khi %s" -#: static/js/validateForm.js:244 static/js/validateForm.js:262 -#: static/js/validateForm.js:285 static/js/validateForm.js:474 +#: static/js/validateForm.js:247 static/js/validateForm.js:265 +#: static/js/validateForm.js:288 static/js/validateForm.js:477 msgid "Field is required" msgstr "Lĩnh vực được yêu cầu" -#: static/js/validateForm.js:306 +#: static/js/validateForm.js:309 #, javascript-format msgid "Exceeds max length of %s" msgstr "Vượt quá chiều dài tối đa của %s" -#: static/js/validateForm.js:322 static/js/validateForm.js:340 +#: static/js/validateForm.js:325 static/js/validateForm.js:343 #, javascript-format msgid "Does not match format %s" msgstr "Không phù hợp với định dạng %s" -#: static/js/validateForm.js:357 static/js/validateForm.js:418 +#: static/js/validateForm.js:360 static/js/validateForm.js:421 msgid "Invalid format" msgstr "định dạng không hợp lệ" -#: static/js/validateForm.js:375 +#: static/js/validateForm.js:378 msgid "Number required" msgstr "cần số" -#: static/js/validateForm.js:380 +#: static/js/validateForm.js:383 #, javascript-format msgid "Lower than minimum (%s)" msgstr "Thấp hơn mức tối thiểu (%s)" -#: static/js/validateForm.js:385 +#: static/js/validateForm.js:388 #, javascript-format msgid "Higher than maximum (%s)" msgstr "Cao hơn tối đa (%s)" -#: static/js/validateForm.js:404 +#: static/js/validateForm.js:407 msgid "Missing separator comma" msgstr "Thiếu phân cách bằng dấu phẩy" -#: static/js/validateForm.js:409 +#: static/js/validateForm.js:412 msgid "Too many separator commas" msgstr "Quá nhiều dấu phẩy phân cách" @@ -131,59 +151,59 @@ msgstr "Quá nhiều dấu phẩy phân cách" msgid "Select station" msgstr "Chọn ga" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Sunday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Monday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Tuesday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Wednesday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Thursday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Friday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Saturday" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Sun" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Mon" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Tue" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Wed" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Thu" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Fri" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Sat" msgstr "" @@ -215,118 +235,119 @@ msgstr "" msgid "Sa" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "January" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "February" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "March" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "April" msgstr "" -#: templates/settings.js:16 templates/settings.js:17 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:17 templates/settings.js:44 +#: templates/settings.js:45 msgid "May" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "June" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "July" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "August" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "September" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "October" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "November" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "December" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jan" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Feb" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Mar" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Apr" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jun" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jul" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Aug" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Sep" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Oct" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Nov" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Dec" msgstr "" -#: templates/settings.js:44 +#: templates/settings.js:48 msgid "Print chart" msgstr "" -#: templates/settings.js:45 +#: templates/settings.js:49 msgid "Download PNG image" msgstr "" -#: templates/settings.js:46 +#: templates/settings.js:50 msgid "Download JPEG image" msgstr "" -#: templates/settings.js:47 +#: templates/settings.js:51 msgid "Download PDF document" msgstr "" -#: templates/settings.js:48 +#: templates/settings.js:52 msgid "Download SVG vector image" msgstr "" -#: templates/settings.js:49 +#: templates/settings.js:53 msgid "Chart context menu" msgstr "" diff --git a/VIPSWeb/locale/zh_CN/LC_MESSAGES/django.mo b/VIPSWeb/locale/zh_CN/LC_MESSAGES/django.mo index 8f676f8fded144e674e07b2d0875ecc95c335b1f..c4ebb206224fbc18cc7f7373ff40cf6b4162c4c1 100755 Binary files a/VIPSWeb/locale/zh_CN/LC_MESSAGES/django.mo and b/VIPSWeb/locale/zh_CN/LC_MESSAGES/django.mo differ diff --git a/VIPSWeb/locale/zh_CN/LC_MESSAGES/django.po b/VIPSWeb/locale/zh_CN/LC_MESSAGES/django.po index ccc808897693f6dfd67f35f183144b33e429b8df..73f4e60817cb4b0a84718952bf9cea7b8f88a7dd 100755 --- a/VIPSWeb/locale/zh_CN/LC_MESSAGES/django.po +++ b/VIPSWeb/locale/zh_CN/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-07 15:56+0200\n" +"POT-Creation-Date: 2018-11-22 13:23+0100\n" "PO-Revision-Date: 2016-11-03 14:04+0100\n" "Last-Translator: \n" "Language-Team: \n" @@ -77,11 +77,11 @@ msgstr "" msgid "More info" msgstr "" -#: templates/index.html:25 +#: templates/index.html:25 templates/index_old.html:25 msgid "Welcome" msgstr "欢迎" -#: templates/index.html:42 +#: templates/index.html:42 templates/index_old.html:42 msgid "" "WARNING: We recommend using Chrome on Android handsets. Click OK to install " "Chrome, or Cancel to proceed without installing Chrome." @@ -89,7 +89,7 @@ msgstr "" "警告: 我们在安卓系统手机上推荐使用Chrome。点击OK安装Chrome,点击Cancel继续但" "不安装Chrome。" -#: templates/index.html:45 +#: templates/index.html:47 templates/index_old.html:47 msgid "" "WARNING: We suspect you are using Internet Explorer to view this site. VIPS " "is not designed to work with Internet Explorer, you may experience errors " @@ -97,71 +97,78 @@ msgid "" "Google Chrome." msgstr "" -#: templates/index.html:75 +#: templates/index.html:78 templates/index_old.html:78 msgid "Surveillance and first observations" msgstr "监测和首次观测" -#: templates/index.html:75 +#: templates/index.html:78 templates/index_old.html:78 msgid "All observations" msgstr "所有观测" -#: templates/index.html:81 +#: templates/index.html:84 templates/index_old.html:84 msgid "Latest messages" msgstr "最新新闻" -#: templates/index.html:81 +#: templates/index.html:84 templates/index_old.html:84 msgid "All messages" msgstr "所有新闻" -#: templates/index.html:94 +#: templates/index.html:97 templates/index_old.html:97 msgid "Crops" msgstr "作物" -#: templates/index.html:112 +#: templates/index.html:114 templates/index.html.py:152 +#: templates/index_old.html:147 +msgid "Forecasts" +msgstr "预报" + +#: templates/index.html:115 +#, fuzzy +#| msgid "All observations" +msgid "Observations" +msgstr "所有观测" + +#: templates/index.html:119 templates/index_old.html:115 msgid "High risk of infection" msgstr "感染的高风险" -#: templates/index.html:113 +#: templates/index.html:120 templates/index_old.html:116 msgid "Medium risk of infection" msgstr "感染的中度风险" -#: templates/index.html:114 +#: templates/index.html:121 templates/index_old.html:117 msgid "No risk of infection" msgstr "无感染风险" -#: templates/index.html:115 +#: templates/index.html:122 templates/index_old.html:118 msgid "Missing data" msgstr "缺失数据" -#: templates/index.html:116 +#: templates/index.html:123 templates/index_old.html:119 msgid "No forecast available" msgstr "预报不可获取" -#: templates/index.html:137 +#: templates/index.html:145 templates/index_old.html:140 msgid "My forecasts" msgstr "我的预报" -#: templates/index.html:144 -msgid "Forecasts" -msgstr "预报" - -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Sort by" msgstr "排序方式" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Weather station" msgstr "气象站" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Pest" msgstr "病虫害" -#: templates/index.html:145 +#: templates/index.html:153 templates/index_old.html:148 msgid "Model" msgstr "模型" -#: templates/index.html:146 +#: templates/index.html:154 templates/index_old.html:149 msgid "Select crops or zoom in to see list of forecasts" msgstr "选择作物或放大看预报列表" diff --git a/VIPSWeb/locale/zh_CN/LC_MESSAGES/djangojs.mo b/VIPSWeb/locale/zh_CN/LC_MESSAGES/djangojs.mo index f5641f1e9dd1c6408dee52e74eb7539b0b116226..d56f8b1a4dbc6cdf2e6a4484e661956f8e0b34a2 100755 Binary files a/VIPSWeb/locale/zh_CN/LC_MESSAGES/djangojs.mo and b/VIPSWeb/locale/zh_CN/LC_MESSAGES/djangojs.mo differ diff --git a/VIPSWeb/locale/zh_CN/LC_MESSAGES/djangojs.po b/VIPSWeb/locale/zh_CN/LC_MESSAGES/djangojs.po index 7a5af3b7b04f4006a05975762d476711e83038c6..5e6ca32aeaefc94e05ea70720a9bda468bb7dc18 100755 --- a/VIPSWeb/locale/zh_CN/LC_MESSAGES/djangojs.po +++ b/VIPSWeb/locale/zh_CN/LC_MESSAGES/djangojs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-05-22 11:04-0700\n" +"POT-Creation-Date: 2018-11-22 13:23+0100\n" "PO-Revision-Date: 2016-11-03 15:00+0100\n" "Last-Translator: \n" "Language-Team: \n" @@ -22,102 +22,122 @@ msgstr "" msgid "\n" msgstr "" -#: static/js/forecastmap.js:41 -msgid "Source hostname not defined." -msgstr "主机名来源未确定" - -#: static/js/forecastmap.js:178 -msgid "No forecasts found for selected crops" -msgstr "未发现所选作物的预报" - -#: static/js/forecastmap.js:190 -msgid "External resources" -msgstr "外部资源" - -#: static/js/frontpage.js:333 +#: static/js/frontpage.js:352 msgid "Remove from my forecasts" msgstr "从我的预报中移除" -#: static/js/frontpage.js:333 +#: static/js/frontpage.js:352 msgid "Add to my forecasts" msgstr "添加到我的预报" -#: static/js/frontpage.js:465 +#: static/js/frontpage.js:484 msgid "No forecast available" msgstr "没有可获得的预报" -#: static/js/frontpage.js:467 +#: static/js/frontpage.js:486 msgid "Missing data" msgstr "数据缺失" -#: static/js/frontpage.js:469 +#: static/js/frontpage.js:488 msgid "No risk of infection" msgstr "没有感染的风险" -#: static/js/frontpage.js:471 +#: static/js/frontpage.js:490 msgid "Medium risk of infection" msgstr "中度感染风险" -#: static/js/frontpage.js:473 +#: static/js/frontpage.js:492 msgid "High risk of infection" msgstr "高度感染风险" -#: static/js/frontpage.js:475 +#: static/js/frontpage.js:494 msgid "Invalid forecast status" msgstr "无效的预报状态" +#: static/js/frontpageMap.js:69 +msgid "Source hostname not defined." +msgstr "主机名来源未确定" + +#: static/js/frontpageMap.js:280 +msgid "No forecasts found for selected crops" +msgstr "未发现所选作物的预报" + +#: static/js/frontpageMap.js:292 +msgid "External resources" +msgstr "外部资源" + +#: static/js/frontpageMap.js:316 +msgid "Observation(s) found at location" +msgstr "" + +#: static/js/frontpageMap.js:331 +msgid "in" +msgstr "" + +#: static/js/frontpageMap.js:566 +msgid "Days since observation" +msgstr "" + +#: static/js/frontpageMap.js:569 +msgid "Days" +msgstr "" + +#: static/js/frontpageMap.js:571 +msgid "Older" +msgstr "" + #: static/js/util.js:235 static/js/util.js:264 msgid "Unnamed" msgstr "未命名的" -#: static/js/validateForm.js:118 +#: static/js/validateForm.js:120 #, javascript-format msgid "%s is not equal to %s" msgstr "%s 不等于 %s" -#: static/js/validateForm.js:130 +#: static/js/validateForm.js:132 #, javascript-format msgid "%s is not after %s" msgstr "%s 不在 %s 之后" -#: static/js/validateForm.js:244 static/js/validateForm.js:262 -#: static/js/validateForm.js:285 static/js/validateForm.js:474 +#: static/js/validateForm.js:247 static/js/validateForm.js:265 +#: static/js/validateForm.js:288 static/js/validateForm.js:477 msgid "Field is required" msgstr "需要的域" -#: static/js/validateForm.js:306 +#: static/js/validateForm.js:309 #, javascript-format msgid "Exceeds max length of %s" msgstr "超过最大长度的 %s" -#: static/js/validateForm.js:322 static/js/validateForm.js:340 +#: static/js/validateForm.js:325 static/js/validateForm.js:343 #, javascript-format msgid "Does not match format %s" msgstr "不符合格式 %s" -#: static/js/validateForm.js:357 static/js/validateForm.js:418 +#: static/js/validateForm.js:360 static/js/validateForm.js:421 msgid "Invalid format" msgstr "无效格式" -#: static/js/validateForm.js:375 +#: static/js/validateForm.js:378 msgid "Number required" msgstr "需要的数字" -#: static/js/validateForm.js:380 +#: static/js/validateForm.js:383 #, javascript-format msgid "Lower than minimum (%s)" msgstr "低于最小值 (%s)" -#: static/js/validateForm.js:385 +#: static/js/validateForm.js:388 #, javascript-format msgid "Higher than maximum (%s)" msgstr "高于最大值 (%s)" -#: static/js/validateForm.js:404 +#: static/js/validateForm.js:407 msgid "Missing separator comma" msgstr "缺少分割逗号" -#: static/js/validateForm.js:409 +#: static/js/validateForm.js:412 msgid "Too many separator commas" msgstr "太多分割逗号" @@ -125,59 +145,59 @@ msgstr "太多分割逗号" msgid "Select station" msgstr "选择站点" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Sunday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Monday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Tuesday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Wednesday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Thursday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Friday" msgstr "" -#: templates/settings.js:13 templates/settings.js:43 +#: templates/settings.js:13 templates/settings.js:46 msgid "Saturday" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Sun" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Mon" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Tue" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Wed" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Thu" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Fri" msgstr "" -#: templates/settings.js:14 +#: templates/settings.js:14 templates/settings.js:47 msgid "Sat" msgstr "" @@ -209,118 +229,119 @@ msgstr "" msgid "Sa" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "January" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "February" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "March" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "April" msgstr "" -#: templates/settings.js:16 templates/settings.js:17 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:17 templates/settings.js:44 +#: templates/settings.js:45 msgid "May" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "June" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "July" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "August" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "September" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "October" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "November" msgstr "" -#: templates/settings.js:16 templates/settings.js:42 +#: templates/settings.js:16 templates/settings.js:45 msgid "December" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jan" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Feb" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Mar" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Apr" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jun" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Jul" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Aug" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Sep" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Oct" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Nov" msgstr "" -#: templates/settings.js:17 +#: templates/settings.js:17 templates/settings.js:44 msgid "Dec" msgstr "" -#: templates/settings.js:44 +#: templates/settings.js:48 msgid "Print chart" msgstr "" -#: templates/settings.js:45 +#: templates/settings.js:49 msgid "Download PNG image" msgstr "" -#: templates/settings.js:46 +#: templates/settings.js:50 msgid "Download JPEG image" msgstr "" -#: templates/settings.js:47 +#: templates/settings.js:51 msgid "Download PDF document" msgstr "" -#: templates/settings.js:48 +#: templates/settings.js:52 msgid "Download SVG vector image" msgstr "" -#: templates/settings.js:49 +#: templates/settings.js:53 msgid "Chart context menu" msgstr "" diff --git a/VIPSWeb/static/css/vipsweb.css b/VIPSWeb/static/css/vipsweb.css index 176bcf58d35f3223b357c13fb80a4461fd726947..a4f48e896b7987cc4d22001dc60cc3c351e724b5 100755 --- a/VIPSWeb/static/css/vipsweb.css +++ b/VIPSWeb/static/css/vipsweb.css @@ -154,7 +154,7 @@ div.messages_illustration_caption{ /* Styles for OpenLayers forecast map */ #map{ - /*position: relative;*/ + position: relative; width: 100%; } /* On mobile (small) devices: Limit the height of @@ -178,6 +178,7 @@ div.messages_illustration_caption{ { #map { max-height: 300px !important; } #warningLegend {display: none;} + #observationLegend{display: none;} } @media (max-width: 768px) and (max-height: 400px) @@ -188,6 +189,7 @@ div.messages_illustration_caption{ @media (max-width: 500px) { #warningLegend {display: none;} + #observationLegend{display: none;} #siteTitle {display: none;} #loginAndLanguageInfo { top: 70px !important; @@ -626,7 +628,13 @@ tbody.forecastSummaryRowGroup tr:not(:first-child){ cursor: pointer; } -#warningLegend, #cropList +#observationLegendHeading { + margin-left: 12px; + margin-right: 10px; + font-weight:bold; +} + +#warningLegend, #observationLegend, #cropList, #mapLayerSelector { position: absolute; @@ -639,6 +647,7 @@ tbody.forecastSummaryRowGroup tr:not(:first-child){ font-size: small; z-index: 100; border: 1px solid #aaaaaa; + border-radius: 5px;; } @@ -688,6 +697,13 @@ tbody.forecastSummaryRowGroup tr:not(:first-child){ list-style-image: url("icons/station_icon_status_1.png"); } +#observationLegend ul { + list-style-type: none; + margin-left: 0px; + padding: 0px 0px 5px 15px; + +} + td.tableCellWarningStatus_0 {background-color: #C9C9C9 !important;} td.tableCellWarningStatus_1 {background-color: #4DA0FE !important;} td.tableCellWarningStatus_2 {background-color: #6FC49A !important;} @@ -755,6 +771,13 @@ table.messageTable tr, table.messageTable td padding: 0px 15px; } +#mapLayerSelector +{ + top: 7px; + left: 41px; + padding: 5px 10px; +} + .favouriteToggle{ color: #008136; cursor:pointer; diff --git a/VIPSWeb/static/js/frontpage.js b/VIPSWeb/static/js/frontpage.js index a9eff2e1a95abc4e21ee194facf0493894bde38f..f1a2e034d39af3fb56a5c429ffc15ff14e03cf3d 100755 --- a/VIPSWeb/static/js/frontpage.js +++ b/VIPSWeb/static/js/frontpage.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 NIBIO <http://www.nibio.no/>. + * Copyright (c) 2018 NIBIO <http://www.nibio.no/>. * * This file is part of VIPSWeb. * VIPSWeb is free software: you can redistribute it and/or modify @@ -19,7 +19,7 @@ /** * Interactive stuff on the VIPSWeb front page. Code for - * map is found in ./forecastmap.js + * map is found in ./frontpagemap.js * * Depending on /currentLanguage.js and /settings.js * @@ -27,6 +27,7 @@ */ + /** * Which crops have been selected? Checks the form * @returns @@ -63,15 +64,24 @@ function getSelectedCropIds() var allObservations; var filteredObservations; -function cacheObservations() +/** + * Downloads all the observations that the user has authorization to view + * @returns + */ +function cacheObservations(callback) { + var systemTime = moment().subtract(settings.systemTimeOffsetMonths,"months"); + var from = systemTime.format("YYYY") + "-01-01"; // XXXX-01-01 + var to = systemTime.format("YYYY-MM-DD"); + var uuidParam = settings.userUuid != null ? "&userUUID=" + settings.userUuid : ""; //$.getJSON(settings.vipslogicProtocol + "://" + settings.vipslogicServerName + "/rest/observation/broadcast/list/" + settings.vipsOrganizationId, function( json ) { - $.getJSON("/vipslogicproxy/rest/observation/broadcast/list/" + settings.vipsOrganizationId + "?season=" + getCurrentYear(), function( json ) { + $.getJSON( "/vipslogicproxy/rest/observation/list/filter/" + settings.vipsOrganizationId + "?from=" + from + "&to=" + to + uuidParam , function( json ) { + //$.getJSON("/vipslogicproxy/rest/observation/broadcast/list/" + settings.vipsOrganizationId + "?season=" + getCurrentYear(), function( json ) { allObservations = json; //console.log(allObservations); filterObservations(); - } - ); + renderObservationFeatures(); + }); } /** @@ -102,10 +112,20 @@ function renderObservationMessages() var messagesLeftColTBody = document.getElementById("messagesLeftColTBody"); messagesLeftColTBody.innerHTML = ""; - for(var i=0;i<Math.min(3,filteredObservations.length);i++) // Max 4 latest messages + var numberOfRenderedMessages = 0; + for(var i=0;i<filteredObservations.length;i++) // Max 3 latest messages { var observation = filteredObservations[i]; - messagesLeftColTBody.innerHTML += '<tr>\n<td class="dateCell">' + getStandardFormattedDate(observation["timeOfObservation"]) + '</td><td><a href="/observations/' + observation["observationId"] + '">' + observation["observationHeading"] + '</a></td>\n</tr>'; + if(observation.broadcastMessage) + { + messagesLeftColTBody.innerHTML += '<tr>\n<td class="dateCell">' + getStandardFormattedDate(observation["timeOfObservation"]) + '</td><td><a href="/observations/' + observation["observationId"] + '">' + observation["observationHeading"] + '</a></td>\n</tr>'; + numberOfRenderedMessages++; + if(numberOfRenderedMessages >= 3) + { + break; + } + } + } } @@ -725,6 +745,32 @@ function storeSelectedCropCategoryIds() storeLocalSettings({"selectedCropCategoryIds":getSelectedCropCategoryIds()}); } +function restoreSelectedMapLayer() +{ + var selectedMapLayer = getLocalSettings(["selectedMapLayer"]) != null ? getLocalSettings(["selectedMapLayer"])["selectedMapLayer"] : FORECAST_LAYER; + //console.info("selectedMapLayer=" + selectedMapLayer); + //console.info(selectedMapLayer); + document.getElementById("radioForecastLayer").checked = selectedMapLayer == FORECAST_LAYER; + document.getElementById("radioObservationLayer").checked = selectedMapLayer == OBSERVATION_LAYER; +} + +function getSelectedMapLayer() +{ + // Check if preselection has been done + //console.info((document.getElementById("radioForecastLayer").checked & document.getElementById("radioForecastLayer").checked)); + if(!(document.getElementById("radioForecastLayer").checked & document.getElementById("radioForecastLayer").checked)) + { + restoreSelectedMapLayer(); + } + + return document.getElementById("radioForecastLayer").checked ? FORECAST_LAYER : OBSERVATION_LAYER; +} + +function storeSelectedMapLayer(layerId) +{ + storeLocalSettings({"selectedMapLayer":layerId}); +} + /** * Getting selected crop Ids from persistence layer * TODO: Add server as persistence layer when login system is diff --git a/VIPSWeb/static/js/frontpageMap.js b/VIPSWeb/static/js/frontpageMap.js index 6199bd4035bbce9fcc8dcdf7eb61cb80829eb8da..0127190650f53db342400f6498daff7fd5555d52 100755 --- a/VIPSWeb/static/js/frontpageMap.js +++ b/VIPSWeb/static/js/frontpageMap.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 NIBIO <http://www.nibio.no/>. + * Copyright (c) 2018 NIBIO <http://www.nibio.no/>. * * This file is part of VIPSWeb. * VIPSWeb is free software: you can redistribute it and/or modify @@ -22,19 +22,47 @@ * @author Tor-Einar Skog <tor-einar.skog@nibio.no> */ -// Couple of global elements +/* ----------------------- Global elements ------------------- */ var map; +var FORECAST_LAYER = "forecastLayer"; +var OBSERVATION_LAYER = "observationLayer"; +//Using Bootstrap's popover plugin. See http://getbootstrap.com/javascript/#popovers +var poiDetails = $("#popover"); +//Using Bootstrap's tooltip plugin. See http://getbootstrap.com/javascript/#tooltips +var poiTitle = $('#tooltip'); +poiTitle.tooltip({ + animation: false, + trigger: 'manual', + html: false +}); +//Layer for popup +var popOverlay = new ol.Overlay({ + element: document.getElementById("popover") +}); +//State variable +var currentClickedFeature = false; +var maxMapZoomForObservations = 7; +var maxMapZoomForForecasts = 10; + +/* ------------- Forecasts related ------------------------------------- */ var forecastLayer; +/* ------------------------------------------------------------------------ */ + +/* ------------- Observations related ------------------------------------- */ +//var allObservations = []; // Populated asynchronously +var drawnFeatures = []; // Populated asynchronously var observationLayer; +var currentDateInMillis; +/* ------------------------------------------------------------------------ */ /** - * Initializes the forecast map. + * Initializes the front page map, including layers for forecasts and observations * @param {ol.Coordinate} lonLat - coordinates for the map's center (WGS84) * @param {int} zoom - the zoom level (1-15, 1 is world wide view, 15 is greatest zoom) * @param {string} mapAttribution - The text in the corner of the map giving credits where it's due */ -function initForecastMap(lonLat, zoomLevel, mapAttribution) +function initFrontpageMap(lonLat, zoomLevel, mapAttribution) { if(settings.vipslogicServerName === undefined) { @@ -42,7 +70,7 @@ function initForecastMap(lonLat, zoomLevel, mapAttribution) return; } - // Background layer is OpenStreetMap + // ---------- Background layer is OpenStreetMap -------------- var backgroundLayer = new ol.layer.Tile({ source: new ol.source.OSM({ attributions: [ @@ -62,41 +90,52 @@ function initForecastMap(lonLat, zoomLevel, mapAttribution) }) }) */ - // Fetching KML from VIPSLogic - // Filtering with crop ids + // ----------- The forecast layer is a KML layer, pure and simple -------- forecastLayer = new ol.layer.Vector({ - source: new ol.source.Vector({ - //url: settings.vipslogicProtocol + "://" + settings.vipslogicServerName + "/rest/forecastresults/aggregate/" + settings.vipsOrganizationId + "?" + buildPathParamString("cropCategoryId", getSelectedCropCategoryIds()), - url: "/vipslogicproxy/rest/forecastresults/aggregate/" + settings.vipsOrganizationId + "?" + buildPathParamString("cropCategoryId", getSelectedCropCategoryIds()), - format: new ol.format.KML({"extractAttributes":true}), - projection: ol.proj.get('EPSG:3857') - }) + source: null }); - // GEOJSON? - //observationLayer = - - - // Layer for popup - var popOverlay = new ol.Overlay({ - element: document.getElementById("popover") - }); + // ------------ The observations layer (GeoJSON) --------------------- + currentDateInMillis = moment().subtract(settings.systemTimeOffsetMonths,"months").format("X") * 1000; // Reference for coloring the observations + var observationFeatures = new ol.Collection(); // Starting on empty + initAgeStyles(); + observationLayer = new ol.layer.Vector({ + source: new ol.source.Vector({ + features: observationFeatures + }), + style: getCorrectStyle // Defined further down + }); + initObservationLegend(); + // Creating the map map = new ol.Map({ target: 'map', - layers: [backgroundLayer, forecastLayer], + layers: [backgroundLayer, forecastLayer, observationLayer], overlays: [popOverlay], renderer: 'canvas' }); - + // Setting zoom and center for the map (need to do this after creating map. so that we can transform our // center to correct map projection) var view = new ol.View({ center: ol.proj.transform(lonLat, 'EPSG:4326', map.getView().getProjection().getCode()), - zoom:zoomLevel + zoom:zoomLevel, + maxZoom: getSelectedMapLayer() == FORECAST_LAYER ? maxMapZoomForForecasts : maxMapZoomForObservations }); + + // Getting data and rendering the selected layer + selectMapLayer(getSelectedMapLayer()); + /*if(getSelectedMapLayer() == FORECAST_LAYER) + { + updateForecastLayers(); + } + else + { + initObservationLayer(); + }*/ + map.setView(view); // Attempting to adjust map to small screen @@ -105,144 +144,35 @@ function initForecastMap(lonLat, zoomLevel, mapAttribution) var zoom = map.getView().getZoom(); map.getView().setZoom(zoom -1 ); } + + // ---------- MAP EVENTS ------------ + // On mouseover, display name of POI in tooltip + // TODO: Does this work? Doesn't seem so + map.on('mousemove', function(evt) { + var pixel = map.getEventPixel(evt.originalEvent); + displayFeatureName(pixel); + }); - // Using Bootstrap's tooltip plugin. See http://getbootstrap.com/javascript/#tooltips - var poiTitle = $('#tooltip'); - poiTitle.tooltip({ - animation: false, - trigger: 'manual', - html: false - }); - - // Using Bootstrap's popover plugin. See http://getbootstrap.com/javascript/#popovers - var poiDetails = $("#popover"); - - // State cariable - var currentClickedFeature = false; - - // Initiated on mouseover - // Displays station name in a tooltip box - var displayFeatureName = function(pixel) { - poiTitle.css({ - left: pixel[0] + 'px', - top: (pixel[1] - 15) + 'px' - }); - var feature = map.forEachFeatureAtPixel(pixel, function(feature,layer){ - return feature; - }); - var title = poiTitle.data("bs.tooltip").options.title; - if (feature && feature != currentClickedFeature) { - poiTitle.tooltip('hide'); - poiTitle.data("bs.tooltip").options.title = feature.get("name"); - poiTitle.tooltip('show'); - } else - { - if(! feature) - { - poiTitle.tooltip('hide'); - } - - } - - }; - - // Error handling when collecting forecast information from server fails - var handleAjaxError = function(jqXHR,textStatus,errorThrown){ - var message = jqXHR.responseJSON !== undefined ? jqXHR.responseJSON.message : jqXHR.responseText; - alert ("Error: " + message); - }; - - // Displays popup with forecasts for a given station - // (if there is a station where the click event is fired) - var displayFeatureDetails = function(pixel, coordinate) { - var feature = map.forEachFeatureAtPixel(pixel, function(feature,layer){ - return feature; - }); - - if (feature) { - // Position the popup, and hiding it - // Resetting information from (possible) former popups - var geometry = feature.getGeometry(); - popOverlay.setPosition(geometry.getCoordinates()); - poiTitle.tooltip('hide'); - poiDetails.popover('destroy'); - currentClickedFeature = feature; - var summaries = getForecastSummariesForPoi(feature.getId()); - var summariesHTML = ""; - if(summaries.length > 0) - { - summariesHTML = "<table class=\"table-responsive\" id=\"forecastSummariesPopoverTable\">" + - getforecastSummariesTableHTML(summaries,true) - + "</table>"; - } - else - { - summariesHTML = "<p>" + gettext("No forecasts found for selected crops") + "</p>"; - } - var externalResourceHTML = ""; - var externalResources = getExternalResourcesForPoi(feature.getId()); - for(var i in externalResources){ - var resourceLink = externalResources[i].externalResourceUrl; - var resourceName = externalResources[i].externalResource.name; - externalResourceHTML += "<li><a href=\"" + resourceLink + "\" target=\"new\">" + resourceName + "</a></li>"; - } - - if(externalResourceHTML != "") - { - externalResourceHTML = "<h3>" + gettext("External resources") + "</h2><ul class=\"popoverExternalResource\">" - + externalResourceHTML - + "</ul>"; - } - - //console.log(feature); - poiDetails.popover({ - animation: true, - trigger: 'manual', - html: true, - placement: "auto top", - title: feature.get("stationName") + (feature.get("infoUri") != undefined ? - " <a href='" + feature.get("infoUri") + "' target='new'><span class='wi wi-day-cloudy'></span></a>" - :""), - content: summariesHTML + externalResourceHTML - }); - - poiDetails.popover('show'); - - - } else { - currentClickedFeature = null; - poiDetails.popover('destroy'); - } - - }; + // On click, display forecasts in popup + map.on('singleclick', function(evt) { + var pixel = map.getEventPixel(evt.originalEvent); + var coordinate = map.getEventCoordinate(evt.originalEvent); + displayFeatureDetails(pixel, coordinate); + }); + map.on('moveend', function(evt) { + updateForecastSummaries(); + // Store map settings + var centerCoordinate = ol.proj.transform(map.getView().getCenter(), map.getView().getProjection().getCode(),'EPSG:4326'); + var settings = { + "longitude": centerCoordinate[0], + "latitude": centerCoordinate[1], + "zoomLevel": getCurrentMapZoomLevel() + }; + storeLocalSettings(settings); + }); - // On mouseover, display name of POI in tooltip - map.on('mousemove', function(evt) { - var pixel = map.getEventPixel(evt.originalEvent); - displayFeatureName(pixel); - }); - - // On click, display forecasts in popup - map.on('singleclick', function(evt) { - var pixel = map.getEventPixel(evt.originalEvent); - displayFeatureDetails(pixel); - }); - - map.on('moveend', function(evt) { - updateForecastSummaries(); - // Store map settings - var centerCoordinate = ol.proj.transform(map.getView().getCenter(), map.getView().getProjection().getCode(),'EPSG:4326'); - var settings = { - "longitude": centerCoordinate[0], - "latitude": centerCoordinate[1], - "zoomLevel": getCurrentMapZoomLevel() - }; - storeLocalSettings(settings); - }); - - //For testing: adding mouseposition geographic control /* var mousePositionControl = new ol.control.MousePosition({ @@ -256,6 +186,200 @@ function initForecastMap(lonLat, zoomLevel, mapAttribution) } +/** + * Error handling when collecting forecast information from server fails + * TODO: Not in use! + */ +var handleAjaxError = function(jqXHR,textStatus,errorThrown){ + var message = jqXHR.responseJSON !== undefined ? jqXHR.responseJSON.message : jqXHR.responseText; + alert ("Error: " + message); +}; + +/** + * Initiated on mouseover (? doesn't seem like it does) + * Displays station name in a tooltip box + */ +var displayFeatureName = function(pixel) { + poiTitle.css({ + left: pixel[0] + 'px', + top: (pixel[1] - 15) + 'px' + }); + var feature = map.forEachFeatureAtPixel(pixel, function(feature,layer){ + return feature; + }); + var title = poiTitle.data("bs.tooltip").options.title; + if (feature && feature != currentClickedFeature) { + poiTitle.tooltip('hide'); + poiTitle.data("bs.tooltip").options.title = feature.get("name"); + poiTitle.tooltip('show'); + } + else + { + if(! feature) + { + poiTitle.tooltip('hide'); + } + } + +}; + +/** + * Displays a feature(s) detail popup IF there is at least one feature where the user clicked + * @param pixel the point on the map that was clicked + * @param coordinate + */ +var displayFeatureDetails = function(pixel, coordinate) { + // Collect the features + var features = []; + map.forEachFeatureAtPixel(pixel, function(feature,layer){ + features.push(feature) + }); + + if(features.length > 0) + { + if(getSelectedMapLayer() == FORECAST_LAYER) + { + displayForecastDetails(features, coordinate); + } + else + { + displayObservationDetails(features, coordinate); + } + } + else + { + currentClickedFeature = null; + poiDetails.popover('destroy'); + } +}; + +/** + * Displays details about a forecast + */ +var displayForecastDetails = function(features, coordinate){ + // Assuming that there is only one feature being clicked + var feature = features[0]; + + // Position the popup, and hiding it + // Resetting information from (possible) former popups + var geometry = feature.getGeometry(); + popOverlay.setPosition(coordinate); + poiTitle.tooltip('hide'); + poiDetails.popover('destroy'); + currentClickedFeature = feature; + var summaries = getForecastSummariesForPoi(feature.getId()); + var summariesHTML = ""; + if(summaries.length > 0) + { + summariesHTML = "<table class=\"table-responsive\" id=\"forecastSummariesPopoverTable\">" + + getforecastSummariesTableHTML(summaries,true) + + "</table>"; + } + else + { + summariesHTML = "<p>" + gettext("No forecasts found for selected crops") + "</p>"; + } + var externalResourceHTML = ""; + var externalResources = getExternalResourcesForPoi(feature.getId()); + for(var i in externalResources){ + var resourceLink = externalResources[i].externalResourceUrl; + var resourceName = externalResources[i].externalResource.name; + externalResourceHTML += "<li><a href=\"" + resourceLink + "\" target=\"new\">" + resourceName + "</a></li>"; + } + + if(externalResourceHTML != "") + { + externalResourceHTML = "<h3>" + gettext("External resources") + "</h2><ul class=\"popoverExternalResource\">" + + externalResourceHTML + + "</ul>"; + } + + //console.log(feature); + poiDetails.popover({ + animation: true, + trigger: 'manual', + html: true, + placement: "auto top", + title: feature.get("stationName") + (feature.get("infoUri") != undefined ? + " <a href='" + feature.get("infoUri") + "' target='new'><span class='wi wi-day-cloudy'></span></a>" + :""), + content: summariesHTML + externalResourceHTML + }); + + poiDetails.popover('show'); +}; + +/** + * Displays details about one or more observations + */ +var displayObservationDetails = function(features, coordinate) { + var titleHTML = gettext("Observation(s) found at location"); + var observationsHTML = "<ul style='list-style-type: none;margin: 0; padding: 0;'>"; + + var observations = []; + for(var i in features) + { + observations.push(getObservation(parseInt(features[i].get("observationId")))); + } + // Sort observations in descending order + observations.sort(function(a,b){ + return a.timeOfObservation >= b.timeOfObservation ? -1 : 1; + }); + for(var i in observations){ + var observation = observations[i]; + var obsDate = moment(observation.timeOfObservation).format("YYYY-MM-DD"); + observationsHTML += "<li><i style='color: " + getObservationAgeColor(observation.timeOfObservation) + ";' class='fa fa-square' aria-hidden='true'></i> [" + obsDate + "] <a href='/observations/" + observation.observationId + "' target='new'>" + observation.organismName + " " + gettext ("in") + " " + observation.cropOrganismName.toLowerCase() + "</a></li>"; + } + observationsHTML += "</ul>"; + //console.info(features[0].get("observationId")); + //console.info(coordinate); + // Removing whatever was visible previously + poiTitle.tooltip('hide'); + poiDetails.popover('destroy'); + // Placing and displaying the overlay + popOverlay.setPosition(coordinate); + poiDetails.popover({ + animation: true, + trigger: 'manual', + html: true, + placement: "auto top", + title: titleHTML, + content: observationsHTML + }); + + poiDetails.popover('show'); +}; + +/** + * Given the layer Id, displays the correct map layer + * @param layerId the Id (string) of the layer to be selected + */ +var selectMapLayer = function(layerId) +{ + // Remove feature popup + currentClickedFeature = null; + poiDetails.popover('destroy'); + + // Adjust zoom if necessary + map.getView().setMaxZoom(layerId == FORECAST_LAYER ? maxMapZoomForForecasts : maxMapZoomForObservations); + + // Set layer and legend visibility + forecastLayer.setVisible(layerId == FORECAST_LAYER); // Constant at top of this file + document.getElementById("warningLegend").style.display = layerId == FORECAST_LAYER ? "block" : "none"; + observationLayer.setVisible(layerId == OBSERVATION_LAYER); // Constant at top of this file + document.getElementById("observationLegend").style.display = layerId == OBSERVATION_LAYER ? "block" : "none"; + + // Store selection for later sessions + storeSelectedMapLayer(layerId); + + // Init features for selected layer (if it hasn't already been done) + if(layerId == FORECAST_LAYER && (forecastLayer == null || forecastLayer == undefined || forecastLayer.getSource() == null)) + { + updateForecastLayers(); + } + +} + /** * * @returns the current zoom level of the map @@ -268,7 +392,7 @@ function getCurrentMapZoomLevel() /** - * Loads new KML info from VIPSLogic + * Loads new KML info from backend, renders forecast layer */ function updateForecastLayers() { @@ -279,12 +403,7 @@ function updateForecastLayers() { cropCategoryIdStr = "&cropCategoryId=-1"; } - /*forecastLayer = new ol.layer.Vector({ - source: new ol.source.KML({ - url: settings.vipslogicProtocol + "://" + settings.vipslogicServerName + "/rest/forecastresults/aggregate/" + settings.vipsOrganizationId + "?" + cropOrganismIdStr, - projection: "EPSG:3857" - }) - });*/ + forecastLayer = new ol.layer.Vector({ source: new ol.source.Vector({ //url: settings.vipslogicProtocol + "://" + settings.vipslogicServerName + "/rest/forecastresults/aggregate/" + settings.vipsOrganizationId + "?" + cropCategoryIdStr, @@ -293,10 +412,44 @@ function updateForecastLayers() projection: ol.proj.get('EPSG:3857') }) }); - //forecastLayer.setStyle(pointStyleFunction); + forecastLayer.setVisible(getSelectedMapLayer() == FORECAST_LAYER); // Constant at top of this file map.addLayer(forecastLayer); } + + + + +var renderObservationFeatures = function(){ + var geoJSON = {"type":"FeatureCollection","features":[]}; + for(var i=0;i<filteredObservations.length;i++) + { + var observation = filteredObservations[i]; + var obsFeatures = null; + if(!observation.locationIsPrivate && observation.geoInfo !== null && observation.geoInfo.trim() !== "") + { + obsFeatures = JSON.parse(observation.geoInfo).features; + } + else + { + continue; + } + + for(var j=0; j<obsFeatures.length; j++) + { + geoJSON.features.push(obsFeatures[j]); + } + } + + var format = new ol.format.GeoJSON(); + drawnfeatures = format.readFeatures(geoJSON, { + dataProjection: 'EPSG:4326', + featureProjection: map.getView().getProjection().getCode() + }); + observationLayer.getSource().clear(); + observationLayer.getSource().addFeatures(drawnfeatures); +} + /** * * @param coordinate [longitude,latitude] @@ -309,3 +462,187 @@ function isCoordinateOnVisibleMap(coordinate, projection){ return ol.extent.containsCoordinate(mapExtent,coordinate); } +/** + * Get the correct style for an observation feature, based on observation age + * @param feature the ol feature object + */ +var getCorrectStyle = function(feature){ + var age = getObservationFeatureRelativeAge(feature); + if(age == null) + { + return; + } + if(age < 0) + { + return styleInvisible; + } + for(var i in ageStyles) + { + if(age < ageStyles[i][0]) + { + return ageStyles[i][1]; + } + } + return styleOld; +}; + +/** + * How many days old is the observation connected to this map feature? + */ +var getObservationFeatureRelativeAge = function(feature) +{ + var observation = getObservation(feature.get("observationId")); // TODO include observations timestamp in feature. Speeds things up + if(observation == null) + { + //console.info("No obs with id=" + feature.get("observationId")); + return null; // Means invisible + } + return getDaysSince(observation.timeOfObservation); +}; + +/** + * Using current system time, counting days since this day + */ +var getDaysSince = function(JSONDate) +{ + return Math.floor((currentDateInMillis - getUnixTimestampFromJSON(JSONDate)) / (1000 * 60 * 60 * 24)) + 1; +}; + +/** + * Pull the observation from global list + */ +var getObservation = function(observationId) +{ + for(var i=0; i<allObservations.length;i++) + { + if(allObservations[i].observationId == parseInt(observationId)) + { + return allObservations[i]; + } + } + //console.info("Could not find observation with ID=" + observationId) + return null; +}; + +/** + * Using config at top of file for dynamic style creation + */ +var initAgeStyles = function(){ + ageStyles = []; + for(var i in ageColors) + { + ageStyles.push([ + ageColors[i][0], + new ol.style.Style({ + fill: new ol.style.Fill({ + color: ageColors[i][1].replace("1.0","0.2") + }), + stroke: new ol.style.Stroke({ + color: ageColors[i][1], + width: 2 + }), + image: new ol.style.Circle({ + radius: 6, + fill: new ol.style.Fill({ + color: ageColors[i][1] + }), + stroke: new ol.style.Stroke({ + color: '#000000', + width: 1 + }) + }) + }) + ]); + } +}; + +/** + * Dynamic init of the observation legend + * @returns + */ +function initObservationLegend() +{ + var lBox = document.getElementById("observationLegend"); + var html = "<div id='observationLegendHeading'>" + gettext("Days since observation") + "</div><ul>"; + for(var i in ageColors) + { + html += '<li><i style="color: ' + ageColors[i][1] + ';" class="fa fa-square" aria-hidden="true"></i> ' + (i > 0 ? ageColors[i-1][0] + 1 : '0') + '-' + ageColors[i][0] + ' ' + gettext("Days").toLowerCase() + ' </li>'; + } + html += '<li><i style="color: ' + styleOld.getImage().getFill().getColor() + ';" class="fa fa-square" aria-hidden="true"></i> ' + gettext("Older") + '</li>'; + html += "</ul>"; + lBox.innerHTML = html; +} + +/** + * Using configured ageColors + * @param aDate + * @returns + */ +function getObservationAgeColor(aDate) +{ + var age = getDaysSince(aDate); + if(age == null) + { + return; + } + if(age < 0) + { + return styleInvisible.getFill().getColor(); + } + for(var i in ageColors) + { + if(age < ageColors[i][0]) + { + return ageColors[i][1]; + } + } + return styleOld.getFill().getColor(); +} + +/** + * Default coloring + * @type Array + */ +var ageColors = [ + [7, 'rgba(233, 13, 0, 1.0)'], // Red #e90d00 + [30, 'rgba(253, 202, 00, 1.0)'], // Orange #fdca00 + [60, 'rgba(0, 120, 253, 1.0)'], // Blue #0078fd +]; + +//Global configs +var styleOld = + new ol.style.Style({ + fill: new ol.style.Fill({ + color: 'rgba(173, 173, 173, 0.5)' + }), + stroke: new ol.style.Stroke({ + color: '#000000', + width: 1 + }), + image: new ol.style.Circle({ + radius: 6, + fill: new ol.style.Fill({ + color: '#adadad' + }), + stroke: new ol.style.Stroke({ + color: '#000000', + width: 1 + }) + }) + }); + var styleInvisible = new ol.style.Style({ + fill: new ol.style.Fill({ + color: 'rgba(0, 0, 0, 0.0)' + }), + stroke: new ol.style.Stroke({ + color: 'rgba(0, 0, 0, 0.0)', + width: 0 + }), + image: new ol.style.Circle({ + radius: 0, + fill: new ol.style.Fill({ + color: 'rgba(0, 0, 0, 0.0)' + }) + }) + }); + diff --git a/VIPSWeb/static/js/observationMap.js b/VIPSWeb/static/js/observationMap.js deleted file mode 100644 index 1ec7acab36337786a362c49e19663f3ab16abfb1..0000000000000000000000000000000000000000 --- a/VIPSWeb/static/js/observationMap.js +++ /dev/null @@ -1,419 +0,0 @@ -/* - * Copyright (c) 2018 NIBIO <http://www.nibio.no/>. - * - * This file is part of VIPSWeb. - * VIPSWeb is free software: you can redistribute it and/or modify - * it under the terms of the NIBIO Open Source License as published by - * NIBIO, either version 1 of the License, or (at your option) any - * later version. - * - * VIPSWeb is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * NIBIO Open Source License for more details. - * - * You should have received a copy of the NIBIO Open Source License - * along with VIPSWeb. If not, see <http://www.nibio.no/licenses/>. - * - */ - -var allObservations = []; // Populated asynchronously -var drawnFeatures = []; // Populated asynchronously -var currentDate; // Initialized in initMap -var map; -var featureOverlay; - -/** - * Default coloring - * @type Array - */ -var ageColors = [ - [7, 'rgba(255, 0, 0, 1.0)'], // Red - [30, 'rgba(244, 206, 66, 1.0)'], // Orange - [60, 'rgba(0, 0, 255, 1.0)'], // Blue -]; - -var ageStyles; - -/* - * Observation map - * @author Tor-Einar Skog <tor-einar.skog@nibio.no> - */ -var initMap = function( - center, - zoomLevel, - organizationId, - from, - to, - pestId, - cropId, - cropCategoryId, - customAgeColors - ) -{ - if(typeof customAgeColors !== 'undefined') - { - ageColors = customAgeColors; - } - - initAgeStyles(); - currentDateInMillis = moment(to).format("X") * 1000; // Reference for coloring the observations - // Background layer is OpenStreetMap - var backgroundLayer = new ol.layer.Tile({ - source: new ol.source.OSM({ - attributions: [ - new ol.Attribution({ - html: mapConstants.MAP_ATTRIBUTION - }) - ] - }) - }); - - // Layer for popup - var popOverlay = new ol.Overlay({ - element: document.getElementById("popover") - }); - - // Creating the map - map = new ol.Map({ - target: 'observationMap', - layers: [backgroundLayer], - overlays: [popOverlay], - renderer: 'canvas' - }); - - var centerPosition = ol.proj.transform(center, 'EPSG:4326', map.getView().getProjection().getCode()); - - // Setting zoom and center for the map (need to do this after creating map. so that we kan transform our - // center to correct map projection) - var view = new ol.View({ - center: centerPosition, - zoom:zoomLevel - }); - map.setView(view); - - // Need to build the query string - var params = []; - - if(from !== "") - { - params.push("from=" + from); - } - if(to !== "") - { - params.push("to=" + to); - } - if(pestId !== null) - { - params.push("pestId=" + pestId); - } - if(cropId !== null) - { - params.push("cropId=" + cropId); - } - if(cropCategoryId !== null) - { - params.push("cropCategoryId=" + cropCategoryId); - } - - - $.getJSON( "/rest/observation/filter/" + organizationId + (params.length > 0 ? "?" + params.join("&") : ""), function( data ) { - allObservations = data; - renderObservationTable(data); - var geoJSON = {"type":"FeatureCollection","features":[]}; - for(var i=0;i<data.length;i++) - { - var observation = data[i]; - var obsFeatures = null; - if(observation.location !== null && observation.location.geoJSON !== null) - { - obsFeatures = JSON.parse(observation.location.geoJSON).features; - // Need to add observation id for these locations - for(var j=0; j<obsFeatures.length; j++) - { - obsFeatures[j].properties["observationId"] = observation.observationId; - } - } - else if(observation.geoinfo !== null && observation.geoinfo.trim() !== "") - { - obsFeatures = JSON.parse(observation.geoinfo).features; - } - else - { - continue; - } - - for(var j=0; j<obsFeatures.length; j++) - { - geoJSON.features.push(obsFeatures[j]); - } - } - var features = new ol.Collection(); - featureOverlay = new ol.layer.Vector({ - source: new ol.source.Vector({ - features: features - }), - style: getCorrectStyle - }); - - - var format = new ol.format.GeoJSON(); - drawnfeatures = format.readFeatures(geoJSON, { - dataProjection: 'EPSG:4326', - featureProjection: map.getView().getProjection().getCode() - }); - - featureOverlay.getSource().addFeatures(drawnfeatures); - //console.log(featureOverlay); - featureOverlay.setMap(map); - if(drawnfeatures.length > 0) - { - extent = featureOverlay.getSource().getExtent(); - map.getView().fit(extent, map.getSize()); - } - }); - - // Using Bootstrap's popover plugin. See http://getbootstrap.com/javascript/#popovers - var poiDetails = $("#popover"); - - var displayFeatureDetails = function(pixel, coordinate) { - var feature = map.forEachFeatureAtPixel(pixel, function(feature,layer){ - return feature; - }); - - if (feature) { - var relAge = getObservationRelativeAge(feature); - if(relAge == null || relAge < 0) - { - return; - } - // Position the popup, and hiding it - // Resetting information from (possible) former popups - var geometry = feature.getGeometry(); - popOverlay.setPosition(ol.extent.getCenter(geometry.getExtent())); - // Get the observation that this feature belongs to - var observation = getObservation(feature.get("observationId")); - //popOverlay.setPosition(geometry.getCoordinates()); - poiDetails.popover('destroy'); - var illustrationElm = ""; - if(observation.observationIllustrationSet.length == 1) - { - var illustration = observation.observationIllustrationSet[0]; - illustrationElm = "<img src='/static/images/observations/" + observation.organismId + "/" + illustration.observationIllustrationPK.fileName + "' class='img-responsive'/>"; - } - // Create the popup, showing it - poiDetails.popover({ - animation: true, - trigger: 'manual', - html: true, - placement: "auto top", - title: "<a href='/observation?action=editObservationForm&observationId=" + observation.observationId + "' target='new'>" + observation.observationHeading + "</a>", - content: "[" + moment(observation.timeOfObservation).format("YYYY-MM-DD HH:mm ZZ") + "]: " - + observation.observationText - + illustrationElm - }); - - - poiDetails.popover('show'); - - - } else { - poiDetails.popover('destroy'); - } - }; - - map.on('singleclick', function(evt) { - var pixel = map.getEventPixel(evt.originalEvent); - displayFeatureDetails(pixel); - }); - - -}; - -var getObservation = function(observationId) -{ - for(var i=0; i<allObservations.length;i++) - { - if(allObservations[i].observationId == observationId) - { - return allObservations[i]; - } - } - return null; -}; - - -var renderObservationTable = function(data) -{ - var tbody = document.getElementById("observationTableBody"); - var tbodyHTML = []; - for(var i=0; i<data.length;i++) - { - var obs = data[i]; - tbodyHTML.push("<tr>"); - tbodyHTML.push("<td>" + moment(obs.timeOfObservation).format("YYYY-MM-DD HH:mm ZZ") + "</td>"); - tbodyHTML.push("<td>" + getLocalizedOrganismName(obs.organism) + "</td>"); - tbodyHTML.push("<td>" + getLocalizedOrganismName(obs.cropOrganism) + "</td>"); - tbodyHTML.push("<td>" + (obs.location != null ? obs.location.name : "") + "</td>"); - tbodyHTML.push("<td>" + obs.user.firstName + " " + obs.user.lastName + "</td>"); - tbodyHTML.push("<td>" + obs.observationHeading + "</td>"); - tbodyHTML.push("<td></td>"); - tbodyHTML.push("</tr>"); - } - tbody.innerHTML = tbodyHTML.join("\n"); -}; - -// TODO: Set selected if possible -var renderOrganismField = function(organismList, fieldId, selectedId) -{ - // Sort alphabetically by local name - organismList.sort(function(a,b){ - if (getLocalizedOrganismName(a) < getLocalizedOrganismName(b)) return -1; - if (getLocalizedOrganismName(a) > getLocalizedOrganismName(b)) return 1; - return 0; - }); - var list = document.getElementById(fieldId); - list.options.length=0; - list.options[0] = new Option("",""); // For the chosenjs to print data-placeholder - for(var i=0;i<organismList.length;i++) - { - var organism = organismList[i]; - var newOption = new Option(getLocalizedOrganismName(organism),organism.organismId); - if(organism.organismId === selectedId) - { - newOption.selected = true; - } - list.options[list.options.length] = newOption; - } -}; - -var renderCropCategoryField = function(cropCategoryList, selectedId) -{ - // TODO: Sort by local name - cropCategoryList.sort(function(a,b){ - if (getLocalizedCropCategoryName(a) < getLocalizedCropCategoryName(b)) return -1; - if (getLocalizedCropCategoryName(a) > getLocalizedCropCategoryName(b)) return 1; - return 0; - }); - var list = document.getElementById("cropCategoryList"); - list.options.length=0; - list.options[0] = new Option("",""); // For the chosenjs to print data-placeholder - for(var i=0;i<cropCategoryList.length;i++) - { - var cropCategory = cropCategoryList[i]; - var newOption = new Option(getLocalizedCropCategoryName(cropCategory),cropCategory.cropCategoryId); - if(cropCategory.cropCategoryId === selectedId) - { - newOption.selected = true; - } - list.options[list.options.length] = newOption; - } -}; - -var initForm = function(organizationId, - pestId, - cropId, - cropCategoryId, - postRenderFormActions - ) -{ - $.getJSON( "/rest/observation/pest/" + organizationId , function( pestList ) { - renderOrganismField(pestList, "pestList", pestId); - $.getJSON( "/rest/observation/crop/" + organizationId , function( cropList ) { - renderOrganismField(cropList, "cropList", cropId); - $.getJSON( "/rest/organism/cropcategory/" + organizationId , function( cropCategoryList ) { - renderCropCategoryField(cropCategoryList, cropCategoryId); - postRenderFormActions(); // Activate chosen.js - }); - }); - }); -}; - -// Global configs -var styleOld = - new ol.style.Style({ - fill: new ol.style.Fill({ - color: 'rgba(0, 0, 0, 0.2)' - }), - stroke: new ol.style.Stroke({ - color: '#000000', - width: 2 - }), - image: new ol.style.Circle({ - radius: 7, - fill: new ol.style.Fill({ - color: '#000000' - }) - }) - }); - var styleInvisible = new ol.style.Style({ - fill: new ol.style.Fill({ - color: 'rgba(0, 0, 0, 0.0)' - }), - stroke: new ol.style.Stroke({ - color: 'rgba(0, 0, 0, 0.0)', - width: 0 - }), - image: new ol.style.Circle({ - radius: 0, - fill: new ol.style.Fill({ - color: 'rgba(0, 0, 0, 0.0)' - }) - }) - }); - -var initAgeStyles = function(){ - ageStyles = []; - for(var i in ageColors) - { - ageStyles.push([ - ageColors[i][0], - new ol.style.Style({ - fill: new ol.style.Fill({ - color: ageColors[i][1].replace("1.0","0.2") - }), - stroke: new ol.style.Stroke({ - color: ageColors[i][1], - width: 2 - }), - image: new ol.style.Circle({ - radius: 6, - fill: new ol.style.Fill({ - color: ageColors[i][1] - }) - }) - }) - ]); - } -}; - -var getCorrectStyle = function(feature){ - var age = getObservationRelativeAge(feature); - if(age == null) - { - return; - } - if(age < 0) - { - return styleInvisible; - } - for(var i in ageStyles) - { - if(age < ageStyles[i][0]) - { - return ageStyles[i][1]; - } - } - return styleOld; - }; - -var getObservationRelativeAge = function(feature) -{ - var observation = getObservation(feature.get("observationId")); // TODO include observations timestamp in feature. Speeds things up - if(observation == null) - { - console.info("No obs with id=" + feature.get("observationId")); - return null; // Means invisible - } - return Math.floor((currentDateInMillis - getUnixTimestampFromJSON(observation.timeOfObservation)) / (1000 * 60 * 60 * 24)) + 1; -}; \ No newline at end of file diff --git a/VIPSWeb/templates/index.html b/VIPSWeb/templates/index.html index 4720f4bb95f3ca3fd20eda46bf6953e952a2587c..5b7087e11e4cca005522951a478d0a9ad8ee0227 100755 --- a/VIPSWeb/templates/index.html +++ b/VIPSWeb/templates/index.html @@ -2,7 +2,7 @@ {% comment %} /* - * Copyright (c)2016 NIBIO <http://www.nibio.no/>. + * Copyright (c)2018 NIBIO <http://www.nibio.no/>. * * This file is part of VIPSWeb. * VIPSWeb is free software: you can redistribute it and/or modify @@ -28,7 +28,7 @@ {% endblock %} {% block customJS %} <script type="text/javascript" src="{% url "django.views.i18n.javascript_catalog" %}"></script> -<script type="text/javascript" src="{% static "js/3rdparty/ol-debug.js" %}"></script> +<script type="text/javascript" src="{% static "js/3rdparty/ol.js" %}"></script> <script type="text/javascript" src="/forecasts/models/js/modelLocalNames.js"></script> <script type="text/javascript" src="{% static "js/3rdparty/moment.min.js" %}"></script> <script type="text/javascript" src="{% static "js/util.js" %}"></script> @@ -59,8 +59,8 @@ zoomLevel = parseInt(storedMapSettings["zoomLevel"]); } restoreSelectedCropCategoryIds(); - // Init frontpage map. Depending on forecastmap.js. - initForecastMap([longitude,latitude],zoomLevel,"{{settings.MAP_ATTRIBUTION|safe}}"); + // Init frontpage map. Depending on frontpagemap.js. + initFrontpageMap([longitude,latitude],zoomLevel,"{{settings.MAP_ATTRIBUTION|safe}}"); cachePois(); cacheMessages(); @@ -99,7 +99,7 @@ <!--ul--> {% for crop_category in crop_categories|dictsort:"name" %} <li> - <input type="checkbox" name="cropCategoryIds" id="cropCategoryIds_{{crop_category.crop_category_id}}" value="{{crop_category.crop_category_id}}" checked="checked" onchange="refreshForecasts({{settings.VIPS_ORGANIZATION_ID}},'{{settings.VIPSLOGIC_SERVER_NAME}}');storeSelectedCropCategoryIds();filterMessages();filterObservations();"/> + <input type="checkbox" name="cropCategoryIds" id="cropCategoryIds_{{crop_category.crop_category_id}}" value="{{crop_category.crop_category_id}}" checked="checked" onchange="refreshForecasts({{settings.VIPS_ORGANIZATION_ID}},'{{settings.VIPSLOGIC_SERVER_NAME}}');storeSelectedCropCategoryIds();filterMessages();filterObservations();renderObservationFeatures();"/> <label for="cropCategoryIds_{{crop_category.crop_category_id}}"><span></span>{{ crop_category.name|safe }}</label> </li> {% endfor %} @@ -110,6 +110,10 @@ <!-- Info window box --> <div id="tooltip"></div> <div id="popover"></div> + <div id="mapLayerSelector"> + <input type="radio" name="mapLayer" id="radioForecastLayer" value="forecastLayer" onclick="selectMapLayer(this.value);"/> {% trans "Forecasts" %}<br/> + <input type="radio" name="mapLayer" id="radioObservationLayer" value="observationLayer" onclick="selectMapLayer(this.value);"/> {% trans "Observations" %} + </div> <div id="warningLegend" class="mapBoxPlacement_{{settings.MAP_WARNING_LEGEND_PLACEMENT}}"> <ul> <li class="warning_4"><span>{% trans "High risk of infection" %}</span></li> @@ -119,6 +123,7 @@ <li class="warning_0"><span>{% trans "No forecast available" %}</span></li> </ul> </div> + <div id="observationLegend" class="mapBoxPlacement_{{settings.MAP_WARNING_LEGEND_PLACEMENT}}"></div> </div> </div><!-- End map container --> <div class="col-md-4" id="frontPageRightCol" style="height: {{settings.MAP_HEIGHT}}px;"> diff --git a/VIPSWeb/templates/index_old.html b/VIPSWeb/templates/index_old.html new file mode 100755 index 0000000000000000000000000000000000000000..8c8188ee5511d1b085c69e8e29e39553fa27a5fb --- /dev/null +++ b/VIPSWeb/templates/index_old.html @@ -0,0 +1,160 @@ +{% extends "base.html" %} +{% comment %} + +/* + * Copyright (c)2018 NIBIO <http://www.nibio.no/>. + * + * This file is part of VIPSWeb. + * VIPSWeb is free software: you can redistribute it and/or modify + * it under the terms of the NIBIO Open Source License as published by + * NIBIO, either version 1 of the License, or (at your option) any + * later version. + * + * VIPSWeb is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * NIBIO Open Source License for more details. + * + * You should have received a copy of the NIBIO Open Source License + * along with VIPSWeb. If not, see <http://www.nibio.no/licenses/>. + * + */ + +{% endcomment %} +{% load i18n l10n staticfiles forecast_extras template_helper %} +{% block title%}{% trans "Welcome" %}{%endblock%} +{% block customCSS %} +<link rel="stylesheet" href="{% static "css/3rdparty/ol.css" %}" type="text/css"> +{% endblock %} +{% block customJS %} +<script type="text/javascript" src="{% url "django.views.i18n.javascript_catalog" %}"></script> +<script type="text/javascript" src="{% static "js/3rdparty/ol.js" %}"></script> +<script type="text/javascript" src="/forecasts/models/js/modelLocalNames.js"></script> +<script type="text/javascript" src="{% static "js/3rdparty/moment.min.js" %}"></script> +<script type="text/javascript" src="{% static "js/util.js" %}"></script> +<script type="text/javascript" src="{% url "views.settings_js" %}"></script> +<script type="text/javascript" src="{% static "js/frontpage.js" %}"></script> +<script type="text/javascript" src="{% static "js/frontpageMap.js" %}"></script> +<script type="text/javascript"> + $(document).ready(function() { + + {% if user_is_stock_android %} + if(confirm("{% trans "WARNING: We recommend using Chrome on Android handsets. Click OK to install Chrome, or Cancel to proceed without installing Chrome." %}")) {window.location.href="https://play.google.com/store/apps/details?id=com.android.chrome";} + {% endif %} + + if(settings.userIsIE) + { + alert("{% trans "WARNING: We suspect you are using Internet Explorer to view this site. VIPS is not designed to work with Internet Explorer, you may experience errors and missing features. Please use a different browser, like Microsoft Edge or Google Chrome." %}"); + } + + + var longitude = {{settings.MAP_CENTER_LONGITUDE|unlocalize}}; + var latitude = {{settings.MAP_CENTER_LATITUDE|unlocalize}}; + var zoomLevel = {{settings.MAP_ZOOMLEVEL}}; + var storedMapSettings = getLocalSettings(["longitude","latitude","zoomLevel"], true); + if(storedMapSettings != null) + { + longitude = parseFloat(storedMapSettings["longitude"]); + latitude = parseFloat(storedMapSettings["latitude"]); + zoomLevel = parseInt(storedMapSettings["zoomLevel"]); + } + restoreSelectedCropCategoryIds(); + // Init frontpage map. Depending on forecastmap.js. + initForecastMap([longitude,latitude],zoomLevel,"{{settings.MAP_ATTRIBUTION|safe}}"); + cachePois(); + + cacheMessages(); + cacheObservations(); + cachePrivateForecastSummaries(); + // Collect all summaries of forecasts for this organization + cacheForecastSummaries(); + + }); +</script> +{% endblock %} +{% block content %} + <div class="row"> + <div class="col-md-8"> + <h3>{% trans "Surveillance and first observations" %} <a href="/observations/" style="font-size: small;">({% trans "All observations" %})</a></h3> + <table class="table messageTable left"> + <tbody id="messagesLeftColTBody"></tbody> + </table> + </div> + <div class="col-md-4" id="messageColRight" > + <h3>{% trans "Latest messages" %} <a href="/messages/" style="font-size: small;">({% trans "All messages" %})</a></h3> + <table class="table messageTable right"> + <tbody id="messagesRightColTBody"></tbody> + + + </table> + </div> + </div> + <div class="row" id="mapAndForecastRow"> + <!-- Start map container --> + <div class="col-md-8" id="mapContainer"> + <!-- Placed on the map if wide screen, above it if narrow screen --> + <div id="cropList" class="mapBoxPlacement_{{settings.MAP_CROP_LIST_PLACEMENT}}"> + <h3>{% trans "Crops" %}</h3> + <ul class="cropList single"> + <!--ul--> + {% for crop_category in crop_categories|dictsort:"name" %} + <li> + <input type="checkbox" name="cropCategoryIds" id="cropCategoryIds_{{crop_category.crop_category_id}}" value="{{crop_category.crop_category_id}}" checked="checked" onchange="refreshForecasts({{settings.VIPS_ORGANIZATION_ID}},'{{settings.VIPSLOGIC_SERVER_NAME}}');storeSelectedCropCategoryIds();filterMessages();filterObservations();"/> + <label for="cropCategoryIds_{{crop_category.crop_category_id}}"><span></span>{{ crop_category.name|safe }}</label> + </li> + {% endfor %} + </ul> + <div style="clear: both;"></div> + </div> + <div id="map" class="map" style="height: {{settings.MAP_HEIGHT}}px;"> + <!-- Info window box --> + <div id="tooltip"></div> + <div id="popover"></div> + <div id="warningLegend" class="mapBoxPlacement_{{settings.MAP_WARNING_LEGEND_PLACEMENT}}"> + <ul> + <li class="warning_4"><span>{% trans "High risk of infection" %}</span></li> + <li class="warning_3"><span>{% trans "Medium risk of infection" %}</span></li> + <li class="warning_2"><span>{% trans "No risk of infection" %}</span></li> + <li class="warning_1"><span>{% trans "Missing data" %}</span></li> + <li class="warning_0"><span>{% trans "No forecast available" %}</span></li> + </ul> + </div> + </div> + </div><!-- End map container --> + <div class="col-md-4" id="frontPageRightCol" style="height: {{settings.MAP_HEIGHT}}px;"> + {% if advertisements|length > 0 %} + {% for advertisement in advertisements %} + <div class="row" id="advertisementContainer"> + <div class="col-md-12 advertisement"> + {% if advertisement.illustration %} + <div class="advertisementIllustration"><img src="{{settings.MEDIA_URL}}{{advertisement.illustration}}" class="img-responsive"/></div> + {% endif %} + <h3>{{advertisement.ad_heading}}</h3> + <p>{{advertisement.ad_text|safe}}</p> + </div> + </div> + {% endfor %} + {% endif %} + <div class="row" id="myForecastSummariesContainer"> + <div class="col-md-12 forecastSummaries"> + <h3 id="forecastsummariesHeading">{% trans "My forecasts" %}</h3> + <table class="table-responsive" id="myForecastSummariesTable"> + </table> + </div> + </div> + <div class="row" id="forecastSummariesContainer"> + <div class="col-md-12 forecastSummaries"> + <h3 id="forecastSummariesHeading">{% trans "Forecasts" %} (<span id="numberOfForecastSummaries">...</span>)</h3> + <p id="forecastConfigurationSummarySortByForm">{% trans "Sort by" %}: <input type="radio" name="sortBy" value="weatherStationName" checked="checked" onclick="handleSortByClick();"> {% trans "Weather station" %} <input type="radio" name="sortBy" value="pestOrganismId" onclick="handleSortByClick();"> {% trans "Pest" %} <input type="radio" name="sortBy" value="modelId" onclick="handleSortByClick();"> {% trans "Model" %}</p> + <!--p id="emptyForecastSummariesTableInfo">{% trans "Select crops or zoom in to see list of forecasts" %}</p--> + <table class="table-responsive" id="forecastSummariesTable"> + </table> + </div> + </div> + </div> + </div><!-- End row with sidebar and contents container --> + <div class="row"> <!-- Start row with columns of links --> + {% generate_frontpage_menu %} + + </div> +{% endblock %} \ No newline at end of file diff --git a/observations/static/observations/js/observationViewMap.js b/observations/static/observations/js/observationViewMap.js index ba495ab120d766ea925c98fb1ea858397c7c0ec4..b309dcc3e2c37edaa30f9de1d429c469c1ad2653 100755 --- a/observations/static/observations/js/observationViewMap.js +++ b/observations/static/observations/js/observationViewMap.js @@ -44,8 +44,8 @@ var initMap = function(geoJSON, poi, container, mapAttribution) // center to correct map projection) var view = new ol.View({ center: ol.proj.transform([10,65], 'EPSG:4326', map.getView().getProjection().getCode()), - zoom: 8, - maxZoom: 8 + zoom: 7, + maxZoom: 7 }); map.setView(view); diff --git a/observations/templates/observations/index_new.html b/observations/templates/observations/index_new.html new file mode 100644 index 0000000000000000000000000000000000000000..0f713b6058e603f3215a9a7dc676a63d4db9ab46 --- /dev/null +++ b/observations/templates/observations/index_new.html @@ -0,0 +1,69 @@ +{% extends "base.html" %} +{% load staticfiles %} +{% comment %} + +# +# Copyright (c) 2018 NIBIO <http://www.nibio.no/>. +# +# This file is part of VIPSWeb. +# VIPSWeb is free software: you can redistribute it and/or modify +# it under the terms of the NIBIO Open Source License as published by +# NIBIO, either version 1 of the License, or (at your option) any +# later version. +# +# VIPSWeb is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# NIBIO Open Source License for more details. +# +# You should have received a copy of the NIBIO Open Source License +# along with VIPSWeb. If not, see <http://www.nibio.no/licenses/>. +# + +{% endcomment %} +{% load i18n %} +{% block title%}{% trans "Observations" %}{%endblock%} +{% block content %} +<div id="observationMap" class="map" style="position:relative;"> + <div id="popover"></div> + <div class="form-group" id="progressBar"> + <label for="dayInPeriod">${i18nBundle.currentDate}: <span id="dayInPeriodDate">${to?date}</span></label><br/> + <button type="button" id="playButton" class="btn" onclick="togglePlay(this);"><i class="fa fa-play" aria-hidden="true"></i></button> + <input type="range" id="dayInPeriod" name="dayInPeriod" min="1" max="${periodDays}" step="1" value="${periodDays}" oninput="updateCurrentDate(this);" onchange="updateMap(this)"/> + + </div> + <div id="legend"></div> + </div> +{% endblock %} +{% block extendCSS %} +<link rel="stylesheet" href="{% static "css/3rdparty/ol.css" %}" type="text/css"> +<style type="text/css"> + #progressBar{ + position: absolute; + bottom: 5px; + left: 10px; + z-index: 1000; + background-color: white; + border-radius: 10px; + padding: 10px; + } + #legend{ + position: absolute; + bottom: 115px; + left: 10px; + z-index: 1000; + background-color: white; + border-radius: 10px; + padding: 10px; + } + #legend ul { + list-style: none; + padding:0; + margin:0; + } +</style> +{% endblock %} +{% block customJS %} +<script type="text/javascript" src="{% static "js/3rdparty/ol.js" %}"></script> +<script type="text/javascript" src="{% static "observations/js/observationMap.js" %}"></script> +{% endblock %} \ No newline at end of file diff --git a/observations/urls.py b/observations/urls.py index 89ecf81ff1fce01dbcdcb5833eae58b3c803f403..a5ed6980567fc6162522fb888ca3f803a4bff6b2 100755 --- a/observations/urls.py +++ b/observations/urls.py @@ -23,6 +23,7 @@ from observations import views urlpatterns = patterns('observations.views', # ex: /forecasts/ url(r'^$', views.index, name='index'), + #url(r'new', views.index_new, name='index_new'), # ex: /observations/5/ url(r'^(?P<observation_id>\d+)/$', (views.detail), name='detail'), diff --git a/observations/views.py b/observations/views.py index 86da364bd4d4eaa6b53336f2924bfec69a21de44..d82f3a7ca4f21e17f2d0479d38b575c3772bf809 100755 --- a/observations/views.py +++ b/observations/views.py @@ -1,3 +1,4 @@ +# -*- coding: UTF-8 -*- # # Copyright (c) 2016 NIBIO <http://www.nibio.no/>. # @@ -19,6 +20,7 @@ from django.shortcuts import render from django.utils import translation +from django.conf import settings from observations.forms import ObservationTimeFilterForm from organisms.models import CropCategory @@ -32,6 +34,26 @@ def index(request): } return render(request, 'observations/index.html', context) +""" +Bør slettes hvis ikke man skal ha et offentlig, spesialisert observasjonskart tilgjengelig +def index_new(request): + # organizationId (internally - either from logged in user or from web page + if request.session.get("vips_logic_user", None) != None: + print request.session["vips_logic_user"] + organization_id = request.session["vips_logic_user"]["organization_id"] + else: + organization_id = settings.VIPS_ORGANIZATION_ID + # pestId + # cropId + # cropCategoryId + # from (YYYY-mm-DD) + # to (YYYY-mm-DD) + context = { + "crop_categories": CropCategory.get_crop_categories(translation.get_language()), + "organization_id": organization_id + } + return render(request, 'observations/index_new.html', context) +""" def detail(request, observation_id): context = { "observation_id" : observation_id,