From 96a279d7a018660df24eacb0a694adff8074eeb6 Mon Sep 17 00:00:00 2001 From: Achmad Fienan Rahardianto Date: Mon, 16 Feb 2026 12:37:44 +0700 Subject: [PATCH] Improve navigation across all views Add page toolbar with New/Search pills to all search pages. Add breadcrumbs (Dashboard > Search > Entity) to all detail, edit and create pages. Add telemetry sub-nav tabs. Add related links in detail page sidebars. Add cancel buttons and consistent Save styling on edit/create forms. Add "My Test Cases" and "My Bugs" shortcuts to user dropdown menu. Add "Already have an account? Log in" link to registration page. Unify toolbar action buttons (Clone, History, Admin, Delete) to use nav-pills style matching View/Edit/New/Search pills, with a kiwi-pill-danger variant for the Delete action. --- tcms/bugs/templates/bugs/get.html | 10 ++- tcms/bugs/templates/bugs/mutable.html | 9 +- tcms/bugs/templates/bugs/search.html | 1 + tcms/static/style/patternfly_override.css | 11 +++ .../templates/telemetry/include/nav.html | 29 +++++++ .../telemetry/testing/breakdown.html | 1 + .../testing/execution-dashboard.html | 1 + .../telemetry/testing/execution-trends.html | 1 + .../telemetry/testing/status-matrix.html | 1 + .../telemetry/testing/test-case-health.html | 1 + tcms/templates/include/breadcrumbs.html | 14 +++ tcms/templates/include/page_toolbar.html | 87 +++++++++++++++++++ tcms/templates/navbar.html | 11 +++ .../registration/registration_form.html | 9 ++ tcms/testcases/templates/testcases/get.html | 10 ++- .../templates/testcases/mutable.html | 3 + .../testcases/templates/testcases/search.html | 1 + tcms/testplans/templates/testplans/get.html | 11 +++ .../templates/testplans/mutable.html | 9 +- .../testplans/templates/testplans/search.html | 1 + tcms/testruns/templates/testruns/get.html | 10 ++- tcms/testruns/templates/testruns/mutable.html | 9 +- tcms/testruns/templates/testruns/search.html | 1 + 23 files changed, 232 insertions(+), 9 deletions(-) create mode 100644 tcms/telemetry/templates/telemetry/include/nav.html create mode 100644 tcms/templates/include/breadcrumbs.html create mode 100644 tcms/templates/include/page_toolbar.html diff --git a/tcms/bugs/templates/bugs/get.html b/tcms/bugs/templates/bugs/get.html index a8e2aee380..ea875aff70 100644 --- a/tcms/bugs/templates/bugs/get.html +++ b/tcms/bugs/templates/bugs/get.html @@ -17,6 +17,9 @@ {% block contents %}
+ {% trans "Bugs" as bugs_breadcrumb_label %} + {% include "include/breadcrumbs.html" with search_url="bugs-search" search_label=bugs_breadcrumb_label view_url="bugs-get" object_label="BUG-" current_view="view" %} + {% include "include/page_toolbar.html" with current_view="view" view_url="bugs-get" edit_url="bugs-edit" new_url="bugs-new" search_url="bugs-search" admin_url_prefix="bugs/bug" show_actions=True edit_perm=perms.bugs.change_bug add_perm=perms.bugs.add_bug delete_perm=perms.bugs.delete_bug admin_perm=perms.bugs.change_bug %}

{% if bug.severity %} @@ -86,7 +89,12 @@

{{ object.build }}

-
+

+ {% trans 'Related' %} +

