From 81dfbac9b66935b4f2ae9358209eb418c4233602 Mon Sep 17 00:00:00 2001 From: Birger Schacht Date: Tue, 5 Sep 2023 10:23:53 +0200 Subject: [PATCH] fix: show reference on detail view of entity This also moves the model from the edit template to the base template (this should be moved upstream) --- .../apis_entities/detail_views/detail_generic.html | 7 +++++++ .../detail_views/function_detail_generic.html | 5 +++++ .../detail_views/person_detail_generic.html | 6 ++++++ .../templates/apis_entities/edit_generic.html | 8 -------- apis_ontology/templates/webpage/base.html | 10 ++++++++++ 5 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 apis_ontology/templates/webpage/base.html diff --git a/apis_ontology/templates/apis_entities/detail_views/detail_generic.html b/apis_ontology/templates/apis_entities/detail_views/detail_generic.html index 3618039..338a74c 100644 --- a/apis_ontology/templates/apis_entities/detail_views/detail_generic.html +++ b/apis_ontology/templates/apis_entities/detail_views/detail_generic.html @@ -1,4 +1,5 @@ {% extends "apis_entities/detail_views/detail_generic.html" %} +{% load bibsonomy_templatetags %} {% block info-table %} @@ -56,6 +57,7 @@ + {% endif %} {% if object.lat %} @@ -65,5 +67,10 @@ {% endif %} + + + + +
References {{ object.references }}
References{% link_to_reference_on obj=object modal=True %}
{% endblock info-table %} diff --git a/apis_ontology/templates/apis_entities/detail_views/function_detail_generic.html b/apis_ontology/templates/apis_entities/detail_views/function_detail_generic.html index b118d4d..4d6f4f8 100644 --- a/apis_ontology/templates/apis_entities/detail_views/function_detail_generic.html +++ b/apis_ontology/templates/apis_entities/detail_views/function_detail_generic.html @@ -1,4 +1,5 @@ {% extends "apis_entities/detail_views/detail_generic.html" %} +{% load bibsonomy_templatetags %} {% block info-table %} @@ -58,6 +59,10 @@ {% endif %} + + + +
{{ object.lat }} / {{ object.lng }}
References{% link_to_reference_on obj=object modal=True %}
{% endblock info-table %} diff --git a/apis_ontology/templates/apis_entities/detail_views/person_detail_generic.html b/apis_ontology/templates/apis_entities/detail_views/person_detail_generic.html index 04d933c..4e8a07b 100644 --- a/apis_ontology/templates/apis_entities/detail_views/person_detail_generic.html +++ b/apis_ontology/templates/apis_entities/detail_views/person_detail_generic.html @@ -1,4 +1,5 @@ {% extends "apis_entities/detail_views/person_detail_generic.html" %} +{% load bibsonomy_templatetags %} {% block info-table %} @@ -87,5 +88,10 @@ {% endif %} + + + + +
References{% link_to_reference_on obj=object modal=True %}
{% endblock info-table %} diff --git a/apis_ontology/templates/apis_entities/edit_generic.html b/apis_ontology/templates/apis_entities/edit_generic.html index bb0ad51..88aef9f 100644 --- a/apis_ontology/templates/apis_entities/edit_generic.html +++ b/apis_ontology/templates/apis_entities/edit_generic.html @@ -245,14 +245,6 @@

{% endif %} {% load crispy_forms_tags %} - - - {% endblock content %} {% block scripts %} {{ block.super }} diff --git a/apis_ontology/templates/webpage/base.html b/apis_ontology/templates/webpage/base.html new file mode 100644 index 0000000..f8f7fac --- /dev/null +++ b/apis_ontology/templates/webpage/base.html @@ -0,0 +1,10 @@ +{% extends "webpage/base.html" %} +{% block scripts2 %} + + +{% endblock scripts2 %}