From 06c4398d886f091147828ecdd076667a35831b38 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Tue, 17 Jan 2023 14:39:22 +0100 Subject: [PATCH 1/4] added the ability to add extra information to fields --- openapi.yaml | 13 ++++++++ webclient/src/views/view/view-view.inc | 41 +++++++++++++++++++++++-- webclient/src/views/view/view-view.scss | 5 +++ 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 2ff21922f..1065a7751 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -418,6 +418,10 @@ paths: text: 'Boltzmannstr. 3, EG, 85748 Garching b. München' - name: Sitzplätze text: '522' + extra: + header: Genauere Angaben + body: "für Prüfungen: 102 in eng, 71 in weit, 49 in corona" + calendar_url: 'https://campus.tum.de/tumonline/tvKalender.wSicht?cOrg=19691&cRes=12559&cReadonly=J' ranking_factors: rank_combined: 900 @@ -1155,6 +1159,15 @@ components: text: type: string example: 5602.EG.001 + extra: + type: object + properties: + header: + type: string + example: Genauere Angaben + body: + type: string + example: "für Prüfungen: 102 in eng, 71 in weit, 49 in corona" required: - name - text diff --git a/webclient/src/views/view/view-view.inc b/webclient/src/views/view/view-view.inc index 364a98812..235043a1d 100644 --- a/webclient/src/views/view/view-view.inc +++ b/webclient/src/views/view/view-view.inc @@ -396,7 +396,24 @@ {{ prop.name }} - {{ prop.text }} + {{ prop.text }} +
+ + + + +
+
+ + {{prop.extra.header}} + +
+ {{prop.extra.body}} +
+
+
+
+ ${{ _.view_view.info_table.links }}$ @@ -440,7 +457,27 @@ {{ prop.name }} - {{ prop.text }} + {{ prop.text }} +
+ + + + +
+
+
+ {{ prop.extra.header }} +
+
+ {{ prop.extra.body }} +
+ +
+
+
+ ${{ _.view_view.info_table.links }}$ diff --git a/webclient/src/views/view/view-view.scss b/webclient/src/views/view/view-view.scss index 2f3db856b..df22f5861 100644 --- a/webclient/src/views/view/view-view.scss +++ b/webclient/src/views/view/view-view.scss @@ -398,6 +398,11 @@ &:last-child { padding-left: 10px; } + + .popover svg { + margin-left: 5px; + margin-bottom: -2px; + } } tr { From 55c43165d736978d434940da1d293dbce58e4a61 Mon Sep 17 00:00:00 2001 From: octycs Date: Wed, 1 Feb 2023 23:47:26 +0100 Subject: [PATCH 2/4] Make it a modal on mobile --- webclient/src/core.js | 4 ++++ webclient/src/index.html | 20 ++++++++++++++++++++ webclient/src/views/view/view-view.inc | 15 ++++----------- webclient/src/views/view/view-view.js | 4 ++++ 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/webclient/src/core.js b/webclient/src/core.js index 457288c07..679378e0e 100644 --- a/webclient/src/core.js +++ b/webclient/src/core.js @@ -168,6 +168,10 @@ navigatum = (() => { error: { msg: null, }, + modal: { + header: null, + body: null, + }, }, methods: { searchFocus: function () { diff --git a/webclient/src/index.html b/webclient/src/index.html index 2fec9d99a..52b83611a 100644 --- a/webclient/src/index.html +++ b/webclient/src/index.html @@ -325,9 +325,29 @@ + + + +