From a304f8d42e3a5776c6aa95743807acfa9f55b1f8 Mon Sep 17 00:00:00 2001 From: mipel Date: Thu, 22 Jul 2021 14:58:58 +0200 Subject: [PATCH] Intervention Detail View * adds related object overview in detail view * adds comment field to payment model for 'Verwendungszweck' * simplifies intervention urls * adds translations --- compensation/models.py | 6 + .../templates/intervention/detail-view.html | 113 +++++++++++++++++- intervention/urls.py | 6 +- konova/static/css/konova.css | 15 +++ locale/de/LC_MESSAGES/django.mo | Bin 7295 -> 7777 bytes locale/de/LC_MESSAGES/django.po | 75 ++++++++---- 6 files changed, 186 insertions(+), 29 deletions(-) diff --git a/compensation/models.py b/compensation/models.py index ceca5733..9b84ddea 100644 --- a/compensation/models.py +++ b/compensation/models.py @@ -23,6 +23,12 @@ class Payment(BaseResource): """ amount = models.FloatField(validators=[MinValueValidator(limit_value=0.00)]) due_on = models.DateField(null=True) + comment = models.CharField( + max_length=1000, + null=True, + blank=True, + help_text="Refers to german money transfer 'Verwendungszweck'", + ) class CompensationControl(BaseResource): diff --git a/intervention/templates/intervention/detail-view.html b/intervention/templates/intervention/detail-view.html index 8dc9c52d..7700b516 100644 --- a/intervention/templates/intervention/detail-view.html +++ b/intervention/templates/intervention/detail-view.html @@ -13,7 +13,17 @@ LANIS + + + {% if has_access %} + + + + + + + + +
+ + + + + + + + + {% for comp in intervention.compensations.all %} + + + + + {% endfor %} + +
+ {% trans 'Identifier' %} + + {% trans 'Title' %} +
+ + {{ comp.identifier }} + + {{ comp.title }}
+
+ + +
+ +
+ {% endblock %} \ No newline at end of file diff --git a/intervention/urls.py b/intervention/urls.py index c024af64..0f706591 100644 --- a/intervention/urls.py +++ b/intervention/urls.py @@ -13,7 +13,7 @@ app_name = "intervention" urlpatterns = [ path("", index_view, name="index"), path('new/', new_view, name='new'), - path('open/', open_view, name='open'), - path('edit/', edit_view, name='edit'), - path('remove/', remove_view, name='remove'), + path('', open_view, name='open'), + path('/edit', edit_view, name='edit'), + path('/remove', remove_view, name='remove'), ] \ No newline at end of file diff --git a/konova/static/css/konova.css b/konova/static/css/konova.css index af50f043..abf6e3f8 100644 --- a/konova/static/css/konova.css +++ b/konova/static/css/konova.css @@ -143,6 +143,21 @@ a { */ box-shadow: 1px 1px 3px var(--rlp-gray-dark); } +.btn-outline-default{ + color: white; + border: 1px solid white; +} +.btn-outline-default:hover{ + /* + color: var(--rlp-gray-light); + color: var(--rlp-red);; + background-color: unset; + border: 1px solid var(--rlp-red); + */ + box-shadow: 1px 1px 3px var(--rlp-gray-light); + color: var(--rlp-red); + background-color: white; +} .cursor-pointer{ cursor: pointer; diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index c789355aaf738f620a03bbbc8386f43b2b13fe4d..725ccf0371b8a97e2f4669b912cfbf74170bd97b 100644 GIT binary patch delta 3030 zcmY+FZA{fw9LEnrDyV>%Xee@%R5UOj5g&_-BKUv^J|t;%fj@8){+I5(h+L<)%*}GX zu#qfn+RCQ3@y0N1Wwl22rm1Bvn{y_u7cR@JmTN1s&-dO#4`+P;pY!~CIOkmM7WFNN zUd>3_ZzvsTEc!0dm?N-z5FbiWiZPvVF3f;up@y!(d*OAM2Jb+YnqfnX83>2Np>Q!B{kw(p0R<<4h=zbD<{W+x~e_5iYgk6;KA(LmiO| zW%wDWyYLb`3{OI>t0qbvT@6&gwS44wD4qN(HQVXX#GOzZyoB~fnP5jpO-+;4d zCvz?uUj*}^A8K9~8~|U1a^Q8SNRLBr0(S)-qx~CE=E3M84pIw0g))2|>dbzG@^l~v zugnaAWYc6oo$Yw2Of7&iPzm)KYM=tz0=4fUsNa>NP?_n49KZP-^4g;28!Fo92Gkkd zg&sJF1J>=%gW4z`;=Gv+vtXI+uY-E;%}|cC+xD}zz1Oz8pzOQ`73kY=sNVmVRP^qz zL2R2Jpd1;%RhR8 z~7QKxLvEPKQ^Z45V@{iZBQ2tS3Wdt`I7-rBL=Z zLfHvqk$+XT(V^SF8_Mu8JMoLWuOeo^J>U*junloJdJez z44GE66v@~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MaUnsRMjHJpo@(gM_;38FS{1+uTK0X0*bu@?7YYN;^H`3YQtQ@9#u<}?2q zX_Qu!aW|@i9jFfaP?_#SzCznd>?IZxPZ28HiT+eAy^nfaU1&K~cs=!5-jCaePD1^L zwf@?b%4#K{qAAiW>>|2}Ou3iJW+F!HCNyGgG$pFp*-5M-l(1$`Bg~X|rh?7HUBp9# zx0HiQgwPs3ObihB5DyZpK&q_es7YEUR@9DvzZ}?E_Wy&&LjTZ5iee zZK>~{N)54w&{v>RPYe-*guVcMPAV0|6T~J$-*Ptb|I)-s6|sdFCiW1mLm;e9( diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index c0b1b68e..2af3bcc5 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-07-22 13:15+0200\n" +"POT-Creation-Date: 2021-07-22 14:57+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -23,14 +23,16 @@ msgstr "" #: compensation/tables.py:18 compensation/tables.py:71 intervention/forms.py:26 #: intervention/tables.py:23 +#: intervention/templates/intervention/detail-view.html:159 msgid "Identifier" msgstr "Kennung" #: compensation/tables.py:23 compensation/tables.py:76 intervention/forms.py:33 #: intervention/tables.py:28 -#: intervention/templates/intervention/detail-view.html:47 +#: intervention/templates/intervention/detail-view.html:57 +#: intervention/templates/intervention/detail-view.html:162 msgid "Title" -msgstr "Titel" +msgstr "Bezeichnung" #: compensation/tables.py:28 compensation/tables.py:81 msgid "Created on" @@ -41,6 +43,7 @@ msgid "Actions" msgstr "Aktionen" #: compensation/tables.py:44 +#: intervention/templates/intervention/detail-view.html:139 msgid "Compensations" msgstr "Kompensationen" @@ -153,12 +156,12 @@ msgid "Edit intervention" msgstr "Eingriff bearbeiten" #: intervention/tables.py:33 -#: intervention/templates/intervention/detail-view.html:67 +#: intervention/templates/intervention/detail-view.html:77 msgid "Checked" msgstr "Geprüft" #: intervention/tables.py:39 -#: intervention/templates/intervention/detail-view.html:81 +#: intervention/templates/intervention/detail-view.html:91 msgid "Recorded" msgstr "Verzeichnet" @@ -206,57 +209,85 @@ msgstr "Nicht freigegeben - Datensatz nur lesbar" #: intervention/templates/intervention/detail-view.html:12 msgid "Open in LANIS" -msgstr "" +msgstr "In LANIS öffnen" -#: intervention/templates/intervention/detail-view.html:18 -msgid "Run check" -msgstr "" +#: intervention/templates/intervention/detail-view.html:17 +msgid "Public report" +msgstr "Öffentlicher Bericht" #: intervention/templates/intervention/detail-view.html:23 +msgid "Share" +msgstr "Freigabe" + +#: intervention/templates/intervention/detail-view.html:28 +msgid "Run check" +msgstr "Prüfung vornehmen" + +#: intervention/templates/intervention/detail-view.html:33 msgid "Record" msgstr "Verzeichnen" -#: intervention/templates/intervention/detail-view.html:28 +#: intervention/templates/intervention/detail-view.html:38 msgid "Edit" msgstr "Bearbeiten" -#: intervention/templates/intervention/detail-view.html:33 +#: intervention/templates/intervention/detail-view.html:43 #: venv/lib/python3.7/site-packages/django/forms/formsets.py:391 msgid "Delete" msgstr "Löschen" -#: intervention/templates/intervention/detail-view.html:51 +#: intervention/templates/intervention/detail-view.html:61 msgid "Registration office" msgstr "Zulassungsbehörde" -#: intervention/templates/intervention/detail-view.html:55 +#: intervention/templates/intervention/detail-view.html:65 msgid "Registration office file number" msgstr "Aktenzeichen Zulassungsbehörde" -#: intervention/templates/intervention/detail-view.html:59 +#: intervention/templates/intervention/detail-view.html:69 msgid "Conservation office" msgstr "Naturschutzbehörde" -#: intervention/templates/intervention/detail-view.html:63 +#: intervention/templates/intervention/detail-view.html:73 msgid "Conversation office file number" msgstr "Aktenzeichen Naturschutzbehörde" -#: intervention/templates/intervention/detail-view.html:95 +#: intervention/templates/intervention/detail-view.html:105 msgid "Registration date" msgstr "Datum Zulassung bzw. Satzungsbeschluss" -#: intervention/templates/intervention/detail-view.html:99 +#: intervention/templates/intervention/detail-view.html:109 msgid "Binding on" msgstr "Datum Bestandskraft" -#: intervention/templates/intervention/detail-view.html:103 +#: intervention/templates/intervention/detail-view.html:113 msgid "Last modified" msgstr "Zuletzt bearbeitet" -#: intervention/templates/intervention/detail-view.html:107 +#: intervention/templates/intervention/detail-view.html:117 msgid "by" msgstr "von" +#: intervention/templates/intervention/detail-view.html:144 +msgid "Add new compensation" +msgstr "Neue Kompensation hinzufügen" + +#: intervention/templates/intervention/detail-view.html:189 +msgid "Payments" +msgstr "Ersatzzahlungen" + +#: intervention/templates/intervention/detail-view.html:194 +msgid "Add new payment" +msgstr "Neue Zahlung hinzufügen" + +#: intervention/templates/intervention/detail-view.html:209 +msgid "Amount" +msgstr "Betrag" + +#: intervention/templates/intervention/detail-view.html:212 +msgid "Transfer comment" +msgstr "Verwendungszweck" + #: intervention/views.py:62 msgid "Intervention {} added" msgstr "Eingriff {} hinzugefügt" @@ -1744,9 +1775,6 @@ msgstr "" #~ msgid "Delete intervention" #~ msgstr "Eingriff löschen" -#~ msgid "Add new compensation" -#~ msgstr "Neue Kompensation hinzufügen" - #~ msgid "Delete compensation" #~ msgstr "Kompensation löschen" @@ -1816,9 +1844,6 @@ msgstr "" #~ msgid "New action" #~ msgstr "Neue Maßnahme" -#~ msgid "Annual report" -#~ msgstr "Jahresbericht" - #~ msgid "You are currently working as " #~ msgstr "Sie arbeiten gerade als "