From 562a474849caf69fdeeae9656d1f7841eb647819 Mon Sep 17 00:00:00 2001 From: lewa <lene.wasskog@nibio.no> Date: Tue, 25 Jun 2024 14:10:13 +0200 Subject: [PATCH] feat: Make observation and timeseries details more similar --- .gitignore | 4 + VIPSWeb/static/css/vipsweb.css | 17 ++-- observations/locale/bg/LC_MESSAGES/django.po | 68 +++++++------- .../locale/bg/LC_MESSAGES/djangojs.po | 12 +-- observations/locale/bs/LC_MESSAGES/django.po | 68 +++++++------- .../locale/bs/LC_MESSAGES/djangojs.po | 12 +-- observations/locale/de/LC_MESSAGES/django.po | 68 +++++++------- .../locale/de/LC_MESSAGES/djangojs.po | 12 +-- observations/locale/fi/LC_MESSAGES/django.po | 68 +++++++------- .../locale/fi/LC_MESSAGES/djangojs.po | 12 +-- observations/locale/nb/LC_MESSAGES/django.mo | Bin 1655 -> 1719 bytes observations/locale/nb/LC_MESSAGES/django.po | 84 +++++++++--------- .../locale/nb/LC_MESSAGES/djangojs.po | 15 ++-- observations/locale/vi/LC_MESSAGES/django.po | 68 +++++++------- .../locale/vi/LC_MESSAGES/djangojs.po | 12 +-- .../locale/zh_Hans/LC_MESSAGES/django.po | 79 ++++++++-------- .../locale/zh_Hans/LC_MESSAGES/djangojs.po | 12 +-- .../templates/observations/detail.html | 80 +++++++++++------ .../templates/observations/timeseries.html | 36 +++++--- 19 files changed, 381 insertions(+), 346 deletions(-) diff --git a/.gitignore b/.gitignore index cc526f32..7cc7775e 100755 --- a/.gitignore +++ b/.gitignore @@ -18,5 +18,9 @@ VIPSWeb/static/test/dot_green.png VIPSWeb/static/test/oatFloweringModelForm.html VIPSWeb.code-workspace venv +.venv *.bkp ipmd/.$IPMD_DSS_Metadata_structure.drawio.bkp +.DS_Store +.idea +makefile \ No newline at end of file diff --git a/VIPSWeb/static/css/vipsweb.css b/VIPSWeb/static/css/vipsweb.css index 8a1a3750..2b389a38 100755 --- a/VIPSWeb/static/css/vipsweb.css +++ b/VIPSWeb/static/css/vipsweb.css @@ -793,20 +793,21 @@ td.dateCell { background-color: white; } -#observationTimeSeries .label { - color: darkgrey; +#observationTimeSeriesDetails .label, #observationDetails .label { + color: #C9C9C9; font-size: 1.1em; padding: 0; - font-weight: lighter; + font-weight: normal; } -#observationTimeSeries .description { - padding: 3px; - margin-top: 3px; - margin-bottom: 15px; - font-style: italic; +#observationData table { + margin: 8px 0px; } +#observationData td { + border: 1px solid #C9C9C9; + padding: 2px; +} table.messageTable tr, table.messageTable td { diff --git a/observations/locale/bg/LC_MESSAGES/django.po b/observations/locale/bg/LC_MESSAGES/django.po index 63c6b018..c87e2747 100644 --- a/observations/locale/bg/LC_MESSAGES/django.po +++ b/observations/locale/bg/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-24 12:43+0200\n" +"POT-Creation-Date: 2024-06-25 13:59+0200\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,52 +18,59 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: templates/observations/detail.html:25 templates/observations/detail.html:28 +#: templates/observations/detail.html:25 templates/observations/detail.html:30 msgid "Observation" msgstr "" -#: templates/observations/detail.html:29 -#: templates/observations/timeseries.html:28 -msgid "View all observations" -msgstr "" - -#: templates/observations/detail.html:29 -msgid "View all observations in time series" -msgstr "" - -#: templates/observations/detail.html:32 templates/observations/index.html:46 +#: templates/observations/detail.html:34 templates/observations/index.html:46 #: templates/observations/index.html:68 #: templates/observations/index_old.html:63 -#: templates/observations/timeseries.html:31 +#: templates/observations/timeseries.html:32 msgid "Organism" msgstr "" -#: templates/observations/detail.html:34 templates/observations/index.html:50 +#: templates/observations/detail.html:36 templates/observations/index.html:50 #: templates/observations/index.html:69 #: templates/observations/index_old.html:64 -#: templates/observations/timeseries.html:33 +#: templates/observations/timeseries.html:34 msgid "Crop" msgstr "" -#: templates/observations/detail.html:36 templates/observations/index.html:67 +#: templates/observations/detail.html:38 templates/observations/index.html:67 #: templates/observations/index_old.html:62 msgid "Date of observation" msgstr "" -#: templates/observations/detail.html:40 -msgid "Observation data" +#: templates/observations/detail.html:41 templates/observations/index.html:71 +#: templates/observations/timeseries.html:23 +#: templates/observations/timeseries.html:28 +msgid "Time series" msgstr "" -#: templates/observations/detail.html:97 -msgid "Observation was not quantified" +#: templates/observations/detail.html:45 +#: templates/observations/timeseries.html:36 +msgid "Location" +msgstr "" + +#: templates/observations/detail.html:48 +msgid "Observation data" msgstr "" -#: templates/observations/detail.html:101 +#: templates/observations/detail.html:51 msgid "Illustrations" msgstr "" -#: templates/observations/detail.html:130 -#: templates/observations/timeseries.html:151 +#: templates/observations/detail.html:62 +#: templates/observations/timeseries.html:52 +msgid "View all observations" +msgstr "" + +#: templates/observations/detail.html:119 +msgid "Observation was not quantified" +msgstr "" + +#: templates/observations/detail.html:157 +#: templates/observations/timeseries.html:161 msgid "Map view not available" msgstr "" @@ -94,6 +101,10 @@ msgstr "" msgid "Heading" msgstr "" +#: templates/observations/index.html:72 +msgid "Details" +msgstr "" + #: templates/observations/index_old.html:33 msgid "All pests" msgstr "" @@ -118,15 +129,6 @@ msgstr "" msgid "View details" msgstr "" -#: templates/observations/timeseries.html:23 -#: templates/observations/timeseries.html:29 -msgid "Time series" -msgstr "" - -#: templates/observations/timeseries.html:35 -msgid "Location" -msgstr "" - -#: templates/observations/timeseries.html:37 +#: templates/observations/timeseries.html:38 msgid "Number of observations" msgstr "" diff --git a/observations/locale/bg/LC_MESSAGES/djangojs.po b/observations/locale/bg/LC_MESSAGES/djangojs.po index 5f60fdb9..9b66a900 100644 --- a/observations/locale/bg/LC_MESSAGES/djangojs.po +++ b/observations/locale/bg/LC_MESSAGES/djangojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-24 12:43+0200\n" +"POT-Creation-Date: 2024-06-25 13:59+0200\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" @@ -26,18 +26,14 @@ msgstr "" msgid "in" msgstr "" -#: static/observations/js/observationList.js:368 -msgid "Details" -msgstr "" - -#: static/observations/js/observationList.js:638 +#: static/observations/js/observationList.js:637 msgid "Days since observation" msgstr "" -#: static/observations/js/observationList.js:641 +#: static/observations/js/observationList.js:640 msgid "Days" msgstr "" -#: static/observations/js/observationList.js:643 +#: static/observations/js/observationList.js:642 msgid "Older" msgstr "" diff --git a/observations/locale/bs/LC_MESSAGES/django.po b/observations/locale/bs/LC_MESSAGES/django.po index 69ededed..d69344a4 100644 --- a/observations/locale/bs/LC_MESSAGES/django.po +++ b/observations/locale/bs/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-24 12:43+0200\n" +"POT-Creation-Date: 2024-06-25 13:59+0200\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" @@ -19,52 +19,59 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: templates/observations/detail.html:25 templates/observations/detail.html:28 +#: templates/observations/detail.html:25 templates/observations/detail.html:30 msgid "Observation" msgstr "" -#: templates/observations/detail.html:29 -#: templates/observations/timeseries.html:28 -msgid "View all observations" -msgstr "" - -#: templates/observations/detail.html:29 -msgid "View all observations in time series" -msgstr "" - -#: templates/observations/detail.html:32 templates/observations/index.html:46 +#: templates/observations/detail.html:34 templates/observations/index.html:46 #: templates/observations/index.html:68 #: templates/observations/index_old.html:63 -#: templates/observations/timeseries.html:31 +#: templates/observations/timeseries.html:32 msgid "Organism" msgstr "" -#: templates/observations/detail.html:34 templates/observations/index.html:50 +#: templates/observations/detail.html:36 templates/observations/index.html:50 #: templates/observations/index.html:69 #: templates/observations/index_old.html:64 -#: templates/observations/timeseries.html:33 +#: templates/observations/timeseries.html:34 msgid "Crop" msgstr "" -#: templates/observations/detail.html:36 templates/observations/index.html:67 +#: templates/observations/detail.html:38 templates/observations/index.html:67 #: templates/observations/index_old.html:62 msgid "Date of observation" msgstr "" -#: templates/observations/detail.html:40 -msgid "Observation data" +#: templates/observations/detail.html:41 templates/observations/index.html:71 +#: templates/observations/timeseries.html:23 +#: templates/observations/timeseries.html:28 +msgid "Time series" msgstr "" -#: templates/observations/detail.html:97 -msgid "Observation was not quantified" +#: templates/observations/detail.html:45 +#: templates/observations/timeseries.html:36 +msgid "Location" +msgstr "" + +#: templates/observations/detail.html:48 +msgid "Observation data" msgstr "" -#: templates/observations/detail.html:101 +#: templates/observations/detail.html:51 msgid "Illustrations" msgstr "" -#: templates/observations/detail.html:130 -#: templates/observations/timeseries.html:151 +#: templates/observations/detail.html:62 +#: templates/observations/timeseries.html:52 +msgid "View all observations" +msgstr "" + +#: templates/observations/detail.html:119 +msgid "Observation was not quantified" +msgstr "" + +#: templates/observations/detail.html:157 +#: templates/observations/timeseries.html:161 msgid "Map view not available" msgstr "" @@ -95,6 +102,10 @@ msgstr "" msgid "Heading" msgstr "" +#: templates/observations/index.html:72 +msgid "Details" +msgstr "" + #: templates/observations/index_old.html:33 msgid "All pests" msgstr "" @@ -119,15 +130,6 @@ msgstr "" msgid "View details" msgstr "" -#: templates/observations/timeseries.html:23 -#: templates/observations/timeseries.html:29 -msgid "Time series" -msgstr "" - -#: templates/observations/timeseries.html:35 -msgid "Location" -msgstr "" - -#: templates/observations/timeseries.html:37 +#: templates/observations/timeseries.html:38 msgid "Number of observations" msgstr "" diff --git a/observations/locale/bs/LC_MESSAGES/djangojs.po b/observations/locale/bs/LC_MESSAGES/djangojs.po index 36401b1e..46584314 100644 --- a/observations/locale/bs/LC_MESSAGES/djangojs.po +++ b/observations/locale/bs/LC_MESSAGES/djangojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-24 12:43+0200\n" +"POT-Creation-Date: 2024-06-25 13:59+0200\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" @@ -27,18 +27,14 @@ msgstr "" msgid "in" msgstr "" -#: static/observations/js/observationList.js:368 -msgid "Details" -msgstr "" - -#: static/observations/js/observationList.js:638 +#: static/observations/js/observationList.js:637 msgid "Days since observation" msgstr "" -#: static/observations/js/observationList.js:641 +#: static/observations/js/observationList.js:640 msgid "Days" msgstr "" -#: static/observations/js/observationList.js:643 +#: static/observations/js/observationList.js:642 msgid "Older" msgstr "" diff --git a/observations/locale/de/LC_MESSAGES/django.po b/observations/locale/de/LC_MESSAGES/django.po index 63c6b018..c87e2747 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: 2024-06-24 12:43+0200\n" +"POT-Creation-Date: 2024-06-25 13:59+0200\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,52 +18,59 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: templates/observations/detail.html:25 templates/observations/detail.html:28 +#: templates/observations/detail.html:25 templates/observations/detail.html:30 msgid "Observation" msgstr "" -#: templates/observations/detail.html:29 -#: templates/observations/timeseries.html:28 -msgid "View all observations" -msgstr "" - -#: templates/observations/detail.html:29 -msgid "View all observations in time series" -msgstr "" - -#: templates/observations/detail.html:32 templates/observations/index.html:46 +#: templates/observations/detail.html:34 templates/observations/index.html:46 #: templates/observations/index.html:68 #: templates/observations/index_old.html:63 -#: templates/observations/timeseries.html:31 +#: templates/observations/timeseries.html:32 msgid "Organism" msgstr "" -#: templates/observations/detail.html:34 templates/observations/index.html:50 +#: templates/observations/detail.html:36 templates/observations/index.html:50 #: templates/observations/index.html:69 #: templates/observations/index_old.html:64 -#: templates/observations/timeseries.html:33 +#: templates/observations/timeseries.html:34 msgid "Crop" msgstr "" -#: templates/observations/detail.html:36 templates/observations/index.html:67 +#: templates/observations/detail.html:38 templates/observations/index.html:67 #: templates/observations/index_old.html:62 msgid "Date of observation" msgstr "" -#: templates/observations/detail.html:40 -msgid "Observation data" +#: templates/observations/detail.html:41 templates/observations/index.html:71 +#: templates/observations/timeseries.html:23 +#: templates/observations/timeseries.html:28 +msgid "Time series" msgstr "" -#: templates/observations/detail.html:97 -msgid "Observation was not quantified" +#: templates/observations/detail.html:45 +#: templates/observations/timeseries.html:36 +msgid "Location" +msgstr "" + +#: templates/observations/detail.html:48 +msgid "Observation data" msgstr "" -#: templates/observations/detail.html:101 +#: templates/observations/detail.html:51 msgid "Illustrations" msgstr "" -#: templates/observations/detail.html:130 -#: templates/observations/timeseries.html:151 +#: templates/observations/detail.html:62 +#: templates/observations/timeseries.html:52 +msgid "View all observations" +msgstr "" + +#: templates/observations/detail.html:119 +msgid "Observation was not quantified" +msgstr "" + +#: templates/observations/detail.html:157 +#: templates/observations/timeseries.html:161 msgid "Map view not available" msgstr "" @@ -94,6 +101,10 @@ msgstr "" msgid "Heading" msgstr "" +#: templates/observations/index.html:72 +msgid "Details" +msgstr "" + #: templates/observations/index_old.html:33 msgid "All pests" msgstr "" @@ -118,15 +129,6 @@ msgstr "" msgid "View details" msgstr "" -#: templates/observations/timeseries.html:23 -#: templates/observations/timeseries.html:29 -msgid "Time series" -msgstr "" - -#: templates/observations/timeseries.html:35 -msgid "Location" -msgstr "" - -#: templates/observations/timeseries.html:37 +#: templates/observations/timeseries.html:38 msgid "Number of observations" msgstr "" diff --git a/observations/locale/de/LC_MESSAGES/djangojs.po b/observations/locale/de/LC_MESSAGES/djangojs.po index 5f60fdb9..9b66a900 100644 --- a/observations/locale/de/LC_MESSAGES/djangojs.po +++ b/observations/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: 2024-06-24 12:43+0200\n" +"POT-Creation-Date: 2024-06-25 13:59+0200\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" @@ -26,18 +26,14 @@ msgstr "" msgid "in" msgstr "" -#: static/observations/js/observationList.js:368 -msgid "Details" -msgstr "" - -#: static/observations/js/observationList.js:638 +#: static/observations/js/observationList.js:637 msgid "Days since observation" msgstr "" -#: static/observations/js/observationList.js:641 +#: static/observations/js/observationList.js:640 msgid "Days" msgstr "" -#: static/observations/js/observationList.js:643 +#: static/observations/js/observationList.js:642 msgid "Older" msgstr "" diff --git a/observations/locale/fi/LC_MESSAGES/django.po b/observations/locale/fi/LC_MESSAGES/django.po index 63c6b018..c87e2747 100644 --- a/observations/locale/fi/LC_MESSAGES/django.po +++ b/observations/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: 2024-06-24 12:43+0200\n" +"POT-Creation-Date: 2024-06-25 13:59+0200\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,52 +18,59 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: templates/observations/detail.html:25 templates/observations/detail.html:28 +#: templates/observations/detail.html:25 templates/observations/detail.html:30 msgid "Observation" msgstr "" -#: templates/observations/detail.html:29 -#: templates/observations/timeseries.html:28 -msgid "View all observations" -msgstr "" - -#: templates/observations/detail.html:29 -msgid "View all observations in time series" -msgstr "" - -#: templates/observations/detail.html:32 templates/observations/index.html:46 +#: templates/observations/detail.html:34 templates/observations/index.html:46 #: templates/observations/index.html:68 #: templates/observations/index_old.html:63 -#: templates/observations/timeseries.html:31 +#: templates/observations/timeseries.html:32 msgid "Organism" msgstr "" -#: templates/observations/detail.html:34 templates/observations/index.html:50 +#: templates/observations/detail.html:36 templates/observations/index.html:50 #: templates/observations/index.html:69 #: templates/observations/index_old.html:64 -#: templates/observations/timeseries.html:33 +#: templates/observations/timeseries.html:34 msgid "Crop" msgstr "" -#: templates/observations/detail.html:36 templates/observations/index.html:67 +#: templates/observations/detail.html:38 templates/observations/index.html:67 #: templates/observations/index_old.html:62 msgid "Date of observation" msgstr "" -#: templates/observations/detail.html:40 -msgid "Observation data" +#: templates/observations/detail.html:41 templates/observations/index.html:71 +#: templates/observations/timeseries.html:23 +#: templates/observations/timeseries.html:28 +msgid "Time series" msgstr "" -#: templates/observations/detail.html:97 -msgid "Observation was not quantified" +#: templates/observations/detail.html:45 +#: templates/observations/timeseries.html:36 +msgid "Location" +msgstr "" + +#: templates/observations/detail.html:48 +msgid "Observation data" msgstr "" -#: templates/observations/detail.html:101 +#: templates/observations/detail.html:51 msgid "Illustrations" msgstr "" -#: templates/observations/detail.html:130 -#: templates/observations/timeseries.html:151 +#: templates/observations/detail.html:62 +#: templates/observations/timeseries.html:52 +msgid "View all observations" +msgstr "" + +#: templates/observations/detail.html:119 +msgid "Observation was not quantified" +msgstr "" + +#: templates/observations/detail.html:157 +#: templates/observations/timeseries.html:161 msgid "Map view not available" msgstr "" @@ -94,6 +101,10 @@ msgstr "" msgid "Heading" msgstr "" +#: templates/observations/index.html:72 +msgid "Details" +msgstr "" + #: templates/observations/index_old.html:33 msgid "All pests" msgstr "" @@ -118,15 +129,6 @@ msgstr "" msgid "View details" msgstr "" -#: templates/observations/timeseries.html:23 -#: templates/observations/timeseries.html:29 -msgid "Time series" -msgstr "" - -#: templates/observations/timeseries.html:35 -msgid "Location" -msgstr "" - -#: templates/observations/timeseries.html:37 +#: templates/observations/timeseries.html:38 msgid "Number of observations" msgstr "" diff --git a/observations/locale/fi/LC_MESSAGES/djangojs.po b/observations/locale/fi/LC_MESSAGES/djangojs.po index 5f60fdb9..9b66a900 100644 --- a/observations/locale/fi/LC_MESSAGES/djangojs.po +++ b/observations/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: 2024-06-24 12:43+0200\n" +"POT-Creation-Date: 2024-06-25 13:59+0200\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" @@ -26,18 +26,14 @@ msgstr "" msgid "in" msgstr "" -#: static/observations/js/observationList.js:368 -msgid "Details" -msgstr "" - -#: static/observations/js/observationList.js:638 +#: static/observations/js/observationList.js:637 msgid "Days since observation" msgstr "" -#: static/observations/js/observationList.js:641 +#: static/observations/js/observationList.js:640 msgid "Days" msgstr "" -#: static/observations/js/observationList.js:643 +#: static/observations/js/observationList.js:642 msgid "Older" msgstr "" diff --git a/observations/locale/nb/LC_MESSAGES/django.mo b/observations/locale/nb/LC_MESSAGES/django.mo index c551429f48d5cdca5fef9d47c59f9c76d31b978d..980d9b7890097ce4b9c2ecbcc60db42f4f982fd8 100755 GIT binary patch delta 825 zcmey)vz@p8o)F7a1_lNOSq26M83qOh7DfgJO$G*rH;f=r28Ibt3=EtM3=9*Q7#LU> z7#L<VF);8mFfc4&VqjopU|`t5#K6GAz`(GLiGe|wfq~&L69WS`0|Uc#DE*j;fq|WY zf#E$90|Ofa1H*TyIsYKy^$g6+3=F&s3=G`N3=G-~3=ERY3=A9$3=FQ!3=Con3=Doy zI+Yn>a1Ap9g8%~qLkBYhgB$|`!%Sv~19m|59fi{8pz5zPLmc{;nSp_cfq~&AGXsMt z$b(>g^$ZM5EDQ`vj0_C?ED)a=u|izx#0s&<6UvWbWnkcAU|>juiWjg#9NNeVaab3W zKaCaQp!uu}49pA+3~QkJH$e4oXN83HF;)f!mU;#ThR3Xs;D5o&z#ziFz`(`^F;JQf z;sA9v1_osY1_lc@NJzy%<+IozQBww`8`vNY?_z^kJdq9J)2UGPtJxSBps@;$TTpb? zgW?j*V_;wqhcZCE1jQ97O@M?zz7Pa4K+(ehiDwWOlwPD6AdZk?fCMi{oQnYxGN9-K z@j>wqqCx2b6!aiZf}&7@fk6nIh(PfVQUFRwLX&-&!h~H?i<65o3raHc^B7!GOA<44 ziYG5(y1<@PoLW?tS~R(US)4tyBqx<2B!BWeX0gfhnAtX;WNv2EaY`-DF3K!R%_&X= zYs|??En;xbI=rJup|qqdF(;kDttgQpB(tO>HD_`<>sD2;iHRkLcN8)B7o{iWWfteA bGK6HN6c?u!WrA2>m3nM)oGGa#iD2UZb}wfW delta 748 zcmdna`<<u$o)F7a1_lNODFy}x83qQ1Hw+96stgPadl*5Y3=9EG3=EtM3=Dxx3=Av` z3=Gjs3=I4X3=9cO3=FIc3=9QK3=BLB3=CyV3=F~y3=GXo3=G^13=Gqm7#P?X7#J2q z^{rxJU|?rpU|7$@z`)DEz_6W(fkB&rp`PI=69WSW0|UcHCI$vE1_p*-P+E`~Vvq(i z1A_nq1A_@O1A`m`1A{9w#KIJ2h`vIox+-P{1||juhBjsf22lnEhE8S%1{DSdhWSwS zN0=EHlo%NpE;2(r@P!5Bz<LG-7FLJ_+^ir01_l{c1_nL`1_ouQxDhMFB4<{J#XhVI z49pA+43Vr13|tHh46#u48LW^HEN6v;)D%_*23ZCMhMBAk3?d*OvqC&{25RmNRt5&; zdIkoDm#mN=;bnsawKSAgWrJ9x&j#_4F&hJeA_D`1CmY0|Y&Hf4P%KF@Ffa%*Ktc}` zX`tu<(I5<pI#4u#*dPoFNe~Uf5};@W`BWUlV}SS$6m%e8L4_EEplJgXXCN_<PeAbt zN(-R)1cd}B`anSsN)N)5dzr!}e`h*B`8>1e<X6nHa)~)P3i(OJsYPXpC7Jno#R{2u z3MHAjsS3rZMVYCaSh^Uc-LnqwC{idbDND>rXK*V@WbiLbEh^3~%1kSnyp46MP*Hkf zUS@G_Dnm$SN-<d5<OytY+KD+isW799v-0y&ixe^yN?=MDf>RYzQcDtZvQmo}0J^MP A{r~^~ diff --git a/observations/locale/nb/LC_MESSAGES/django.po b/observations/locale/nb/LC_MESSAGES/django.po index 385f37e1..4d579145 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: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-24 12:43+0200\n" +"POT-Creation-Date: 2024-06-25 13:59+0200\n" "PO-Revision-Date: 2024-06-06 13:42+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -19,52 +19,59 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 3.4.2\n" -#: templates/observations/detail.html:25 templates/observations/detail.html:28 +#: templates/observations/detail.html:25 templates/observations/detail.html:30 msgid "Observation" msgstr "Observasjon" -#: templates/observations/detail.html:29 -#: templates/observations/timeseries.html:28 -msgid "View all observations" -msgstr "Se alle observasjoner" - -#: templates/observations/detail.html:29 -msgid "View all observations in time series" -msgstr "Se alle observasjoner i tidsserie" - -#: templates/observations/detail.html:32 templates/observations/index.html:46 +#: templates/observations/detail.html:34 templates/observations/index.html:46 #: templates/observations/index.html:68 #: templates/observations/index_old.html:63 -#: templates/observations/timeseries.html:31 +#: templates/observations/timeseries.html:32 msgid "Organism" msgstr "Organisme" -#: templates/observations/detail.html:34 templates/observations/index.html:50 +#: templates/observations/detail.html:36 templates/observations/index.html:50 #: templates/observations/index.html:69 #: templates/observations/index_old.html:64 -#: templates/observations/timeseries.html:33 +#: templates/observations/timeseries.html:34 msgid "Crop" msgstr "Kultur" -#: templates/observations/detail.html:36 templates/observations/index.html:67 +#: templates/observations/detail.html:38 templates/observations/index.html:67 #: templates/observations/index_old.html:62 msgid "Date of observation" msgstr "Observasjonsdato" -#: templates/observations/detail.html:40 +#: templates/observations/detail.html:41 templates/observations/index.html:71 +#: templates/observations/timeseries.html:23 +#: templates/observations/timeseries.html:28 +msgid "Time series" +msgstr "Tidsserie" + +#: templates/observations/detail.html:45 +#: templates/observations/timeseries.html:36 +msgid "Location" +msgstr "Sted" + +#: templates/observations/detail.html:48 msgid "Observation data" msgstr "Observasjonsdata" -#: templates/observations/detail.html:97 -msgid "Observation was not quantified" -msgstr "Observasjonen ble ikke kvantifisert" - -#: templates/observations/detail.html:101 +#: templates/observations/detail.html:51 msgid "Illustrations" msgstr "Illustrasjoner" -#: templates/observations/detail.html:130 -#: templates/observations/timeseries.html:151 +#: templates/observations/detail.html:62 +#: templates/observations/timeseries.html:52 +msgid "View all observations" +msgstr "Se alle observasjoner" + +#: templates/observations/detail.html:119 +msgid "Observation was not quantified" +msgstr "Observasjonen ble ikke kvantifisert" + +#: templates/observations/detail.html:157 +#: templates/observations/timeseries.html:161 msgid "Map view not available" msgstr "Kartvisning ikke tilgjengelig" @@ -93,7 +100,11 @@ msgstr "Gjør utvalg" #: templates/observations/index.html:70 #: templates/observations/index_old.html:65 msgid "Heading" -msgstr "Overskrift" +msgstr "Tittel" + +#: templates/observations/index.html:72 +msgid "Details" +msgstr "Detaljer" #: templates/observations/index_old.html:33 msgid "All pests" @@ -119,24 +130,15 @@ msgstr "Kultur" msgid "View details" msgstr "Se detaljer" -#: templates/observations/timeseries.html:23 -#: templates/observations/timeseries.html:29 -msgid "Time series" -msgstr "Tidsserie" - -#: templates/observations/timeseries.html:35 -msgid "Location" -msgstr "Sted" - -#: templates/observations/timeseries.html:37 +#: templates/observations/timeseries.html:38 msgid "Number of observations" msgstr "Antall observasjoner" -#~ msgid "Title" -#~ msgstr "Tittel" +msgid "Title" +msgstr "Tittel" -#~ msgid "Description" -#~ msgstr "Beskrivelse" +msgid "Description" +msgstr "Beskrivelse" -#~ msgid "Observer" -#~ msgstr "Observatør" +msgid "Observer" +msgstr "Observatør" diff --git a/observations/locale/nb/LC_MESSAGES/djangojs.po b/observations/locale/nb/LC_MESSAGES/djangojs.po index b38fbada..c26a8483 100644 --- a/observations/locale/nb/LC_MESSAGES/djangojs.po +++ b/observations/locale/nb/LC_MESSAGES/djangojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-24 12:43+0200\n" +"POT-Creation-Date: 2024-06-25 13:59+0200\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" @@ -26,18 +26,17 @@ msgstr "Observasjon(er) funnet på lokalitet" msgid "in" msgstr "i" -#: static/observations/js/observationList.js:368 -msgid "Details" -msgstr "Detaljer" - -#: static/observations/js/observationList.js:638 +#: static/observations/js/observationList.js:637 msgid "Days since observation" msgstr "Dager siden observasjon" -#: static/observations/js/observationList.js:641 +#: static/observations/js/observationList.js:640 msgid "Days" msgstr "Dager" -#: static/observations/js/observationList.js:643 +#: static/observations/js/observationList.js:642 msgid "Older" msgstr "Eldre" + +msgid "Details" +msgstr "Detaljer" diff --git a/observations/locale/vi/LC_MESSAGES/django.po b/observations/locale/vi/LC_MESSAGES/django.po index a231db61..223b8c85 100644 --- a/observations/locale/vi/LC_MESSAGES/django.po +++ b/observations/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: 2024-06-24 12:43+0200\n" +"POT-Creation-Date: 2024-06-25 13:59+0200\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,52 +18,59 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: templates/observations/detail.html:25 templates/observations/detail.html:28 +#: templates/observations/detail.html:25 templates/observations/detail.html:30 msgid "Observation" msgstr "" -#: templates/observations/detail.html:29 -#: templates/observations/timeseries.html:28 -msgid "View all observations" -msgstr "" - -#: templates/observations/detail.html:29 -msgid "View all observations in time series" -msgstr "" - -#: templates/observations/detail.html:32 templates/observations/index.html:46 +#: templates/observations/detail.html:34 templates/observations/index.html:46 #: templates/observations/index.html:68 #: templates/observations/index_old.html:63 -#: templates/observations/timeseries.html:31 +#: templates/observations/timeseries.html:32 msgid "Organism" msgstr "" -#: templates/observations/detail.html:34 templates/observations/index.html:50 +#: templates/observations/detail.html:36 templates/observations/index.html:50 #: templates/observations/index.html:69 #: templates/observations/index_old.html:64 -#: templates/observations/timeseries.html:33 +#: templates/observations/timeseries.html:34 msgid "Crop" msgstr "" -#: templates/observations/detail.html:36 templates/observations/index.html:67 +#: templates/observations/detail.html:38 templates/observations/index.html:67 #: templates/observations/index_old.html:62 msgid "Date of observation" msgstr "" -#: templates/observations/detail.html:40 -msgid "Observation data" +#: templates/observations/detail.html:41 templates/observations/index.html:71 +#: templates/observations/timeseries.html:23 +#: templates/observations/timeseries.html:28 +msgid "Time series" msgstr "" -#: templates/observations/detail.html:97 -msgid "Observation was not quantified" +#: templates/observations/detail.html:45 +#: templates/observations/timeseries.html:36 +msgid "Location" +msgstr "" + +#: templates/observations/detail.html:48 +msgid "Observation data" msgstr "" -#: templates/observations/detail.html:101 +#: templates/observations/detail.html:51 msgid "Illustrations" msgstr "" -#: templates/observations/detail.html:130 -#: templates/observations/timeseries.html:151 +#: templates/observations/detail.html:62 +#: templates/observations/timeseries.html:52 +msgid "View all observations" +msgstr "" + +#: templates/observations/detail.html:119 +msgid "Observation was not quantified" +msgstr "" + +#: templates/observations/detail.html:157 +#: templates/observations/timeseries.html:161 msgid "Map view not available" msgstr "" @@ -94,6 +101,10 @@ msgstr "" msgid "Heading" msgstr "" +#: templates/observations/index.html:72 +msgid "Details" +msgstr "" + #: templates/observations/index_old.html:33 msgid "All pests" msgstr "" @@ -118,15 +129,6 @@ msgstr "" msgid "View details" msgstr "" -#: templates/observations/timeseries.html:23 -#: templates/observations/timeseries.html:29 -msgid "Time series" -msgstr "" - -#: templates/observations/timeseries.html:35 -msgid "Location" -msgstr "" - -#: templates/observations/timeseries.html:37 +#: templates/observations/timeseries.html:38 msgid "Number of observations" msgstr "" diff --git a/observations/locale/vi/LC_MESSAGES/djangojs.po b/observations/locale/vi/LC_MESSAGES/djangojs.po index 567654a3..21a272dd 100644 --- a/observations/locale/vi/LC_MESSAGES/djangojs.po +++ b/observations/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: 2024-06-24 12:43+0200\n" +"POT-Creation-Date: 2024-06-25 13:59+0200\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" @@ -26,18 +26,14 @@ msgstr "" msgid "in" msgstr "" -#: static/observations/js/observationList.js:368 -msgid "Details" -msgstr "" - -#: static/observations/js/observationList.js:638 +#: static/observations/js/observationList.js:637 msgid "Days since observation" msgstr "" -#: static/observations/js/observationList.js:641 +#: static/observations/js/observationList.js:640 msgid "Days" msgstr "" -#: static/observations/js/observationList.js:643 +#: static/observations/js/observationList.js:642 msgid "Older" msgstr "" diff --git a/observations/locale/zh_Hans/LC_MESSAGES/django.po b/observations/locale/zh_Hans/LC_MESSAGES/django.po index 53ede197..d15b7754 100755 --- a/observations/locale/zh_Hans/LC_MESSAGES/django.po +++ b/observations/locale/zh_Hans/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-24 12:43+0200\n" +"POT-Creation-Date: 2024-06-25 13:59+0200\n" "PO-Revision-Date: 2016-10-27 11:26+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -17,56 +17,61 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.8.7\n" -#: templates/observations/detail.html:25 templates/observations/detail.html:28 +#: templates/observations/detail.html:25 templates/observations/detail.html:30 msgid "Observation" msgstr "观测" -#: templates/observations/detail.html:29 -#: templates/observations/timeseries.html:28 -msgid "View all observations" -msgstr "查看所有观测" - -#: templates/observations/detail.html:29 -#, fuzzy -#| msgid "View all observations" -msgid "View all observations in time series" -msgstr "查看所有观测" - -#: templates/observations/detail.html:32 templates/observations/index.html:46 +#: templates/observations/detail.html:34 templates/observations/index.html:46 #: templates/observations/index.html:68 #: templates/observations/index_old.html:63 -#: templates/observations/timeseries.html:31 +#: templates/observations/timeseries.html:32 msgid "Organism" msgstr "生物" -#: templates/observations/detail.html:34 templates/observations/index.html:50 +#: templates/observations/detail.html:36 templates/observations/index.html:50 #: templates/observations/index.html:69 #: templates/observations/index_old.html:64 -#: templates/observations/timeseries.html:33 +#: templates/observations/timeseries.html:34 msgid "Crop" msgstr "作物" -#: templates/observations/detail.html:36 templates/observations/index.html:67 +#: templates/observations/detail.html:38 templates/observations/index.html:67 #: templates/observations/index_old.html:62 msgid "Date of observation" msgstr "观测时间" -#: templates/observations/detail.html:40 +#: templates/observations/detail.html:41 templates/observations/index.html:71 +#: templates/observations/timeseries.html:23 +#: templates/observations/timeseries.html:28 +msgid "Time series" +msgstr "" + +#: templates/observations/detail.html:45 +#: templates/observations/timeseries.html:36 +msgid "Location" +msgstr "" + +#: templates/observations/detail.html:48 msgid "Observation data" msgstr "观测数据" -#: templates/observations/detail.html:97 -msgid "Observation was not quantified" -msgstr "观测没有定量化" - -#: templates/observations/detail.html:101 +#: templates/observations/detail.html:51 #, fuzzy #| msgid "Observations" msgid "Illustrations" msgstr "观测" -#: templates/observations/detail.html:130 -#: templates/observations/timeseries.html:151 +#: templates/observations/detail.html:62 +#: templates/observations/timeseries.html:52 +msgid "View all observations" +msgstr "查看所有观测" + +#: templates/observations/detail.html:119 +msgid "Observation was not quantified" +msgstr "观测没有定量化" + +#: templates/observations/detail.html:157 +#: templates/observations/timeseries.html:161 msgid "Map view not available" msgstr "" @@ -97,6 +102,12 @@ msgstr "" msgid "Heading" msgstr "标题" +#: templates/observations/index.html:72 +#, fuzzy +#| msgid "View details" +msgid "Details" +msgstr "看细节" + #: templates/observations/index_old.html:33 msgid "All pests" msgstr "所有病虫害" @@ -123,20 +134,16 @@ msgstr "作物" msgid "View details" msgstr "看细节" -#: templates/observations/timeseries.html:23 -#: templates/observations/timeseries.html:29 -msgid "Time series" -msgstr "" - -#: templates/observations/timeseries.html:35 -msgid "Location" -msgstr "" - -#: templates/observations/timeseries.html:37 +#: templates/observations/timeseries.html:38 #, fuzzy #| msgid "Date of observation" msgid "Number of observations" msgstr "观测时间" +#, fuzzy +#~| msgid "View all observations" +#~ msgid "View all observations in time series" +#~ msgstr "查看所有观测" + #~ msgid "Observer" #~ msgstr "观测者" diff --git a/observations/locale/zh_Hans/LC_MESSAGES/djangojs.po b/observations/locale/zh_Hans/LC_MESSAGES/djangojs.po index 567654a3..21a272dd 100644 --- a/observations/locale/zh_Hans/LC_MESSAGES/djangojs.po +++ b/observations/locale/zh_Hans/LC_MESSAGES/djangojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-24 12:43+0200\n" +"POT-Creation-Date: 2024-06-25 13:59+0200\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" @@ -26,18 +26,14 @@ msgstr "" msgid "in" msgstr "" -#: static/observations/js/observationList.js:368 -msgid "Details" -msgstr "" - -#: static/observations/js/observationList.js:638 +#: static/observations/js/observationList.js:637 msgid "Days since observation" msgstr "" -#: static/observations/js/observationList.js:641 +#: static/observations/js/observationList.js:640 msgid "Days" msgstr "" -#: static/observations/js/observationList.js:643 +#: static/observations/js/observationList.js:642 msgid "Older" msgstr "" diff --git a/observations/templates/observations/detail.html b/observations/templates/observations/detail.html index 8611b0e4..b1751525 100755 --- a/observations/templates/observations/detail.html +++ b/observations/templates/observations/detail.html @@ -24,27 +24,45 @@ {% load i18n %} {% block title%}{% trans "Observation" %}{%endblock%} {% block content %} -<div class="singleBlockContainer"> - <h1>{% trans "Observation" %}</h1> - <p><a href="/observations" class="btn btn-default back" role="button">{% trans "View all observations" %}</a> <a id="timeSeriesLink" class="btn btn-default back" role="button">{% trans "View all observations in time series" %}</a></p> +<div id="observationDetails" class="singleBlockContainer"> <div class="row"> - <div class="col-md-6"> - <h4>{% trans "Organism" %}</h4> + <div class="col-md-5"> + <p class="label">{% trans "Observation" %} </p> + <h1 style="margin-top: 4px;margin-bottom: 30px"><span id="observationHeading"></span></h1> + <p class="label" id="observationTextLabel"></p> + <p id="observationText"></p> + <p class="label">{% trans "Organism" %}</p> <p id="organismName"></p> - <h4>{% trans "Crop" %}</h4> + <p class="label">{% trans "Crop" %}</p> <p id="cropOrganismName"></p> - <h4>{% trans "Date of observation" %}</h4> + <p class="label">{% trans "Date of observation" %}</h4> <p id="timeOfObservation"></p> - <h2 id="observationHeading"></h2> - <p id="observationText"></p> - <h2>{% trans "Observation data" %}</h2> - <div id="observationData"></div> - <div id="observationIllustration"></div> + <div id="timeSeriesInfo"> + <p class="label">{% trans "Time series" %}</p> + <p id="timeSeries"></p> + </div> + <div id="locationInfo"> + <p class="label">{% trans "Location" %}</p> + <p id="location"></p> + </div> + <p class="label">{% trans "Observation data" %}</p> + <p id="observationData"></p> + <div id="illustrationInfo"> + <p class="label">{% trans "Illustrations" %}</p> + <div id="observationIllustration"></div> + </div> </div> - <div class="col-md-6"> + <div class="col-md-7"> <div id="observationViewMap" class="map" style="height: 400px;"></div> </div> </div> + <div class="row"> + <div class="col-md-12"> + <p style="margin-top: 15px"> + <a href="/observations" class="btn btn-default back" role="button">{% trans "View all observations" %}</a> + </p> + </div> + </div> <div style="display: none;"><div id="poiMarker" title="Marker"><img src="{% static "observations/images/observation_marker.png" %}"/></div></div> </div> {% endblock %} @@ -62,18 +80,21 @@ $(document).ready(function() { var uuidParam = settings.userUuid != null ? "?userUUID=" + settings.userUuid : ""; $.getJSON( "/vipslogicproxy/rest/observation/{{observation_id}}/" + uuidParam , function( observation ) { - //console.log(observation); - if(observation.observationTimeSeriesId) { - document.getElementById("timeSeriesLink").href = "/observations/timeseries/" + observation.observationTimeSeriesId; - } else { - document.getElementById("timeSeriesLink").hidden = true; - } document.getElementById("organismName").innerHTML = getLocalizedOrganismName(observation.organism) + " <i>(" + observation.organism.latinName + ")</i>"; document.getElementById("cropOrganismName").innerHTML = getLocalizedOrganismName(observation.cropOrganism) + " <i>(" + observation.cropOrganism.latinName + ")</i>"; document.getElementById("timeOfObservation").innerHTML = getStandardFormattedDate(observation.timeOfObservation); - //document.getElementById("observerName").innerHTML = observation.user.firstName + " " + observation.user.lastName; document.getElementById("observationHeading").innerHTML = observation.observationHeading; - document.getElementById("observationText").innerHTML = observation.observationText; + if(observation.observationText && observation.observationText !== "") { + document.getElementById("observationTextLabel").innerHTML = gettext("Description"); + document.getElementById("observationText").innerHTML = observation.observationText; + } + if(observation.observationTimeSeries) { + console.info("observation.observationTimeSeries", observation.observationTimeSeries) + document.getElementById("timeSeriesInfo").hidden = false; + document.getElementById("timeSeries").innerHTML = "<a href='/observations/timeseries/" + observation.observationTimeSeriesId + "'>" + observation.observationTimeSeries.name + "</a>"; + } else { + document.getElementById("timeSeriesInfo").hidden = true; + } if(observation.isQuantified != undefined && observation.isQuantified) { const dataSchema = JSON.parse(observation.observationDataSchema["dataSchema"]) @@ -82,13 +103,13 @@ dataVars[key] = dataSchema['properties'][key]['title'] }); - var observationDataHTML = "<ul>"; + var observationDataHTML = "<table>"; var observationData = JSON.parse(observation.observationData); for(var fieldName in observationData) { - observationDataHTML += "<li>" + dataVars[fieldName] + ": " + observationData[fieldName] + "</li>"; + observationDataHTML += "<tr><td width='180'>" + dataVars[fieldName] + "</td><td width='50' align='center'>" + observationData[fieldName] + "</td></tr>"; } - observationDataHTML += "</ul>"; + observationDataHTML += "</table>"; document.getElementById("observationData").innerHTML = observationDataHTML; } @@ -98,25 +119,30 @@ } if(observation.observationIllustrationSet.length > 0) { - document.getElementById("observationIllustration").innerHTML = "<h2>{% trans "Illustrations" %}</h2>"; + document.getElementById("illustrationInfo").hidden = false; for(let i=0;i<observation.observationIllustrationSet.length;i++) { var illustration = observation.observationIllustrationSet[i]; document.getElementById("observationIllustration").innerHTML += "<img src='" + settings.vipslogicProtocol + "://" + settings.vipslogicServerName + "/static/images/observations/" + observation.organismId + "/" + illustration.observationIllustrationPK.fileName + "' class='img-responsive'/>"; } - } + } else { + document.getElementById("illustrationInfo").hidden = true; + } if(!observation.locationIsPrivate) { if(observation.locationPointOfInterestId > 0) { $.getJSON(settings.vipslogicProtocol + "://" + settings.vipslogicServerName + "/rest/poi/" + observation.locationPointOfInterestId , function( poi ) { initMap(null,poi,"observationViewMap","{{settings.MAP_ATTRIBUTION|safe}}") + document.getElementById("locationInfo").hidden = false; + document.getElementById("location").innerHTML = poi.name }); } else { initMap(observation.geoinfo,null,"observationViewMap","{{settings.MAP_ATTRIBUTION|safe}}"); - } + document.getElementById("locationInfo").hidden = true; + } } else { diff --git a/observations/templates/observations/timeseries.html b/observations/templates/observations/timeseries.html index a7a591a2..8a038514 100644 --- a/observations/templates/observations/timeseries.html +++ b/observations/templates/observations/timeseries.html @@ -22,31 +22,37 @@ {% load i18n %} {% block title%}{% trans "Time series" %}{%endblock%} {% block content %} - <div id="observationTimeSeries" class="singleBlockContainer"> + <div id="observationTimeSeriesDetails" class="singleBlockContainer"> <div class="row"> - <div class="col-md-6"> - <p style=""><a href="/observations" class="btn btn-default back" role="button">{% trans "View all observations" %}</a></p> - <h1>{% trans "Time series" %} <span id="timeSeriesName"></span></h1> - <div class="description" id="timeSeriesDescription"></div> + <div class="col-md-5"> + <p class="label">{% trans "Time series" %} </p> + <h1 style="margin-top: 4px;margin-bottom: 30px"><span id="timeSeriesName"></span></h1> + <p class="label" id="timeSeriesDescriptionLabel"></p> + <p id="timeSeriesDescription"></p> <p class="label">{% trans "Organism" %}</p> - <p class="value" id="organismName"></p> + <p id="organismName"></p> <p class="label">{% trans "Crop" %}</p> - <p class="value" id="cropOrganismName"></p> + <p id="cropOrganismName"></p> <p class="label">{% trans "Location" %}</p> - <p class="value" id="timeSeriesLocation"></p> + <p id="timeSeriesLocation"></p> <p class="label">{% trans "Number of observations" %}</p> - <p class="value" id="observationCount"></p> + <p id="observationCount"></p> </div> - <div class="col-md-6"> + <div class="col-md-7"> <div id="observationViewMap" class="map" style="height: 400px;"></div> </div> </div> - <div class="row singleBlockContainer"> + <div class="row" style="margin-top: 20px;"> <div class="col-md-12"> <div id="observationTable" class="table-responsive"></div> </div> </div> - <div style="display: none;"><div id="poiMarker" title="Marker"><img src="{% static "observations/images/observation_marker.png" %}"/></div></div> + <div class="row"> + <div class="col-md-12"> + <p><a href="/observations" class="btn btn-default back" role="button">{% trans "View all observations" %}</a></p> + </div> + </div> + <div style="display: none;"><div id="poiMarker" title="Marker"><img src="{% static "observations/images/observation_marker.png" %}"/></div> </div> {% endblock %} {% block customCSS %} @@ -66,9 +72,13 @@ document.getElementById("organismName").innerHTML = getLocalizedOrganismName(observationTimeSeries.organism) + " <i>(" + observationTimeSeries.organism.latinName + ")</i>"; document.getElementById("cropOrganismName").innerHTML = getLocalizedOrganismName(observationTimeSeries.cropOrganism) + " <i>(" + observationTimeSeries.cropOrganism.latinName + ")</i>"; document.getElementById("timeSeriesName").innerHTML = observationTimeSeries.name; - document.getElementById("timeSeriesDescription").innerHTML = observationTimeSeries.description; document.getElementById("timeSeriesLocation").innerHTML = observationTimeSeries.locationPointOfInterest.name; + if(observationTimeSeries.description && observationTimeSeries.description !== "") { + document.getElementById("timeSeriesDescriptionLabel").innerHTML = gettext("Description"); + document.getElementById("timeSeriesDescription").innerHTML = observationTimeSeries.description; + } + let observations = []; $.getJSON( "/vipslogicproxy/rest/observation/list/filter/{{ organization_id }}?observationTimeSeriesId={{ observation_time_series_id }}", function( observations ) { document.getElementById("observationCount").innerHTML = observations.length; -- GitLab