diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-04-06 21:36:19 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-04-07 19:25:04 +0200 |
| commit | 053ac5865c80c8857dc887d707fc6a7d83272730 (patch) | |
| tree | 856d1667eadf0fc8c19743a0b44051dc21c0b0b2 /archaeological_operations | |
| parent | 6575fb494d82727e0d34287d5d2fb579fb7acd64 (diff) | |
| download | Ishtar-053ac5865c80c8857dc887d707fc6a7d83272730.tar.bz2 Ishtar-053ac5865c80c8857dc887d707fc6a7d83272730.zip | |
✨ finds - relations between finds: sheet - sheet relations refactorings
Diffstat (limited to 'archaeological_operations')
| -rw-r--r-- | archaeological_operations/templates/ishtar/sheet_operation.html | 25 | ||||
| -rw-r--r-- | archaeological_operations/templates/ishtar/sheet_site.html | 22 |
2 files changed, 6 insertions, 41 deletions
diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index e290ce319..fced5457a 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -410,28 +410,9 @@ {% if display_relations %} <div class="tab-pane fade" id="{{window_id}}-relations" role="tabpanel" aria-labelledby="{{window_id}}-relations-tab"> - - {% if item.right_relations.count and not item.right_relations_not_available %} - <h3>{% trans "Relations"%}</h3> - {% for rel in item.right_relations.all %} - {% ifchanged rel.relation_type %} - {% if forloop.counter0 %}</div>{% endif %} - <h4>{{rel.relation_type}}</h4> - <div class="row">{% endifchanged %} - <div class="col-12"> - <a href="#" onclick="load_window('/show-operation/{{rel.right_record.pk|unlocalize}}/');" class="display_details"> - <i class="fa fa-info-circle" aria-hidden="true"></i> - </a> {{rel.right_record}} - </div> - {% if forloop.last %} - </div>{% endif %} - {% endfor %} - {% else %} - <div class="alert alert-info" role="alert"> - <i class="fa fa-info-circle" aria-hidden="true"></i> - {% trans "No relations" %} - </div> - {% endif %} + {% with relation_url="/show-operation/" %} + {% include "ishtar/blocks/sheet_relations.html" %} + {% endwith %} </div> {% endif %} diff --git a/archaeological_operations/templates/ishtar/sheet_site.html b/archaeological_operations/templates/ishtar/sheet_site.html index 4116ee890..2ce9e7eaa 100644 --- a/archaeological_operations/templates/ishtar/sheet_site.html +++ b/archaeological_operations/templates/ishtar/sheet_site.html @@ -152,25 +152,9 @@ {% endif %} {% if display_relations %} -<h3>{% trans "Relations"%}</h3> -{% for rel in item.right_relations.all %} -{% ifchanged rel.relation_type %} -{% if forloop.counter0 %}</div>{% endif %} -<h4>{{rel.relation_type}}</h4> -<div class="row">{% endifchanged %} - <div class="col-12"> - <a href="#" onclick="load_window('/show-site/{{rel.right_record.pk|unlocalize}}/');" class="display_details"> - <i class="fa fa-info-circle" aria-hidden="true"></i> - </a> {{rel.right_record}} - </div> -{% if forloop.last %} -</div>{% endif %} -{% endfor %} -{% else %} -<div class="alert alert-info" role="alert"> - <i class="fa fa-info-circle" aria-hidden="true"></i> - {% trans "No relations" %} -</div> + {% with relation_url="/show-site/" %} + {% include "ishtar/blocks/sheet_relations.html" %} + {% endwith %} {% endif %} {% if not is_external and SHOW_GEO %} |
