Skip to content

Commit

Permalink
Merge pull request #65 from acdh-oeaw/relations-tabs
Browse files Browse the repository at this point in the history
Relations tabs
  • Loading branch information
gythaogg authored Jun 10, 2024
2 parents 5e4c247 + a231d9e commit ca6dc33
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h4>Relations</h4> <!-- Edit View -->
<div class="tab-content">
<div class="tab-pane container active" id="reltypeALL">
{% for ent_type in related_entity_types %}
<h3> {{ent_type | model_meta:"verbose_name" | title}}</h3>
<h5> {{ent_type | model_meta:"verbose_name" | title}}</h5>
<div>
{% entity_relations with_type=ent_type edit=True as entity_relations %}
{% render_table entity_relations %}
Expand Down
21 changes: 18 additions & 3 deletions apis_ontology/templates/apis_ontology/tibscholentity_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,34 @@ <h4>Relations</h4>
<div class="container">
<!-- Nav tabs -->
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#reltypeALL">ALL</a>
</li>

{% for ent_type in related_entity_types %}

<li class="nav-item">
<a class="nav-link {% if forloop.first %}active{% endif %}" data-toggle="tab"
href="#reltype{{forloop.counter0}}">{{ent_type |model_meta:"verbose_name" | title}}</a>
<a class="nav-link" data-toggle="tab" href="#reltype{{forloop.counter0}}">
{{ent_type |model_meta:"verbose_name" | title}}
</a>
</li>
{% endfor %}
</ul>

<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane container active" id="reltypeALL">
{% for ent_type in related_entity_types %}
<h5> {{ent_type | model_meta:"verbose_name" | title}}</h5>
<div>
{% entity_relations with_type=ent_type edit=True as entity_relations %}
{% render_table entity_relations %}
</div>
{% endfor %}
</div>

{% for ent_type in related_entity_types %}
<div class="tab-pane container {% if forloop.first %}active{% endif %}" id="reltype{{forloop.counter0}}">
<div class="tab-pane container" id="reltype{{forloop.counter0}}">
{% entity_relations with_type=ent_type as entity_relations %}
{% render_table entity_relations %}
</div>
Expand Down

0 comments on commit ca6dc33

Please sign in to comment.