diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2be142b..173519d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,10 @@ Release notes ### Version 5.1.1-dev +- Add visual indicator in hierarchy views, when an object on the far left or far right + also belong or have a hierarchy (relathionship tree). + https://github.com/nexB/dejacode/issues/70 + ### Version 5.1.0 - Upgrade Python version to 3.12 and Django to 5.0.x diff --git a/component_catalog/templates/component_catalog/component_details.html b/component_catalog/templates/component_catalog/component_details.html index 092b918..9464026 100644 --- a/component_catalog/templates/component_catalog/component_details.html +++ b/component_catalog/templates/component_catalog/component_details.html @@ -58,7 +58,7 @@ {% block javascripts %} {{ block.super }} - + {% include 'component_catalog/includes/component_hierarchy.js.html' with related_parents=tabsets.Hierarchy.fields.0.1.related_parents related_children=tabsets.Hierarchy.fields.0.1.related_children productcomponents=tabsets.Hierarchy.fields.0.1.productcomponents %} {% if tabsets.Owner.extra %} {% include 'organization/includes/owner_hierarchy.js.html' with current_owner=object.owner parents=tabsets.Owner.extra.context.owner_parents children=tabsets.Owner.extra.context.owner_children tab_name="tab_owner" %} diff --git a/component_catalog/templates/component_catalog/includes/component_hierarchy.js.html b/component_catalog/templates/component_catalog/includes/component_hierarchy.js.html index 4947825..c37e010 100644 --- a/component_catalog/templates/component_catalog/includes/component_hierarchy.js.html +++ b/component_catalog/templates/component_catalog/includes/component_hierarchy.js.html @@ -1,84 +1,66 @@ - \ No newline at end of file + {% if related_child.child_count > 0 %} + var linkUrl = '{{ related_child.child.get_absolute_url }}#hierarchy'; + addEndpointWithLink(jsPlumbHierarchy, source_id, 'RightMiddle', linkUrl); + {% endif %} + {% endfor %} +{% endblock %} \ No newline at end of file diff --git a/component_catalog/templates/component_catalog/tabs/tab_subcomponents.html b/component_catalog/templates/component_catalog/tabs/tab_subcomponents.html index dc97a86..d98f485 100644 --- a/component_catalog/templates/component_catalog/tabs/tab_subcomponents.html +++ b/component_catalog/templates/component_catalog/tabs/tab_subcomponents.html @@ -34,7 +34,7 @@ {% endif %} {{ data.child.version }} - {{ data.child.owner }} + {{ data.child.owner|default_if_none:"" }} {{ data.subcomponent.purpose }} {% if data.subcomponent.license_expression %} @@ -50,7 +50,7 @@ {{ data.subcomponent.is_modified|as_icon }} {% if component.is_active %} -