Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
fix: show reference on detail view of entity
Browse files Browse the repository at this point in the history
This also moves the model from the edit template to the base template
(this should be moved upstream)
  • Loading branch information
b1rger committed Sep 8, 2023
1 parent 0390b5d commit 81dfbac
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "apis_entities/detail_views/detail_generic.html" %}
{% load bibsonomy_templatetags %}
{% block info-table %}
<table class="table table-bordered table-hover">
<tr>
Expand Down Expand Up @@ -56,6 +57,7 @@
<tr>
<th>References</th>
<td>{{ object.references }}</td>
</tr>
{% endif %}

{% if object.lat %}
Expand All @@ -65,5 +67,10 @@
</tr>
{% endif %}

<tr>
<th>References</th>
<td>{% link_to_reference_on obj=object modal=True %}</td>
</tr>

</table>
{% endblock info-table %}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "apis_entities/detail_views/detail_generic.html" %}
{% load bibsonomy_templatetags %}
{% block info-table %}
<table class="table table-bordered table-hover">
<tr>
Expand Down Expand Up @@ -58,6 +59,10 @@
<td>{{ object.lat }} / {{ object.lng }}</td>
</tr>
{% endif %}
<tr>
<th>References</th>
<td>{% link_to_reference_on obj=object modal=True %}</td>
</tr>

</table>
{% endblock info-table %}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "apis_entities/detail_views/person_detail_generic.html" %}
{% load bibsonomy_templatetags %}

{% block info-table %}
<table class="table table-bordered table-hover">
Expand Down Expand Up @@ -87,5 +88,10 @@
</td>
</tr>
{% endif %}
<tr>
<th>References</th>
<td>{% link_to_reference_on obj=object modal=True %}</td>
</tr>

</table>
{% endblock info-table %}
8 changes: 0 additions & 8 deletions apis_ontology/templates/apis_entities/edit_generic.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,6 @@ <h4 class="card-title">
{% endif %}

{% load crispy_forms_tags %}
<!-- Referencemodal -->
<div class="modal fade" id="referenceModal" tabindex="-1" aria-labelledby="referenceModalLabel" aria-hidden="true">
<div class="modal-dialog" style="max-width: 800px;">
<div id="modal-here" class="modal-content">
</div>
</div>
</div>

{% endblock content %}
{% block scripts %}
{{ block.super }}
Expand Down
10 changes: 10 additions & 0 deletions apis_ontology/templates/webpage/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% extends "webpage/base.html" %}
{% block scripts2 %}
<!-- Modal -->
<div class="modal fade" id="modal" tabindex="-1" aria-labelledby="modalLabel" aria-hidden="true">
<div class="modal-dialog" style="max-width: 800px;">
<div id="modal-here" class="modal-content">
</div>
</div>
</div>
{% endblock scripts2 %}

0 comments on commit 81dfbac

Please sign in to comment.