From c27c00c67900e6820593fd4334461f7bee2270f2 Mon Sep 17 00:00:00 2001 From: moanos Date: Wed, 20 Mar 2024 10:25:12 +0100 Subject: [PATCH] refactor: Move detailed animal view to partial to allow usage in other templates --- .../detail-animal-partial.html | 19 +++++++++++++++++++ .../fellchensammlung/detail_animal.html | 18 +----------------- 2 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 src/fellchensammlung/templates/fellchensammlung/detail-animal-partial.html diff --git a/src/fellchensammlung/templates/fellchensammlung/detail-animal-partial.html b/src/fellchensammlung/templates/fellchensammlung/detail-animal-partial.html new file mode 100644 index 0000000..10369b0 --- /dev/null +++ b/src/fellchensammlung/templates/fellchensammlung/detail-animal-partial.html @@ -0,0 +1,19 @@ +
+
+

{{ animal.name }}

+
{{ animal.species }}
+
+
+ + + + + + + + + +
AlterGeschlecht
{{ animal.hr_age }}{{ animal.sex }}
+
+

{{ animal.description }}

+ \ No newline at end of file diff --git a/src/fellchensammlung/templates/fellchensammlung/detail_animal.html b/src/fellchensammlung/templates/fellchensammlung/detail_animal.html index 4dd03ba..26dc0e6 100644 --- a/src/fellchensammlung/templates/fellchensammlung/detail_animal.html +++ b/src/fellchensammlung/templates/fellchensammlung/detail_animal.html @@ -3,21 +3,5 @@ {% load i18n %} {% block content %} -
-

{{ animal.name }}

-
{{ animal.species }}
-
-
- - - - - - - - - -
AlterGeschlecht
{{ animal.hr_age }}{{ animal.sex }}
-
-

{{ animal.description }}

+ {% include "fellchensammlung/detail-animal-partial.html" %} {% endblock %}