diff --git a/apis_core/apis_entities/detail_views.py b/apis_core/apis_entities/detail_views.py index cf47b28..894793f 100644 --- a/apis_core/apis_entities/detail_views.py +++ b/apis_core/apis_entities/detail_views.py @@ -64,9 +64,12 @@ def get(self, request, *args, **kwargs): if callable(getattr(objects, "filter_for_user", None)): objects = objects.filter_for_user() disable_sort = False - if objects.count() > 50: + show_more = False + object_count = objects.count() + if object_count > 50: objects = objects[:50] disable_sort = True + show_more = True table = get_generic_relations_table( relation_class=rel, entity_instance=instance, @@ -84,6 +87,8 @@ def get(self, request, *args, **kwargs): tb_object_open, link_to_relations, rel_type, + show_more, + object_count, ) ) object_lod = Uri.objects.filter(entity=instance) diff --git a/apis_core/apis_entities/templates/apis_entities/detail_views/entity_detail_generic.html b/apis_core/apis_entities/templates/apis_entities/detail_views/entity_detail_generic.html index c329808..1800cf1 100644 --- a/apis_core/apis_entities/templates/apis_entities/detail_views/entity_detail_generic.html +++ b/apis_core/apis_entities/templates/apis_entities/detail_views/entity_detail_generic.html @@ -207,7 +207,7 @@ <h3 class="text-center mt-5">Beziehungen</h3> {% block relations %} {% for obj in right_card %} {% if obj.1.data|length > 0 %} - <h4>{{ obj.0 }} {% if obj.5 %}<a class="apis-{{ obj.5 }}" title="Gehe zu {{ object }}–{{ obj.0 }} Relationen" href="{{ obj.4 }}"><i class="bi bi-box-arrow-up-right" aria-hidden="true"><span class="visually-hidden">Gehe zu {{ object }} - {{ obj.5 }} Relationen</span></i></a>{% endif %}</h4> + <h4>{{ obj.0 }} {% if obj.5 %}<a class="apis-{{ obj.5 }}" title="Gehe zu {{ object }}–{{ obj.0 }} Relationen" href="{{ obj.4 }}"><i class="bi bi-box-arrow-up-right" aria-hidden="true"><span class="visually-hidden">Gehe zu {{ object }} - {{ obj.5 }} Relationen</span></i></a> {% if obj.6 %} <span class="fs-6 fw-light">aus technischen Gründen werden hier nur 50 von {{ obj.7 }} Relationen angezeigt </span> {% endif %}{% endif %}</h4> <div id="tab_{{ obj.2 }}" class="mb-5"> {% render_table obj.1 %}