diff --git a/VIPSWeb/local_settings_sample.py b/VIPSWeb/local_settings_sample.py index 24dfb54623699b8a33b75472393e6944594a28b8..0ee2577870ddf1559dd4108748f0518bf07358b2 100644 --- a/VIPSWeb/local_settings_sample.py +++ b/VIPSWeb/local_settings_sample.py @@ -157,6 +157,40 @@ CROP_GROUPS=[] # MAIN_MENU=[] +# The columns with links below the map +# 12 % Number of columns must be 0 (12 needs to be divisible by number of columns) +FRONTPAGE_MENU=[ + { + "label": "Cereals and oilseeds", + "items":[ + {"url":"/nopage", "label": "Test1"}, + {"url":"/nopage", "label": "Test2"}, + ] + }, + { + "label": "Potato and vegetables", + "items":[ + {"url":"/nopage", "label": "Test1"}, + {"url":"/nopage", "label": "Test2"}, + ] + }, + { + "label": "Fruits and berries", + "items":[ + {"url":"/nopage", "label": "Test1"}, + {"url":"/nopage", "label": "Test2"}, + ] + }, + { + "label": "Other models and services", + "items":[ + {"url":"/nopage", "label": "Test1"}, + {"url":"/nopage", "label": "Test2"}, + ] + } + +] + # Text and formatting (HTML) for the footer to be # shown on all web pages. Language code must be specified # Language selection is as follows: diff --git a/VIPSWeb/locale/bg/LC_MESSAGES/django.mo b/VIPSWeb/locale/bg/LC_MESSAGES/django.mo index ad1d93677c93e2171693a716a124fdfa0661cda5..1345bec99f98e86565fce64275f5c91a43d807a9 100644 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 669d35f59526d0762376b16467f9f0eb91fe2273..a8752d80cb56a7482697c360736189fac8c34d45 100644 --- 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: 2015-12-14 14:37+0100\n" +"POT-Creation-Date: 2016-01-29 13:32+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" @@ -30,8 +30,20 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 1.6.5\n" -#: local_settings.py:157 -msgid "Working title" +#: local_settings.py:167 +msgid "Cereals and oilseeds" +msgstr "" + +#: local_settings.py:174 +msgid "Potato and vegetables" +msgstr "" + +#: local_settings.py:181 +msgid "Fruits and berries" +msgstr "" + +#: local_settings.py:188 +msgid "Other models and services" msgstr "" #: templates/404.html:3 templates/404.html.py:5 @@ -52,19 +64,19 @@ msgid "" "should be back online shortly." msgstr "" -#: templates/base.html:54 +#: templates/base.html:56 msgid "Toggle navigation" msgstr "Навигация" -#: templates/base.html:72 -msgid "Click to change language" +#: templates/base.html:83 +msgid "Language" msgstr "" -#: templates/base.html:97 +#: templates/base.html:100 msgid "Sign in" msgstr "" -#: templates/base.html:109 +#: templates/base.html:117 msgid "This is the default page contents." msgstr "Това е съдържанието на страницата по подразбиране. " @@ -72,64 +84,76 @@ msgstr "Това е съдържанието на страницата по по msgid "Welcome" msgstr "Добре дошли" -#: templates/index.html:70 +#: templates/index.html:63 +#, fuzzy +#| msgid "Messages" +msgid "Latest messages" +msgstr "Съобщения" + +#: templates/index.html:63 +#, fuzzy +#| msgid "Messages" +msgid "All messages" +msgstr "Съобщения" + +#: templates/index.html:69 +msgid "Surveillance" +msgstr "" + +#: templates/index.html:88 +msgid "Crops" +msgstr "" + +#: templates/index.html:105 msgid "High risk of infection" msgstr "" -#: templates/index.html:71 +#: templates/index.html:106 msgid "Medium risk of infection" msgstr "" -#: templates/index.html:72 +#: templates/index.html:107 msgid "No risk of infection" msgstr "" -#: templates/index.html:73 +#: templates/index.html:108 msgid "Missing data" msgstr "" -#: templates/index.html:74 +#: templates/index.html:109 msgid "No forecast available" msgstr "" -#: templates/index.html:82 -msgid "Crops" -msgstr "" +#: templates/index.html:117 +#, fuzzy +#| msgid "Forecasts" +msgid "My forecasts" +msgstr "Прогноза" -#: templates/index.html:95 +#: templates/index.html:124 msgid "Forecasts" msgstr "Прогноза" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Sort by" msgstr "" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Weather station" msgstr "" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Pest" msgstr "" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Model" msgstr "" -#: templates/index.html:97 +#: templates/index.html:126 msgid "Select crops or zoom in to see list of forecasts" msgstr "" -#: templates/index.html:104 -#, fuzzy -#| msgid "Forecasts" -msgid "My forecasts" -msgstr "Прогноза" - -#: templates/index.html:111 -msgid "Messages" -msgstr "Съобщения" - #: templatetags/template_helper.py:74 #, fuzzy msgid "Information" diff --git a/VIPSWeb/locale/bs/LC_MESSAGES/django.mo b/VIPSWeb/locale/bs/LC_MESSAGES/django.mo index b10509aab37c26523412607ca8ae4964aa8848f2..6034ea1979808dbbdac4cd7105a614e4bb9c72dc 100644 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 fb4cae55bd5c1d923f9dcc5b23f1d78bcd124d49..e6bc3a82dd20d6f4587d821251b26595b16e0dce 100644 --- 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: 2015-12-14 14:37+0100\n" +"POT-Creation-Date: 2016-01-29 13:32+0100\n" "PO-Revision-Date: 2015-02-13 11:26+0100\n" "Last-Translator: \n" "Language-Team: \n" @@ -19,8 +19,20 @@ msgstr "" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Generator: Poedit 1.7.4\n" -#: local_settings.py:157 -msgid "Working title" +#: local_settings.py:167 +msgid "Cereals and oilseeds" +msgstr "" + +#: local_settings.py:174 +msgid "Potato and vegetables" +msgstr "" + +#: local_settings.py:181 +msgid "Fruits and berries" +msgstr "" + +#: local_settings.py:188 +msgid "Other models and services" msgstr "" #: templates/404.html:3 templates/404.html.py:5 @@ -41,19 +53,19 @@ msgid "" "should be back online shortly." msgstr "" -#: templates/base.html:54 +#: templates/base.html:56 msgid "Toggle navigation" msgstr "Prebaci navigaciju " -#: templates/base.html:72 -msgid "Click to change language" +#: templates/base.html:83 +msgid "Language" msgstr "" -#: templates/base.html:97 +#: templates/base.html:100 msgid "Sign in" msgstr "" -#: templates/base.html:109 +#: templates/base.html:117 msgid "This is the default page contents." msgstr "Ovo je zadani sadržaj stranice " @@ -61,64 +73,76 @@ msgstr "Ovo je zadani sadržaj stranice " msgid "Welcome" msgstr "Dobrodošli " -#: templates/index.html:70 +#: templates/index.html:63 +#, fuzzy +#| msgid "Messages" +msgid "Latest messages" +msgstr "Poruke" + +#: templates/index.html:63 +#, fuzzy +#| msgid "Messages" +msgid "All messages" +msgstr "Poruke" + +#: templates/index.html:69 +msgid "Surveillance" +msgstr "" + +#: templates/index.html:88 +msgid "Crops" +msgstr "Usjevi " + +#: templates/index.html:105 msgid "High risk of infection" msgstr "Visok rizik infekcije" -#: templates/index.html:71 +#: templates/index.html:106 msgid "Medium risk of infection" msgstr "Srednji rizik infekcije" -#: templates/index.html:72 +#: templates/index.html:107 msgid "No risk of infection" msgstr "Bez rizika infekcije" -#: templates/index.html:73 +#: templates/index.html:108 msgid "Missing data" msgstr "Podaci nedostaju" -#: templates/index.html:74 +#: templates/index.html:109 msgid "No forecast available" msgstr "Prognoza nije dostupna" -#: templates/index.html:82 -msgid "Crops" -msgstr "Usjevi " +#: templates/index.html:117 +#, fuzzy +#| msgid "Forecasts" +msgid "My forecasts" +msgstr "Prognoze " -#: templates/index.html:95 +#: templates/index.html:124 msgid "Forecasts" msgstr "Prognoze " -#: templates/index.html:96 +#: templates/index.html:125 msgid "Sort by" msgstr "" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Weather station" msgstr "" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Pest" msgstr "" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Model" msgstr "" -#: templates/index.html:97 +#: templates/index.html:126 msgid "Select crops or zoom in to see list of forecasts" msgstr "" -#: templates/index.html:104 -#, fuzzy -#| msgid "Forecasts" -msgid "My forecasts" -msgstr "Prognoze " - -#: templates/index.html:111 -msgid "Messages" -msgstr "Poruke" - #: templatetags/template_helper.py:74 msgid "Information" msgstr "" diff --git a/VIPSWeb/locale/fi/LC_MESSAGES/django.mo b/VIPSWeb/locale/fi/LC_MESSAGES/django.mo index e5652171332f4e3f9d2b40bf79209d8ec7662aa8..95e69dea26a8377a2c65bffe346b43949299a931 100644 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 4a2a408f923075799f213cf86ff0da4ca36bb038..32c2c178bf04219d785d378fe525e9dc27e23fec 100644 --- 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: 2015-12-14 14:37+0100\n" +"POT-Creation-Date: 2016-01-29 13:32+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" @@ -18,8 +18,20 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: local_settings.py:157 -msgid "Working title" +#: local_settings.py:167 +msgid "Cereals and oilseeds" +msgstr "" + +#: local_settings.py:174 +msgid "Potato and vegetables" +msgstr "" + +#: local_settings.py:181 +msgid "Fruits and berries" +msgstr "" + +#: local_settings.py:188 +msgid "Other models and services" msgstr "" #: templates/404.html:3 templates/404.html.py:5 @@ -40,19 +52,19 @@ msgid "" "should be back online shortly." msgstr "" -#: templates/base.html:54 +#: templates/base.html:56 msgid "Toggle navigation" msgstr "" -#: templates/base.html:72 -msgid "Click to change language" +#: templates/base.html:83 +msgid "Language" msgstr "" -#: templates/base.html:97 +#: templates/base.html:100 msgid "Sign in" msgstr "" -#: templates/base.html:109 +#: templates/base.html:117 msgid "This is the default page contents." msgstr "" @@ -60,64 +72,76 @@ msgstr "" msgid "Welcome" msgstr "Tervetuloa" -#: templates/index.html:70 +#: templates/index.html:63 +#, fuzzy +#| msgid "Messages" +msgid "Latest messages" +msgstr "Viestit" + +#: templates/index.html:63 +#, fuzzy +#| msgid "Messages" +msgid "All messages" +msgstr "Viestit" + +#: templates/index.html:69 +msgid "Surveillance" +msgstr "" + +#: templates/index.html:88 +msgid "Crops" +msgstr "Sato" + +#: templates/index.html:105 msgid "High risk of infection" msgstr "" -#: templates/index.html:71 +#: templates/index.html:106 msgid "Medium risk of infection" msgstr "" -#: templates/index.html:72 +#: templates/index.html:107 msgid "No risk of infection" msgstr "" -#: templates/index.html:73 +#: templates/index.html:108 msgid "Missing data" msgstr "" -#: templates/index.html:74 +#: templates/index.html:109 msgid "No forecast available" msgstr "" -#: templates/index.html:82 -msgid "Crops" -msgstr "Sato" +#: templates/index.html:117 +#, fuzzy +#| msgid "Forecasts" +msgid "My forecasts" +msgstr "Hälytykset" -#: templates/index.html:95 +#: templates/index.html:124 msgid "Forecasts" msgstr "Hälytykset" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Sort by" msgstr "" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Weather station" msgstr "" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Pest" msgstr "" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Model" msgstr "" -#: templates/index.html:97 +#: templates/index.html:126 msgid "Select crops or zoom in to see list of forecasts" msgstr "" -#: templates/index.html:104 -#, fuzzy -#| msgid "Forecasts" -msgid "My forecasts" -msgstr "Hälytykset" - -#: templates/index.html:111 -msgid "Messages" -msgstr "Viestit" - #: templatetags/template_helper.py:74 msgid "Information" msgstr "" diff --git a/VIPSWeb/locale/nb/LC_MESSAGES/django.mo b/VIPSWeb/locale/nb/LC_MESSAGES/django.mo index 5b99f74d40678e13b9cfd6f99edd09603c344ffb..fc240afbb1620479524ef9f9ac5e3700e6149ad0 100644 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 bb606c5fe901b2251cb168d5a462c51a4eb5f61a..a1d0b0adb2b450bcced213908fcceebc399596c5 100644 --- 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: 2015-12-14 14:37+0100\n" +"POT-Creation-Date: 2016-01-29 13:32+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" @@ -30,11 +30,24 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: local_settings.py:157 -msgid "Working title" -msgstr "Arbeidstittel" +#: local_settings.py:167 +msgid "Cereals and oilseeds" +msgstr "Korn og oljevekster" -#: templates/404.html:3 templates/404.html.py:5 +#: local_settings.py:174 +msgid "Potato and vegetables" +msgstr "Poteter og grønnsaker" + +#: local_settings.py:181 +msgid "Fruits and berries" +msgstr "Frukt og bær" + +#: local_settings.py:188 +msgid "Other models and services" +msgstr "Andre modeller og tjenester" + +#: templates/404.html:3 +#: templates/404.html.py:5 msgid "File not found" msgstr "Fil ikke funnet" @@ -42,7 +55,8 @@ msgstr "Fil ikke funnet" msgid "We are sorry, but the requested file was not found" msgstr "Beklager, men den etterspurte filen ble ikke funnet" -#: templates/503.html:3 templates/503.html.py:5 +#: templates/503.html:3 +#: templates/503.html.py:5 msgid "Temporarily down for maintenance" msgstr "Midlertidig utilgjengelig grunnet vedlikehold" @@ -50,23 +64,22 @@ msgstr "Midlertidig utilgjengelig grunnet vedlikehold" msgid "" "We are sorry, but the web site is currently underdoing maintenance. We " "should be back online shortly." -msgstr "" -"Vi beklager, men websiden gjennomgår vedlikehold. Vi håper å få den " +msgstr "Vi beklager, men websiden gjennomgår vedlikehold. Vi håper å få den " "tilgjengelig så snart som mulig." -#: templates/base.html:54 +#: templates/base.html:56 msgid "Toggle navigation" msgstr "Vis/skjul navigasjon" -#: templates/base.html:72 -msgid "Click to change language" -msgstr "Klikk for å endre språk" +#: templates/base.html:83 +msgid "Language" +msgstr "Språk" -#: templates/base.html:97 +#: templates/base.html:100 msgid "Sign in" msgstr "Logg inn" -#: templates/base.html:109 +#: templates/base.html:117 msgid "This is the default page contents." msgstr "Dette er standardinnholdet på siden" @@ -74,62 +87,71 @@ msgstr "Dette er standardinnholdet på siden" msgid "Welcome" msgstr "Velkommen" -#: templates/index.html:70 +#: templates/index.html:63 +msgid "Latest messages" +msgstr "Siste meldinger" + +#: templates/index.html:63 +msgid "All messages" +msgstr "Alle meldinger" + +#: templates/index.html:69 +msgid "Surveillance" +msgstr "Overvåkning" + +#: templates/index.html:88 +msgid "Crops" +msgstr "Kulturer" + +#: templates/index.html:105 msgid "High risk of infection" msgstr "Fare for angrep" -#: templates/index.html:71 +#: templates/index.html:106 msgid "Medium risk of infection" msgstr "Mulig fare for angrep" -#: templates/index.html:72 +#: templates/index.html:107 msgid "No risk of infection" msgstr "Ingen fare for angrep" -#: templates/index.html:73 +#: templates/index.html:108 msgid "Missing data" msgstr "Data mangler" -#: templates/index.html:74 +#: templates/index.html:109 msgid "No forecast available" msgstr "Varsel beregnes ikke" -#: templates/index.html:82 -msgid "Crops" -msgstr "Kulturer" +#: templates/index.html:117 +msgid "My forecasts" +msgstr "Mine varsler" -#: templates/index.html:95 +#: templates/index.html:124 msgid "Forecasts" msgstr "Varsler" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Sort by" msgstr "Sorter etter" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Weather station" msgstr "Målestasjon" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Pest" msgstr "Skadegjører" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Model" msgstr "Modell" -#: templates/index.html:97 +#: templates/index.html:126 msgid "Select crops or zoom in to see list of forecasts" msgstr "Velg kultur eller zoom inn for å se liste over varsler" -#: templates/index.html:104 -msgid "My forecasts" -msgstr "Mine varsler" - -#: templates/index.html:111 -msgid "Messages" -msgstr "Meldinger" - #: templatetags/template_helper.py:74 msgid "Information" msgstr "Informasjon" + diff --git a/VIPSWeb/locale/vi/LC_MESSAGES/django.mo b/VIPSWeb/locale/vi/LC_MESSAGES/django.mo index c76749451feeda93664ffd9702b8c43106e039d8..e0a975ba4a10d7d63d9d6a56e30fb98ac16bffd6 100644 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 ffa1e73a7e64a14045ab25904667e800cdbbf9b3..637e6c32539133ae16f61f2072bade2b84025eb8 100644 --- 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: 2016-01-09 09:36+0100\n" +"POT-Creation-Date: 2016-01-29 13:32+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" @@ -18,12 +18,23 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: local_settings.py:157 -msgid "Working title" -msgstr "Không tiêu đề" +#: local_settings.py:167 +msgid "Cereals and oilseeds" +msgstr "" + +#: local_settings.py:174 +msgid "Potato and vegetables" +msgstr "" + +#: local_settings.py:181 +msgid "Fruits and berries" +msgstr "" + +#: local_settings.py:188 +msgid "Other models and services" +msgstr "" -#: templates/404.html:3 -#: templates/404.html.py:5 +#: templates/404.html:3 templates/404.html.py:5 msgid "File not found" msgstr "File không tìm thấy" @@ -31,8 +42,7 @@ msgstr "File không tìm thấy" msgid "We are sorry, but the requested file was not found" msgstr "Chúng tôi rất xin lỗi, nhưng các tập tin yêu cầu không được tìm thấy" -#: templates/503.html:3 -#: templates/503.html.py:5 +#: templates/503.html:3 templates/503.html.py:5 msgid "Temporarily down for maintenance" msgstr "Tạm ngưng để bảo trì" @@ -40,22 +50,23 @@ msgstr "Tạm ngưng để bảo trì" msgid "" "We are sorry, but the web site is currently underdoing maintenance. We " "should be back online shortly." -msgstr "Chúng tôi rất xin lỗi, nhưng trang web hiện đang underdoing bảo trì. Chúng tôi" -"nên trở lại trực tuyến ngay." +msgstr "" +"Chúng tôi rất xin lỗi, nhưng trang web hiện đang underdoing bảo trì. Chúng " +"tôinên trở lại trực tuyến ngay." -#: templates/base.html:54 +#: templates/base.html:56 msgid "Toggle navigation" msgstr "chuyển hướng toggle" -#: templates/base.html:72 -msgid "Click to change language" -msgstr "Nhấn vào đây để thay đổi ngôn ngữ" +#: templates/base.html:83 +msgid "Language" +msgstr "" -#: templates/base.html:97 +#: templates/base.html:100 msgid "Sign in" msgstr "Đăng nhập" -#: templates/base.html:109 +#: templates/base.html:117 msgid "This is the default page contents." msgstr "" @@ -63,63 +74,80 @@ msgstr "" msgid "Welcome" msgstr "Chào mừng" -#: templates/index.html:70 +#: templates/index.html:63 +#, fuzzy +#| msgid "Messages" +msgid "Latest messages" +msgstr "Tin nhắn" + +#: templates/index.html:63 +#, fuzzy +#| msgid "Messages" +msgid "All messages" +msgstr "Tin nhắn" + +#: templates/index.html:69 +msgid "Surveillance" +msgstr "" + +#: templates/index.html:88 +msgid "Crops" +msgstr "mùa gặt" + +#: templates/index.html:105 msgid "High risk of infection" msgstr "Nguy cơ lây nhiễm cao" -#: templates/index.html:71 +#: templates/index.html:106 msgid "Medium risk of infection" msgstr "Rủi ro trung bình của nhiễm trùng" -#: templates/index.html:72 +#: templates/index.html:107 msgid "No risk of infection" msgstr "Không có nguy cơ lây nhiễm" -#: templates/index.html:73 +#: templates/index.html:108 msgid "Missing data" msgstr "Dữ liệu bị mất" -#: templates/index.html:74 +#: templates/index.html:109 msgid "No forecast available" msgstr "Không dự báo có sẵn" -#: templates/index.html:82 -msgid "Crops" -msgstr "mùa gặt" +#: templates/index.html:117 +msgid "My forecasts" +msgstr "dự báo của tôi" -#: templates/index.html:95 +#: templates/index.html:124 msgid "Forecasts" msgstr "dự báo" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Sort by" msgstr "Sắp xếp theo" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Weather station" msgstr "Trạm thời tiết" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Pest" msgstr "côn trùng" -#: templates/index.html:96 +#: templates/index.html:125 msgid "Model" msgstr "Kiểu mẫu" -#: templates/index.html:97 +#: templates/index.html:126 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" -#: templates/index.html:104 -msgid "My forecasts" -msgstr "dự báo của tôi" - -#: templates/index.html:111 -msgid "Messages" -msgstr "Tin nhắn" - #: templatetags/template_helper.py:74 msgid "Information" msgstr "Thông tin" +#~ msgid "Working title" +#~ msgstr "Không tiêu đề" + +#~ msgid "Click to change language" +#~ msgstr "Nhấn vào đây để thay đổi ngôn ngữ" diff --git a/VIPSWeb/static/css/vipsweb.css b/VIPSWeb/static/css/vipsweb.css index 2f11d8b7b2c0226da803917a500a336838dac165..82c958d8c3220ffc40e964eb7e95c32b9bfb1253 100644 --- a/VIPSWeb/static/css/vipsweb.css +++ b/VIPSWeb/static/css/vipsweb.css @@ -100,6 +100,8 @@ border-top-color: #222222 !important; } + + .nav a { text-decoration: none; @@ -139,26 +141,26 @@ div.messages_illustration{ * the map so that you can scroll down the page * Also hide the map legend */ -@media (max-height: 800px) +@media (max-width: 768px) and (max-height: 800px) { #map { max-height: 600px !important;} } -@media (max-height: 600px) +@media (max-width: 768px) and (max-height: 600px) { #map { max-height: 400px !important;} #chartContainer {border-right: 15px dotted grey;} #scrollHelp{display:block !important;} } -@media (max-height: 500px) +@media (max-width: 768px) and (max-height: 500px) { #map { max-height: 300px !important; } #warningLegend {display: none;} } -@media (max-height: 400px) +@media (max-width: 768px) and (max-height: 400px) { #map { max-height: 200px !important;} } @@ -180,6 +182,60 @@ div.messages_illustration{ #languageSelectorIcon {display: none !important;} } +@media (min-width: 992px) +{ + #mapContainer{ + border-left: 15px solid rgba(0, 87, 77, 0.15); + padding-left: 0px; + padding-right: 0px; + + } + #messageColRight{ + padding-left: 0px; + padding-right: 0px; + } + + +} + +@media (max-width: 992px) +{ + #mapContainer{ + background-color: rgba(0, 87, 77, 0.15); + padding-bottom: 15px; + } + + /* Moving the crop list out of the map for narrow screens */ + #cropList { + position: inherit !important; + z-index: inherit !important; + margin: inherit !important; + + top: auto !important; + right: auto !important; + padding: 15px !important; + margin-bottom: 15px !important; + border: 0px none !important; + background-color: white !important; + } + + #cropList h3 { + margin-top: 0px; + } + + ul.cropList li { + float: left !important; + padding-right: 10px; + } + + ul.cropList { + + display: block !important; + margin-bottom 15px !important; + } + +} + #tooltip{ position: absolute; @@ -356,17 +412,8 @@ p.byline { } a { - color: rgba(19, 159, 181, 1); - text-decoration: underline; -} - -a:hover { - color: rgba(49, 171, 110, 1); - text-decoration: none; -} - -a:visited { - color: rgba(49, 171, 110, 1); + color: #008136; + text-decoration: underline; } p.lead { @@ -440,7 +487,7 @@ ul.cropList input[type="radio"]:checked + label span { background:url("./icons/checkbox_checked.png") left top no-repeat; } -ul.cropList{ +ul.cropList, ul.linkList{ list-style: none; margin-left: 0px; padding-left: 0px; @@ -451,6 +498,11 @@ ul.cropList li { } +ul.cropList.single li { + float: inherit; + +} + ul.cropList.double li { width: 50%;} div.messages_illustration { @@ -472,9 +524,13 @@ div.forecastSummaries { } +#frontPageRightCol{ + overflow-y:auto; +} + #forecastSummariesTable, #myForecastSummariesTable, #forecastSummariesPopoverTable { - max-height: 210px; - overflow-y: auto; + /*max-height: 210px;*/ + /*overflow-y: auto;*/ width: 95%; border-collapse: separate; border-spacing: 2px; @@ -544,7 +600,7 @@ tbody.forecastSummaryRowGroup tr:not(:first-child){ cursor: pointer; } -#warningLegend +#warningLegend, #cropList { position: absolute; @@ -560,22 +616,22 @@ tbody.forecastSummaryRowGroup tr:not(:first-child){ } -.warningLegendPlacement_1 { +.mapBoxPlacement_1 { top: 70px; left: 25px; } -.warningLegendPlacement_2 { +.mapBoxPlacement_2 { top: 45px; right: 25px; } -.warningLegendPlacement_3 { +.mapBoxPlacement_3 { bottom: 10px; left: 25px; } -.warningLegendPlacement_4 { +.mapBoxPlacement_4 { bottom: 45px; right: 25px; } @@ -613,7 +669,7 @@ td.tableCellWarningStatus_3 {background-color: #FEDA4D !important;} td.tableCellWarningStatus_4 {background-color: #F0564D !important;} td.dateCell { - min-width: 85px; + width: 85px; } #emptyForecastSummariesTableInfo{ @@ -654,3 +710,28 @@ td.dateCell { top: 2px; } +#mapAndForecastRow{ + background-color: white; +} + + + +table.messageTable tr, table.messageTable td +{ + background-color: white; + text-align:left; +} + +#cropList +{ + top: 25px; + right: 25px; + padding: 0px 15px; +} + +.favouriteToggle{ + color: #008136; + cursor:pointer; +} + + diff --git a/VIPSWeb/static/images/logo_vips_new.png b/VIPSWeb/static/images/logo_vips_new.png new file mode 100644 index 0000000000000000000000000000000000000000..7ac20433d49ef4d3134952ddda42d50bd2e43e1c Binary files /dev/null and b/VIPSWeb/static/images/logo_vips_new.png differ diff --git a/VIPSWeb/static/js/frontpage.js b/VIPSWeb/static/js/frontpage.js index 5568147d49e3ecbf4b46db80d36fd1a4efec0931..1761a2afbc0287f5ca087cbdcf27bbfa1f92f77f 100644 --- a/VIPSWeb/static/js/frontpage.js +++ b/VIPSWeb/static/js/frontpage.js @@ -65,7 +65,7 @@ function cacheMessages() */ function renderMessages() { - for(var i in settings.frontpageMessageTagIds) + /*for(var i in settings.frontpageMessageTagIds) { var tagId = settings.frontpageMessageTagIds[i]; document.getElementById("tbody_messageTag_" + tagId).innerHTML = ""; @@ -78,9 +78,26 @@ function renderMessages() '<tr><td class="dateCell">' + tagMessage["datePub"] + '</td><td><a href="/messages/' + tagMessage["messageId"] + '">' + getMessageLocale(tagMessage, settings.currentLanguage,settings.languageCode)["heading"] + '</a></td></tr>'; } + }*/ + var messagesLeftColTBody = document.getElementById("messagesLeftColTBody"); + messagesLeftColTBody.innerHTML = ""; + + for(var i=0;i<Math.min(3,filteredMessages.length);i++) // Max 4 latest messages + { + var message = filteredMessages[i]; + + messagesLeftColTBody.innerHTML += '<tr>\n<td class="dateCell">' + message["datePub"] + '</td><td><a href="/messages/' + message["messageId"] + '">' + getMessageLocale(message, settings.currentLanguage,settings.languageCode)["heading"] + '</a></td>\n</tr>'; } } +/** + * TODO: implement this + */ +function renderObservationMessages() +{ + +} + /** * Filtering on the crops that the messages are attached to. If no crop ids are attached, * the message is considered universally interesting and is always included @@ -89,7 +106,7 @@ function filterMessages() { var selectedCropIds = getSelectedCropIds(); //console.log(selectedCropIds); - filteredMessages = {}; + filteredMessages = []; for(var tagI in allMessages) { //console.log(allMessages[tagI]); @@ -100,7 +117,8 @@ function filterMessages() var messageCropOrganismIds = message["messageCropOrganismIds"]; if(messageCropOrganismIds.length == 0) { - filteredForTag.push(message); + //filteredForTag.push(message); + filteredMessages.push(message); } else { @@ -109,13 +127,14 @@ function filterMessages() //console.log(messageCropOrganismIds[mCOI]); if(selectedCropIds.indexOf(messageCropOrganismIds[mCOI]) >= 0) { - filteredForTag.push(message); + //filteredForTag.push(message); + filteredMessages.push(message); break; } } } } - filteredMessages[tagI] = filteredForTag; + //filteredMessages[tagI] = filteredForTag; } renderMessages(); } @@ -189,8 +208,9 @@ function renderMyForecastConfigurationSummaries() //console.log(myForecastConfigurationIds); if(myForecastConfigurationIds.length == 0) { + $(myForecastSummariesContainer).hide(1000); myForecastSummariesTable.innerHTML = ""; - myForecastSummariesContainer.style.display = "none"; + //myForecastSummariesContainer.style.display = "none"; return; } var myForecastConfigurations = []; @@ -208,8 +228,9 @@ function renderMyForecastConfigurationSummaries() if(myForecastConfigurations.length == 0) { + $(myForecastSummariesContainer).hide(1000); myForecastSummariesTable.innerHTML = ""; - myForecastSummariesContainer.style.display = "none"; + //myForecastSummariesContainer.style.display = "none"; return; } @@ -217,11 +238,13 @@ function renderMyForecastConfigurationSummaries() var mySummariesHTML = getforecastSummariesTableHTML(myForecastConfigurations,false, true); myForecastSummariesTable.innerHTML = mySummariesHTML; - document.getElementById("myForecastSummariesContainer").style.display = "block"; + //document.getElementById("myForecastSummariesContainer").style.display = "block"; myForecastSummariesTable.style.display = "block"; + $(myForecastSummariesContainer).show(1000); } + /** * * @param forecastConfigurations @@ -253,7 +276,8 @@ function getforecastSummariesTableHTML(forecastConfigurations, excludePoiName, i summariesHTML.push((excludePoiName ? "" : ", ") + getLocalizedOrganismName(forecastConfiguration.cropOrganismId)); summariesHTML.push(", " + getLocalizedOrganismName(forecastConfiguration.pestOrganismId)); summariesHTML.push(", <a href='/forecasts/models/" + forecastConfiguration.modelId + "' target='new'>" + modelLocalNames[forecastConfiguration.modelId] + "</a>"); - summariesHTML.push(" <button type=\"button\" onclick='" + (isFavouritesList ? "removeFrom" : "addTo") + "MyForecastConfigurations(" + forecastConfiguration.forecastConfigurationId + ");'><img src='/static/css/icons/" + (isFavouritesList ? "remove_from" : "add_to") + "_favourites.png' alt='" + (isFavouritesList ? gettext("Remove from my favourites") : gettext("Add to my favourites")) + "'/></button>"); + //summariesHTML.push(" <button type=\"button\" onclick='" + (isFavouritesList ? "removeFrom" : "addTo") + "MyForecastConfigurations(" + forecastConfiguration.forecastConfigurationId + ");'><img src='/static/css/icons/" + (isFavouritesList ? "remove_from" : "add_to") + "_favourites.png' alt='" + (isFavouritesList ? gettext("Remove from my favourites") : gettext("Add to my favourites")) + "'/></button>"); + summariesHTML.push(" <span onclick='" + (isFavouritesList ? "removeFrom" : "addTo") + "MyForecastConfigurations(" + forecastConfiguration.forecastConfigurationId + ");' class=\"" + (isFavouritesList ? "fa fa-minus-circle favouriteToggle" : "fa fa-star favouriteToggle") + "\"></span>") summariesHTML.push("</td></tr>"); // Get correct list of summaries diff --git a/VIPSWeb/templates/index.html b/VIPSWeb/templates/index.html index f2eb97f9d9c4512aae59ed65a16f6be469fa76b9..aa8325601e382e13c1b91dc4da72283165a055e1 100644 --- a/VIPSWeb/templates/index.html +++ b/VIPSWeb/templates/index.html @@ -21,7 +21,7 @@ */ {% endcomment %} -{% load i18n l10n staticfiles forecast_extras %} +{% 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"> @@ -59,13 +59,48 @@ {% endblock %} {% block content %} <div class="row"> - <!-- Start map container --> <div class="col-md-8"> + <h3>{% trans "Latest messages" %} <a href="/messages/" style="font-size: small;">({% trans "All messages" %})</a></h3> + <table class="table messageTable left"> + <tbody id="messagesLeftColTBody"></tbody> + </table> + </div> + <div class="col-md-4" id="messageColRight" > + <h3>{% trans "Surveillance" %}</h3> + <table class="table messageTable right"> + <tr> + <td>2015-06-22</td> + <td>Førstefunn av tørråte på Toten</td> + </tr> + <tr> + <td>2015-06-21</td> + <td>Eplevikler snek seg rundt på hyttetomt</td> + </tr> + + </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"> + {% for crop_group in crop_groups %} + <li> + <input type="checkbox" name="cropIds" id="cropIds_{{crop_group.crop_ids|slugify}}" value="{{crop_group.crop_ids}}" checked="checked" onchange="refreshForecasts({{settings.VIPS_ORGANIZATION_ID}},'{{settings.VIPSLOGIC_SERVER_NAME}}');storeSelectedCropIds();filterMessages();"/> + <label for="cropIds_{{crop_group.crop_ids|slugify}}"><span></span>{{ crop_group.name }}</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="warningLegendPlacement_{{settings.MAP_WARNING_LEGEND_PLACEMENT}}"> + <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> @@ -74,60 +109,29 @@ <li class="warning_0"><span>{% trans "No forecast available" %}</span></li> </ul> </div> - </div> + </div> </div><!-- End map container --> - <div class="col-md-4"> - <div class="row"> - <div class="col-md-12"> - <h1>{% trans "Crops" %}</h1> - <ul class="cropList double"> - {% for crop_group in crop_groups %} - <li> - <input type="checkbox" name="cropIds" id="cropIds_{{crop_group.crop_ids|slugify}}" value="{{crop_group.crop_ids}}" checked="checked" onchange="refreshForecasts({{settings.VIPS_ORGANIZATION_ID}},'{{settings.VIPSLOGIC_SERVER_NAME}}');storeSelectedCropIds();filterMessages();"/> - <label for="cropIds_{{crop_group.crop_ids|slugify}}"><span></span>{{ crop_group.name }}</label> - </li> - {% endfor %} - </ul> - </div> - </div> - <div class="row"> + <div class="col-md-4" id="frontPageRightCol" style="height: {{settings.MAP_HEIGHT}}px;"> + <div class="row" id="myForecastSummariesContainer"> <div class="col-md-12 forecastSummaries"> - <h1>{% trans "Forecasts" %} (<span id="numberOfForecastSummaries">...</span>)</h1> - <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"> + <h3 id="forecastsummariesHeading">{% trans "My forecasts" %}</h3> + <table class="table-responsive" id="myForecastSummariesTable"> </table> </div> </div> - <div class="row" id="myForecastSummariesContainer"> + <div class="row" id="forecastSummariesContainer"> <div class="col-md-12 forecastSummaries"> - <h1>{% trans "My forecasts" %}</h1> - <table class="table-responsive" id="myForecastSummariesTable"> + <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 class="row"> - <div class="col-md-12"> - <h1>{% trans "Messages" %}</h1> - <table class="table table-hover table-condensed table-striped"> - {% for message_tag in message_tags %} - <thead> - <tr> - <th colspan="2">{{message_tag.local_tag_name|default_if_none:message_tag.default_tag_name}}</th> - </tr> - </thead> - <tbody id="tbody_messageTag_{{message_tag.message_tag_id}}"> - - <!--tr> - <td class="dateCell"> message.date_pub|date:"Y-m-d" </td> - <td><a href=" url 'vips_messages:detail' message.message_id ">message.heading</a></td> - </tr--> - - </tbody> - {% endfor %} - </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/VIPSWeb/templatetags/template_helper.py b/VIPSWeb/templatetags/template_helper.py index c6b6c7b1462255b595c18c0a919420cb5c29e6f8..5e8eb69ae6cd7b9216aafc06040aee6afc27c8f7 100644 --- a/VIPSWeb/templatetags/template_helper.py +++ b/VIPSWeb/templatetags/template_helper.py @@ -75,6 +75,34 @@ def generate_main_menu(context): return menu_html +# Reads the variable local_settings.MAIN_MENU +# Parses it, returns HTML +@register.simple_tag(takes_context=True) +def generate_frontpage_menu(context): + # Get the request object + try: + request = context['request'] + except KeyError: + request = context['view'].request + + if 12 % len(settings.FRONTPAGE_MENU) != 0: + return """ + <div class="alert alert-danger"> + ERROR IN MENU CONFIGURATION. 12 MUST BE DIVISABLE BY NUMBER OF COLUMNS + </div> + """ + + menu_html = '' + col_md = 12/len(settings.FRONTPAGE_MENU) + for col in settings.FRONTPAGE_MENU: + menu_html += '<div class="col-md-%s"><h3>%s</h3>' % (col_md,_(col["label"])) + menu_html += "<ul class='linkList'>" + for item in col["items"]: + menu_html += '<li><a href="%s">%s</a></li>' % (item["label"], item["label"]) + menu_html += "</ul>" + menu_html += "</div>" + return menu_html + # Get the footer text in correct language # REPLACED WITH THE MORE FLEXIBLE get_text_i18(text_dict) BELOW """