+
diff --git a/tcms/bugs/templates/bugs/mutable.html b/tcms/bugs/templates/bugs/mutable.html index 462e20285c..e8bdb0ec33 100644 --- a/tcms/bugs/templates/bugs/mutable.html +++ b/tcms/bugs/templates/bugs/mutable.html @@ -13,6 +13,9 @@ {% block contents %}
+ {% trans "Bugs" as bugs_breadcrumb_label %} + {% include "include/breadcrumbs.html" with search_url="bugs-search" search_label=bugs_breadcrumb_label view_url="bugs-get" object_label="BUG-" current_view=object|yesno:"edit,new" %} + {% include "include/page_toolbar.html" with current_view=object|yesno:"edit,new" view_url="bugs-get" edit_url="bugs-edit" new_url="bugs-new" search_url="bugs-search" edit_perm=perms.bugs.change_bug add_perm=perms.bugs.add_bug %}
{% csrf_token %} @@ -110,8 +113,10 @@ {% endif %}
-
- +
+ {% trans "Cancel" %} +
diff --git a/tcms/bugs/templates/bugs/search.html b/tcms/bugs/templates/bugs/search.html index 4c30fe3b2b..f6626f9f6a 100644 --- a/tcms/bugs/templates/bugs/search.html +++ b/tcms/bugs/templates/bugs/search.html @@ -11,6 +11,7 @@ data-trans-no-records-found="{% trans 'No records found' %}" data-trans-x-records-found="{% trans 'Found _TOTAL_ records' %}" > + {% include "include/page_toolbar.html" with current_view="search" new_url="bugs-new" search_url="bugs-search" add_perm=perms.bugs.add_bug %}
{% csrf_token %}
diff --git a/tcms/static/style/patternfly_override.css b/tcms/static/style/patternfly_override.css index 66510b25ae..89fbafbeb9 100644 --- a/tcms/static/style/patternfly_override.css +++ b/tcms/static/style/patternfly_override.css @@ -155,6 +155,17 @@ input[type="submit"].grp-warning { cursor: pointer; } +/* Danger pill variant for Delete action in page toolbar */ +.nav-pills > li.kiwi-pill-danger > a { + color: #cc0000; +} + +.nav-pills > li.kiwi-pill-danger > a:hover, +.nav-pills > li.kiwi-pill-danger > a:focus { + background-color: #cc0000; + color: #fff; +} + .dataTables_info { display: inline; } diff --git a/tcms/telemetry/templates/telemetry/include/nav.html b/tcms/telemetry/templates/telemetry/include/nav.html new file mode 100644 index 0000000000..9fb2e6d27c --- /dev/null +++ b/tcms/telemetry/templates/telemetry/include/nav.html @@ -0,0 +1,29 @@ +{% load i18n %} + + diff --git a/tcms/telemetry/templates/telemetry/testing/breakdown.html b/tcms/telemetry/templates/telemetry/testing/breakdown.html index 231c994fed..fd048a630c 100644 --- a/tcms/telemetry/templates/telemetry/testing/breakdown.html +++ b/tcms/telemetry/templates/telemetry/testing/breakdown.html @@ -7,6 +7,7 @@ {% block contents %}
+ {% include "telemetry/include/nav.html" with active_tab="breakdown" %} {% include "telemetry/include/filters.html" %}
diff --git a/tcms/telemetry/templates/telemetry/testing/execution-dashboard.html b/tcms/telemetry/templates/telemetry/testing/execution-dashboard.html index 83820cccf3..ac28cff63f 100644 --- a/tcms/telemetry/templates/telemetry/testing/execution-dashboard.html +++ b/tcms/telemetry/templates/telemetry/testing/execution-dashboard.html @@ -11,6 +11,7 @@ data-trans-no-records-found="{% trans 'No records found' %}" data-trans-x-records-found="{% trans 'Found _TOTAL_ records' %}" > + {% include "telemetry/include/nav.html" with active_tab="dashboard" %} {% include "telemetry/include/filters.html" %} diff --git a/tcms/telemetry/templates/telemetry/testing/execution-trends.html b/tcms/telemetry/templates/telemetry/testing/execution-trends.html index de05e14d26..0e21fa19cf 100644 --- a/tcms/telemetry/templates/telemetry/testing/execution-trends.html +++ b/tcms/telemetry/templates/telemetry/testing/execution-trends.html @@ -7,6 +7,7 @@ {% block contents %}
+ {% include "telemetry/include/nav.html" with active_tab="trends" %} {% include "telemetry/include/filters.html" %}
diff --git a/tcms/telemetry/templates/telemetry/testing/status-matrix.html b/tcms/telemetry/templates/telemetry/testing/status-matrix.html index a14b19b862..81de2100b1 100644 --- a/tcms/telemetry/templates/telemetry/testing/status-matrix.html +++ b/tcms/telemetry/templates/telemetry/testing/status-matrix.html @@ -7,6 +7,7 @@ {% block contents %}
+ {% include "telemetry/include/nav.html" with active_tab="matrix" %} {% include "telemetry/include/filters.html" %} diff --git a/tcms/telemetry/templates/telemetry/testing/test-case-health.html b/tcms/telemetry/templates/telemetry/testing/test-case-health.html index 3edeb84915..cb75c2b84a 100644 --- a/tcms/telemetry/templates/telemetry/testing/test-case-health.html +++ b/tcms/telemetry/templates/telemetry/testing/test-case-health.html @@ -7,6 +7,7 @@ {% block contents %}
+ {% include "telemetry/include/nav.html" with active_tab="health" %} {% include "telemetry/include/filters.html" %}

{% trans "Most frequently failing test cases" %}

diff --git a/tcms/templates/include/breadcrumbs.html b/tcms/templates/include/breadcrumbs.html new file mode 100644 index 0000000000..e43109df64 --- /dev/null +++ b/tcms/templates/include/breadcrumbs.html @@ -0,0 +1,14 @@ +{% load i18n %} + + diff --git a/tcms/templates/include/page_toolbar.html b/tcms/templates/include/page_toolbar.html new file mode 100644 index 0000000000..a03910d6e5 --- /dev/null +++ b/tcms/templates/include/page_toolbar.html @@ -0,0 +1,87 @@ +{% load i18n %} + +
+ + + {% if show_actions and object %} + + {% endif %} +
diff --git a/tcms/templates/navbar.html b/tcms/templates/navbar.html index fd0554a247..8a87845c24 100644 --- a/tcms/templates/navbar.html +++ b/tcms/templates/navbar.html @@ -88,6 +88,17 @@ {% trans "My Test Plans" %} +
  • + {% trans "My Test Cases" %} +
  • + + {% url "bugs-search" as bugs_search_url %} + {% if bugs_search_url %} +
  • + {% trans "My Bugs" %} +
  • + {% endif %} +
  • diff --git a/tcms/templates/registration/registration_form.html b/tcms/templates/registration/registration_form.html index 2a10ff8831..b574319d89 100644 --- a/tcms/templates/registration/registration_form.html +++ b/tcms/templates/registration/registration_form.html @@ -53,6 +53,15 @@
  • + +
    +
    + + {% trans "Already have an account?" %} + {% trans "Log in" %} + +
    +
    {% endblock %} diff --git a/tcms/testcases/templates/testcases/get.html b/tcms/testcases/templates/testcases/get.html index 8665371a95..7b092fcb69 100644 --- a/tcms/testcases/templates/testcases/get.html +++ b/tcms/testcases/templates/testcases/get.html @@ -10,6 +10,9 @@ {% block contents %}
    + {% trans "Test Cases" as tc_breadcrumb_label %} + {% include "include/breadcrumbs.html" with search_url="testcases-search" search_label=tc_breadcrumb_label view_url="testcases-get" object_label="TC-" current_view="view" %} + {% include "include/page_toolbar.html" with current_view="view" view_url="testcases-get" edit_url="testcases-edit" new_url="testcases-new" search_url="testcases-search" tc_clone=True admin_url_prefix="testcases/testcase" show_actions=True show_history=True edit_perm=perms.testcases.change_testcase add_perm=perms.testcases.add_testcase delete_perm=perms.testcases.delete_testcase admin_perm=perms.testcases.change_testcase %}

    {% endif %}

    -
    +

    + {% trans 'Related' %} +

    +
    diff --git a/tcms/testcases/templates/testcases/mutable.html b/tcms/testcases/templates/testcases/mutable.html index 8da89e7a9b..77813856d9 100644 --- a/tcms/testcases/templates/testcases/mutable.html +++ b/tcms/testcases/templates/testcases/mutable.html @@ -17,6 +17,9 @@ {% block contents %}
    + {% trans "Test Cases" as tc_breadcrumb_label %} + {% include "include/breadcrumbs.html" with search_url="testcases-search" search_label=tc_breadcrumb_label view_url="testcases-get" object_label="TC-" current_view=object|yesno:"edit,new" %} + {% include "include/page_toolbar.html" with current_view=object|yesno:"edit,new" view_url="testcases-get" edit_url="testcases-edit" new_url="testcases-new" search_url="testcases-search" edit_perm=perms.testcases.change_testcase add_perm=perms.testcases.add_testcase %}
    {% csrf_token %} diff --git a/tcms/testcases/templates/testcases/search.html b/tcms/testcases/templates/testcases/search.html index 1cf000552b..3c244987df 100644 --- a/tcms/testcases/templates/testcases/search.html +++ b/tcms/testcases/templates/testcases/search.html @@ -11,6 +11,7 @@ data-trans-no-records-found="{% trans 'No records found' %}" data-trans-x-records-found="{% trans 'Found _TOTAL_ records' %}" > + {% include "include/page_toolbar.html" with current_view="search" new_url="testcases-new" search_url="testcases-search" add_perm=perms.testcases.add_testcase %} {% csrf_token %}
    diff --git a/tcms/testplans/templates/testplans/get.html b/tcms/testplans/templates/testplans/get.html index a994e89dd7..e1df1e9542 100644 --- a/tcms/testplans/templates/testplans/get.html +++ b/tcms/testplans/templates/testplans/get.html @@ -10,6 +10,9 @@ {% block contents %}
    + {% trans "Test Plans" as tp_breadcrumb_label %} + {% include "include/breadcrumbs.html" with search_url="plans-search" search_label=tp_breadcrumb_label view_url="test_plan_url" object_label="TP-" current_view="view" %} + {% include "include/page_toolbar.html" with current_view="view" view_url="test_plan_url" edit_url="plan-edit" new_url="plans-new" search_url="plans-search" clone_url="plans-clone" admin_url_prefix="testplans/testplan" show_actions=True show_history=True edit_perm=perms.testplans.change_testplan add_perm=perms.testplans.add_testplan delete_perm=perms.testplans.delete_testplan admin_perm=perms.testplans.change_testplan %}

    {% if not object.is_active %}{% endif %} @@ -88,6 +91,14 @@

    {{ object.tree_view_html|safe }}
    + +

    + {% trans 'Related' %} +

    +

    diff --git a/tcms/testplans/templates/testplans/mutable.html b/tcms/testplans/templates/testplans/mutable.html index 34b8d242a6..8250857ac9 100644 --- a/tcms/testplans/templates/testplans/mutable.html +++ b/tcms/testplans/templates/testplans/mutable.html @@ -17,6 +17,9 @@ {% block contents %}
    + {% trans "Test Plans" as tp_breadcrumb_label %} + {% include "include/breadcrumbs.html" with search_url="plans-search" search_label=tp_breadcrumb_label view_url="test_plan_url" object_label="TP-" current_view=object|yesno:"edit,new" %} + {% include "include/page_toolbar.html" with current_view=object|yesno:"edit,new" view_url="test_plan_url" edit_url="plan-edit" new_url="plans-new" search_url="plans-search" edit_perm=perms.testplans.change_testplan add_perm=perms.testplans.add_testplan %} {% csrf_token %} @@ -168,8 +171,10 @@
    -
    - +
    + {% trans "Cancel" %} +
    diff --git a/tcms/testplans/templates/testplans/search.html b/tcms/testplans/templates/testplans/search.html index 2766146842..deea47e3bb 100644 --- a/tcms/testplans/templates/testplans/search.html +++ b/tcms/testplans/templates/testplans/search.html @@ -13,6 +13,7 @@ data-trans-no-records-found="{% trans 'No records found' %}" data-trans-x-records-found="{% trans 'Found _TOTAL_ records' %}" > + {% include "include/page_toolbar.html" with current_view="search" new_url="plans-new" search_url="plans-search" add_perm=perms.testplans.add_testplan %}
    {% csrf_token %} diff --git a/tcms/testruns/templates/testruns/get.html b/tcms/testruns/templates/testruns/get.html index b7f78e9985..d802403f2d 100644 --- a/tcms/testruns/templates/testruns/get.html +++ b/tcms/testruns/templates/testruns/get.html @@ -10,6 +10,9 @@ {% block contents %}
    + {% trans "Test Runs" as tr_breadcrumb_label %} + {% include "include/breadcrumbs.html" with search_url="testruns-search" search_label=tr_breadcrumb_label view_url="testruns-get" object_label="TR-" current_view="view" %} + {% include "include/page_toolbar.html" with current_view="view" view_url="testruns-get" edit_url="testruns-edit" new_url="testruns-new" search_url="testruns-search" clone_url="testruns-clone" admin_url_prefix="testruns/testrun" show_actions=True show_history=True edit_perm=perms.testruns.change_testrun add_perm=perms.testruns.add_testrun delete_perm=perms.testruns.delete_testrun admin_perm=perms.testruns.change_testrun %}

    {% endif %}

    -
    +

    + {% trans 'Related' %} +

    +
    diff --git a/tcms/testruns/templates/testruns/mutable.html b/tcms/testruns/templates/testruns/mutable.html index d215b3c919..43a4b79414 100644 --- a/tcms/testruns/templates/testruns/mutable.html +++ b/tcms/testruns/templates/testruns/mutable.html @@ -16,6 +16,9 @@ {% block contents %}
    + {% trans "Test Runs" as tr_breadcrumb_label %} + {% include "include/breadcrumbs.html" with search_url="testruns-search" search_label=tr_breadcrumb_label view_url="testruns-get" object_label="TR-" current_view=object|yesno:"edit,new" %} + {% include "include/page_toolbar.html" with current_view=object|yesno:"edit,new" view_url="testruns-get" edit_url="testruns-edit" new_url="testruns-new" search_url="testruns-search" edit_perm=perms.testruns.change_testrun add_perm=perms.testruns.add_testrun %} {% csrf_token %} @@ -206,8 +209,10 @@
    -
    - +
    + {% trans "Cancel" %} +
    diff --git a/tcms/testruns/templates/testruns/search.html b/tcms/testruns/templates/testruns/search.html index 721cac43ec..00fbfd4353 100644 --- a/tcms/testruns/templates/testruns/search.html +++ b/tcms/testruns/templates/testruns/search.html @@ -11,6 +11,7 @@ data-trans-no-records-found="{% trans 'No records found' %}" data-trans-x-records-found="{% trans 'Found _TOTAL_ records' %}" > + {% include "include/page_toolbar.html" with current_view="search" new_url="testruns-new" search_url="testruns-search" add_perm=perms.testruns.add_testrun %} {% csrf_token %}