From 202d2af54d0f76a416d9484409980d7f0c94823f Mon Sep 17 00:00:00 2001 From: Tor-Einar Skog <tor-einar.skog@bioforsk.no> Date: Fri, 29 Jan 2016 13:35:02 +0100 Subject: [PATCH] New basic layout template Finished template for front page --- VIPSWeb/local_settings_sample.py | 34 +++++++ VIPSWeb/locale/bg/LC_MESSAGES/django.mo | Bin 798 -> 738 bytes VIPSWeb/locale/bg/LC_MESSAGES/django.po | 88 ++++++++++------ VIPSWeb/locale/bs/LC_MESSAGES/django.mo | Bin 1083 -> 1051 bytes VIPSWeb/locale/bs/LC_MESSAGES/django.po | 88 ++++++++++------ VIPSWeb/locale/fi/LC_MESSAGES/django.mo | Bin 570 -> 529 bytes VIPSWeb/locale/fi/LC_MESSAGES/django.po | 88 ++++++++++------ VIPSWeb/locale/nb/LC_MESSAGES/django.mo | Bin 2096 -> 2369 bytes VIPSWeb/locale/nb/LC_MESSAGES/django.po | 94 ++++++++++------- VIPSWeb/locale/vi/LC_MESSAGES/django.mo | Bin 2193 -> 1987 bytes VIPSWeb/locale/vi/LC_MESSAGES/django.po | 104 ++++++++++++------- VIPSWeb/static/css/vipsweb.css | 129 +++++++++++++++++++----- VIPSWeb/static/images/logo_vips_new.png | Bin 0 -> 6049 bytes VIPSWeb/static/js/frontpage.js | 42 ++++++-- VIPSWeb/templates/index.html | 100 +++++++++--------- VIPSWeb/templatetags/template_helper.py | 28 +++++ 16 files changed, 544 insertions(+), 251 deletions(-) create mode 100644 VIPSWeb/static/images/logo_vips_new.png diff --git a/VIPSWeb/local_settings_sample.py b/VIPSWeb/local_settings_sample.py index 24dfb546..0ee25778 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 GIT binary patch delta 177 zcmbQo_K3Cqo)F7a1_lNORt5$J83qOh7X}6fb_NE99FQOb149P`0|O@m14AbR1A`I+ z1H)tn1_nU}28L}=btf1Y7%CVU7%ng{FbFU(FnBUCFvKx1FhnsiFbFX)FzjSvU=U?s zU^v6Xz`zJKlbL~mfdyhGNC^W26G*}>zbG|1vAAU7u0~!nT?0d1BTEHCV=H5$%^r+4 KjFYD`wF3aOs}_3z delta 236 zcmaFFI*+aXo)F7a1_lNOHU<U;83qOh9|i^nZUzR18jv6Z1H%di1_n+B28NXk3=A9$ z3=EqY7#Nfo7#Q|2Ffa%*FfiO_U|?WpU|{&jz`#(!$iVQEfq_AQfq|ijiGe|gfq|i! ziGd-Gfq`Kfl>e29fk6~x7Bd3_BLjmq0}Iq57{$cEz`)GFz`zO>067fIbjvSFO-?K> zDQ56ZEiO(>Pn|fik=In$&`8(NM8VL+%Gi9fJfjVx;KGYt7xrD)c(L=s)(d+t?6}xJ IIg+Up0JOCy_5c6? diff --git a/VIPSWeb/locale/bg/LC_MESSAGES/django.po b/VIPSWeb/locale/bg/LC_MESSAGES/django.po index 669d35f5..a8752d80 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 GIT binary patch delta 283 zcmdnZF`J|Qo)F7a1_lNOZUzPh83qQ15(WkaK?VkfGax|*1_l8}1_oA;7$XA%Cj$e6 zI3ojt7y|=?A|nHX1Oo$u1tS9k4+8^3AR_~VC<6mS93umR2*?~p1_mVt28K>Xh<R%m z85r0Z7#Q|3GB8YKWMDW3;U_V~FhdMZVTKrx$IQSW&cMLX!py)Rz`(#ThZ$nwT4spB zN0=EH6c`v7ZZb142s1D+{9=YUfRBZNfsp}X3CN)!_p^bBi66xUIY103<^uV4vLvJD g<ZQ-myk@!vhPp<U3Wmm3#zvd<m^v9J?_;h705|{}$^ZZW delta 324 zcmbQuv74j*o)F7a1_lNO9tH*m83qQ18U_XiK?VkfJ0L*@1_lL21_o9J1_nh&1_n+B z1_pIT1_m((1_nb$1_lWR1_lpC1_llW28KjNh#6Uo3=E<S3=HLr3=AR+3=F-D3=B#P z3=E4HA?6-sWME)tU|_h;$iOg_k)fX9K2)HT8Dc>#GsJ*)W(Edv1_p+?%nS@{3=9lg znHd-a7#JA#Fhd-0mKkEf6J`bm1qKF&pUeyl!VC-yQY;XM=&>*`Ffu?K#|8Ba$YPLL zAP=!HFfcGPOnk>B2=W$G0RuNEC?<0<da|b$7bm8t7Ecaf+`((AYiOivXrf?fVr6W; RS(K@hk-4Zed-5#iMgU3dB02y7 diff --git a/VIPSWeb/locale/bs/LC_MESSAGES/django.po b/VIPSWeb/locale/bs/LC_MESSAGES/django.po index fb4cae55..e6bc3a82 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 GIT binary patch delta 166 zcmdnRGLfbJo)F7a1_lNO76t|e83qOh8wLgjRt5%!7?2<X1499nU&z3~z{$YCP|m=> zz|O$H(8$2Rkj==z&<WN1m63sgn}LDh7b61$7Xt$W8xsQqBUBD#6f*+@0~3hhT$Eo> w%;1(^l$xAaTrzP%G_RSifuXLErGlZcm9f!g4n}!K?vT`?vec5&ocu%v0PPYNfB*mh delta 207 zcmbQpvWunuo)F7a1_lNORt5$J83qOh7X}6fb_NE99FQOb149Q?u9Ja*fs=uOp`U?) zfrEj8VJ1}FA_fMAY(@r#RSXOaEDQ_`VoVGS+zbp1(o7I@)R`C<xEL51^qCkK7@=k| zL1|V721T$YW{`k$QGP)&gIj)4YI0(6Nil<OYH@L5dg{dbXkJrYLnB>769q#PD`WGG b&*d3~!!lEgOEOCsLQ;#$QcFs6@)H>VtWq9r diff --git a/VIPSWeb/locale/fi/LC_MESSAGES/django.po b/VIPSWeb/locale/fi/LC_MESSAGES/django.po index 4a2a408f..32c2c178 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 GIT binary patch delta 1058 zcmdlWa8RiJo)F7a1_lNOc?Jds83qOh5k>|EO$G)A9wv||1H%R;1_mAm28NAH3=AR+ z3=I327#LU?7#J=yF);8kFfiO?VqoB8U|@K`#K0iLz`*c{iGe|kfq{XQnSp^DWF|8M z0|x^Gg9bAL13v=;gCR2mg9HNugCjH8+<Jy6W{8355CMi<W(EdP1_p*IW{8Com>C!( z85kIrGBYr+FfcIehsqyeW?(R2U|_h#%)r3Tz`(%G0-=Rjzy>o&voJ6yfGlQVU{GRU zVDMyNU=U<rV8~%%U@&4}V5nnZU`S=CXJFXK0&$r*E5rbGRtAP5Mg|6bR)`N5u`w_R zgF=7};*+Cn5cTKSAnNb2F);8lFfcrWihp5)_?(5Efq{*IfkA*BqF$UG;xTo0hy!gw z^7RZ13|>%yKz4|a<Dd$Q*%=t585kHkq4G=FAwj!|oq@refq~&9JH$bZ91sJ!ptLv# z1A{ID1A__&1A__!149r8#N2WY1_omW28JFE28K)q28IJ13=H+4xYgo>#GyGS0|O%i z#MPiU1*HHf5CO%Y_yolzGbnyRamxUS8mKfl4T0F8bRh>yOAHJQ&}0M-K>?5?6w5Mz zJr@p6G@$qfB^oXU1_p5kNN|DT3gkFYoP!b!NFOMeL2=FCn3JQBn_66)n4Vh9;G9~N znwV3pkeHXEke``ToSK?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c1E7?{G#m4ymW<<%#xhRx~$&3rn-hkx`rkSh9*|V=9^ntWf>*Cb278D z71HvH6b>&{NX<(rN>wN>C_20}d-4%BWvj%ZRIprPUV2e#0fT2=T7FS(VsTb}9)oXb zPG-778k!2<)SQ&ey!6zf$u{i1T*29iDXHmMhj$cBKE@unS%pKEk<YOxDK#^txFoZr IBsGTt0DRwj(*OVf diff --git a/VIPSWeb/locale/nb/LC_MESSAGES/django.po b/VIPSWeb/locale/nb/LC_MESSAGES/django.po index bb606c5f..a1d0b0ad 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 GIT binary patch delta 552 zcmbOzc$mNbo)F7a1_lNOF$M+(83qQ1GYkw2vJ4CiHH;up28Iue3=FIc3=AI`85sB& z7#O}YGB9v5Ffgz&LG%bPF)(m5FfgbyF)&ClFfbT1F);8jFfjNqLG(pJ`SDB)45ADS z3^_~;3?d8+3{6Z73@i)`^$gRQ7#Iu~7#QX-F)*+*Ffg2j(pQ-n7!(*7816DLFbFa* zF#Ka;U@&4}U=UztU`S<PU~pz;VBlw9U|7iv(YKSCfgy#Ff#D!C!~tro3=HBR2eCpN z?9Ix+Aj!bM5X#EHz{SA8kk87%pvh3rz)-~s@yQZah{oNl5Eq_cWnhp3Ie-=7kRPlN zpGvYZFnBO9FsQOIFz_-kFyyf@FbIG`j13ZUy=;(>Sk1=35Xr#6aD<J4p^1TkL5>|_ z?m~8mJ=@qB7#QmrAg&RDgf`emP$oFoK_Mc{0I`UJfq{XU0pbWy6o5hn6qF$Kpr8c> zJBSU!AP0e>3lyzv3=9lRAVCIjkTWni7v&ceGq`2uq$*5KWeVK9pQ(g#vLj0vhmoa% Yp|O>*(dPLq?2MDIvDR&lXOm|F0PDXo)&Kwi delta 746 zcmX@iKT)v$o)F7a1_lNONd^W683qQ1CkzY>stgPaYZyVI3=9rT3=9$s3=ED;3=FIc z3=C0B3=Dh>3=9cO3=EtM3=H{93=Con3=EY_3=G^13=9*X>gO;qFmNz1Fl=RFVBle3 zVAu!Me;Ufa$i%=P%D_<1aF2<BL4<*U;R_Q30}BHK11B>Bg8>5r10OR313Lo)gFTdX zXJ%kfU|?YIXJ%j!WME(@U}j)2VqjosVrF1S1zE(*z`)PIz#z>6(WlMAz`)DEz+lY6 zz>vboz~IQjz@X2-z_5%J;-G7+3=HB7^$ZM;Ss_08%?b$xRyGC(E(Qh$c{T<HO$G)A zEhs;P4dT;yHi!XbY!HVxvoSD8F)%R9V1qbtGaDo%uCOsMcrY+9JYa)3M3bF?L4bjQ z!JM6eL6(7m!GoQFL86|4fgz2ZfgzHCfuWwAfuV_kf#D`Q#NZeXh((1Q3=BdH3=DM~ z3=Gg%0R<g6en3$HW`IJD0b(&I*kNKI3qipz&Hyn36mlRrVFpNO$1;I<3=j)Jz6NpG zpy>e=-yl9HSV2JvVuRuu6fGb&GXo@TFgWLACTA;@<SQg+B<7{3D&!>QrI#kAr%wLB z7|WhoT%4GmTD;ktsf>{)JijPAGcR4CB(o%E@_yzB4g*UC14}Dov(54>?2P(;84q_Y z%~L2lydYoU$i%~oDiw}Qe7L(=p(G;_!kn6^ke7aVOP)er`orDpC#$m7bA@E)Ddc55 c+_gS$^I}#7CSmW4!&|^M99~rl*51ef0BZbb6951J diff --git a/VIPSWeb/locale/vi/LC_MESSAGES/django.po b/VIPSWeb/locale/vi/LC_MESSAGES/django.po index ffa1e73a..637e6c32 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 2f11d8b7..82c958d8 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 GIT binary patch literal 6049 zcmeAS@N?(olHy`uVBq!ia0y~yV0gs9z);1(#=yX^NVWeb0|Ns~v6E*A2L}g74M$1` z1A};kr;B4q#hkZuD`&{0Zf(CGe06h*;snMk0w22;aGcnyp)q0Ryq*OLMVvEd^613~ zOlXkqxN~}5%0ABs7S<^odE({)6VK@=CWthd&Gb`Bn9`uIgTYNu-`mVX&G>TY^M4m- zPDtJM?$@r}yO!U3{;+b{s?~L+FTSkIx4v)b<g&x?*vjH-GJ0BH7s)IwFeqT~IGT|c zzQZc@R{p8YQw142MQ=BB9Gq#l|K;C(=OsV<(5acpw7@!cVe`H1#<S)WWxRR)bA$dN zy`UUsrLtw)a-VtjS%ou|GA@n#<|)7N(4Eiz(q*nsrmt}2;oO>btj_7EQ(*2Uh3DE; zX-`^~IzQ=9TyV~$-s8gj#%mFi_Nb*=)hBvtFJf@%i%5BOYnH#@Rab|lswYFEm%Z71 zU{aV%W5=-$R~5VcE5+usHx!nMr0x~J{C(Y=%OB0Hs{~t>vIM(b*3R50Z#Orh*y)P+ z`!7?AcPXjsIL=9uHW16)x%+5o$6uBk*XOOevt!ZL?3K2AJDh|plLRY1_Wyf&prm_} zc5K|<LyO{E8at15u%_MKVbHlZ@t{>_rMu4j%|G5x`=Zq4a79UM!sGS1ccka<-tfF- z)r;jy>N>Sb?m7y4YtNN8Y>%3<$28UI{ni!YfhtPwIs&E3UKTe^T``lf&V1vt=k+?T zTty~k^h7W$n>o{chsA!zRc|z2sZGBz(R1>TZrQyZNy1w@DwloxC0V`0qCEL5r(;2y zyI(|{3-_-|x2hy_=J#8cE-$Fwp1J?_v^W=wj;JFxLHDm!>^iVq*K1v;;Y)6@uS!l% zCT?ehOP76&ZCb;o7B%V4BkNC%qMvWg-?BtpP-&5vA-_yol$Pw1<2Q<(Ty_`~9r~nN zbi^j0+1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eb/static/js/frontpage.js b/VIPSWeb/static/js/frontpage.js index 5568147d..1761a2af 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 f2eb97f9..aa832560 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 c6b6c7b1..5e8eb69a 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 """ -- GitLab