From cdfa83e67a8cdad87f8e7d89fabf42d3d19847ef Mon Sep 17 00:00:00 2001 From: Tor-Einar Skog <tor-einar.skog@nibio.no> Date: Fri, 7 Apr 2017 12:22:20 -0700 Subject: [PATCH] New text Now getting only the current season's observations on the front page --- VIPSWeb/static/js/frontpage.js | 2 +- VIPSWeb/static/js/util.js | 6 ++++++ observations/locale/de/LC_MESSAGES/django.mo | Bin 421 -> 421 bytes observations/locale/de/LC_MESSAGES/django.po | 8 ++------ observations/locale/nb/LC_MESSAGES/django.mo | Bin 1242 -> 1106 bytes observations/locale/nb/LC_MESSAGES/django.po | 10 +++------- .../locale/zh_CN/LC_MESSAGES/django.mo | Bin 904 -> 904 bytes .../locale/zh_CN/LC_MESSAGES/django.po | 8 ++------ .../templates/observations/detail.html | 4 +--- 9 files changed, 15 insertions(+), 23 deletions(-) diff --git a/VIPSWeb/static/js/frontpage.js b/VIPSWeb/static/js/frontpage.js index 260bda47..75e7f947 100755 --- a/VIPSWeb/static/js/frontpage.js +++ b/VIPSWeb/static/js/frontpage.js @@ -66,7 +66,7 @@ var filteredObservations; function cacheObservations() { //$.getJSON(settings.vipslogicProtocol + "://" + settings.vipslogicServerName + "/rest/observation/broadcast/list/" + settings.vipsOrganizationId, function( json ) { - $.getJSON("/vipslogicproxy/rest/observation/broadcast/list/" + settings.vipsOrganizationId, function( json ) { + $.getJSON("/vipslogicproxy/rest/observation/broadcast/list/" + settings.vipsOrganizationId + "?season=" + getCurrentYear(), function( json ) { allObservations = json; //console.log(allObservations); filterObservations(); diff --git a/VIPSWeb/static/js/util.js b/VIPSWeb/static/js/util.js index d1e28f9f..d156b7b7 100755 --- a/VIPSWeb/static/js/util.js +++ b/VIPSWeb/static/js/util.js @@ -75,6 +75,12 @@ function setMomentToMidnight(momentObj) return momentObj.hour(0).minute(0).second(0).millisecond(0); } +function getCurrentYear() +{ + return getSystemTime().year(); + +} + /** * Returns the computed CSS display of the element. Handling both IE * and the normal browsers diff --git a/observations/locale/de/LC_MESSAGES/django.mo b/observations/locale/de/LC_MESSAGES/django.mo index 7f738fc76247996f3a81b8dd19b6a096fa425fd5..9f1651026de521647d7079914362dc39e43581ab 100755 GIT binary patch delta 18 ZcmZ3=yp(yu1a=bzLo+J_^NrK_7y&gj1uFmm delta 18 ZcmZ3=yp(yu1a@NuLsKgQqm9$~7y&g11tb6f diff --git a/observations/locale/de/LC_MESSAGES/django.po b/observations/locale/de/LC_MESSAGES/django.po index 8c75c166..26a36757 100755 --- a/observations/locale/de/LC_MESSAGES/django.po +++ b/observations/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: 2017-03-13 15:02-0700\n" +"POT-Creation-Date: 2017-03-14 16:07-0700\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" @@ -51,11 +51,7 @@ msgid "Observation was not quantified" msgstr "" #: templates/observations/detail.html:116 -msgid "Location is hidden" -msgstr "" - -#: templates/observations/detail.html:117 -msgid "The observer has requested that the location is hidden" +msgid "Map view not available" msgstr "" #: templates/observations/index.html:25 templates/observations/index.html:28 diff --git a/observations/locale/nb/LC_MESSAGES/django.mo b/observations/locale/nb/LC_MESSAGES/django.mo index caa54dcd2c5a520a101455b42fb5931e419b6887..8ba93cf30c28a0c3c566cf5005ce6cd98e7794de 100755 GIT binary patch delta 446 zcmcb`d5NR`o)F7a1_lNOJ_ZH`83qQ19tH*mVFm_<KOjK{1_lpC1_n+B1_n<?1_l-e z28Lip1_pKp28IYm1_m((28IMi1_o{h28MD*1_l8J28L!v1_n6>28Jn&3=BLB3=EqY z85lSi7#I#f>645Q^Di+nFo-fR)H6JTD*VI9z>p2HjERAPpMim)l$n8nje&uom6?Ho z3*<0n1_oIM28QX(5DT|5Lo7VV%)p?`z`$^cnSp_qfq~&0RGx(e;&1^Lutf|~P}+b6 zqTh{$fq{{s9^xyIMrNpwL9PZ_4DuC72;_Sv5QBk%ffX83ATB5rKn?@>4#a10%*jzG zNG&cYW^gXbFJSOUO-#wmOK0#+EKn%ROf6T)%P&z#EKAJHNleN~W$;fbPAw{%Jd-hO zvKmt_yNQCKnU#V0=3Pt%jI!Q|MI~jK#d(=|=?a<I*{KR8nK|iMsd?$CIhpB`SaK(? HWHAH)2r@lS delta 569 zcmcb_af`G5o)F7a1_lNOeg*~x83qQ1DGUq@;tUK7Jd7Yw28Ikq1_n+B28K*V1_l-e z28Lor1_pKp28Ieo1_mJp28ISk1_o{h28PLu3=9Gc3=H!b85rak7#KD%GBEHkFfg2F zWMJT6U|_fdrJph~FqkngFuY@AU=U_tsAo`RVqg$uU|_Ihf@tt(VqnN-WMGJ4f;j2~ zGXnz~0|UbiW(Ec>1_p-v%nS@-3=9mfm?0K3vOp~6Wno}YW?*2DV_{(6Wnf@%Vu8p9 zus}Qz!@|H|&A`Br#saZ#5ty!LVAugwc#egE0pw|rWgs7dTn!2Xkncb=$oC)`<SP&j z!k~}=Sq5UWGB7akK|_)mBml)AM>B!gjyX9B1*yd)#SG3x`2`Ffsfj6>qIu~IKKaRs zC7Jno3Yo<U8JQ_5sd<yj7-LN{QWf%(ic^cqQi~Ka5{ngzQVUB{i%U{d6iPA@OB6~n zQWbJAbzWrbXE#<bG_^7?+MLd0z$g}wlUQ7wT9lcWo|>nSTBJ~%omHAsGI<Mgu1U$^ r9Yv{m3K@w-3Q4IcB?|eu3W+5O1;`qTvlDX^$__6pN`+~ZWU&MQF%V%? diff --git a/observations/locale/nb/LC_MESSAGES/django.po b/observations/locale/nb/LC_MESSAGES/django.po index f81e9377..5a30ff61 100755 --- a/observations/locale/nb/LC_MESSAGES/django.po +++ b/observations/locale/nb/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-03-13 15:02-0700\n" +"POT-Creation-Date: 2017-03-14 16:07-0700\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" @@ -55,12 +55,8 @@ msgid "Observation was not quantified" msgstr "Observasjonen ble ikke kvantifisert" #: templates/observations/detail.html:116 -msgid "Location is hidden" -msgstr "Plasseringen er skjult" - -#: templates/observations/detail.html:117 -msgid "The observer has requested that the location is hidden" -msgstr "Observatøren har bedt om at plasseringen skal være skjult" +msgid "Map view not available" +msgstr "Kartvisning ikke tilgjengelig" #: templates/observations/index.html:25 #: templates/observations/index.html:28 diff --git a/observations/locale/zh_CN/LC_MESSAGES/django.mo b/observations/locale/zh_CN/LC_MESSAGES/django.mo index a13deac788545c69ece15bc23629f82aba2adc81..2ccebfda8096607d428c0e2993b9d9f8a9bb3e1b 100755 GIT binary patch delta 20 bcmeBR?_l4c#Kdl*U}$D#V7^(CDV`AkGp7WU delta 20 bcmeBR?_l4c#Kdl_U}$P(V6<72DV`AkGjs%v diff --git a/observations/locale/zh_CN/LC_MESSAGES/django.po b/observations/locale/zh_CN/LC_MESSAGES/django.po index 6d504772..555c8ddc 100755 --- a/observations/locale/zh_CN/LC_MESSAGES/django.po +++ b/observations/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: 2017-03-13 15:02-0700\n" +"POT-Creation-Date: 2017-03-14 16:07-0700\n" "PO-Revision-Date: 2016-10-27 11:26+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -50,11 +50,7 @@ msgid "Observation was not quantified" msgstr "观测没有定量化" #: templates/observations/detail.html:116 -msgid "Location is hidden" -msgstr "" - -#: templates/observations/detail.html:117 -msgid "The observer has requested that the location is hidden" +msgid "Map view not available" msgstr "" #: templates/observations/index.html:25 templates/observations/index.html:28 diff --git a/observations/templates/observations/detail.html b/observations/templates/observations/detail.html index 6dd5c1ec..06888ba6 100755 --- a/observations/templates/observations/detail.html +++ b/observations/templates/observations/detail.html @@ -113,9 +113,7 @@ function renderLocationIsHiddenMessage(){ document.getElementById("observationViewMap").parentNode.innerHTML = - "<h2>{% trans "Location is hidden" %}</h2>" + - "<p>{% trans "The observer has requested that the location is hidden" %}</p>" + - "<p><img class='img-responsive' src='{% static "observations/images/globe.png" %}'/></p>"; + "<h2>{% trans "Map view not available" %}</h2>"; } </script> {% endblock %} -- GitLab