Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tcms/bugs/templates/bugs/get.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

{% block contents %}
<div class="container-cards-pf">
{% 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 %}
<!-- Important: if you need to nest additional .row within a .row.row-cards-pf, do *not* use .row-cards-pf on the nested .row -->
<h1 class="col-md-12 kiwi-margin-top-0">
{% if bug.severity %}
Expand Down Expand Up @@ -86,7 +89,12 @@ <h2 class="card-pf-title kiwi-text-align-left">
{{ object.build }}
</h2>

<div class="card-pf-body"></div>
<h2 class="card-pf-title kiwi-text-align-left">
<span class="fa fa-exchange"></span>{% trans 'Related' %}
</h2>
<div class="card-pf-body">
<a href="{% url 'testruns-search' %}?product={{ object.product_id }}">{% trans 'Test runs for this product' %}</a>
</div>
</div>
</div>

Expand Down
9 changes: 7 additions & 2 deletions tcms/bugs/templates/bugs/mutable.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

{% block contents %}
<div class="container-fluid container-cards-pf">
{% 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 %}
<form class="form-horizontal" action="{{ form_post_url }}" method="post">
{% csrf_token %}
<input type="hidden" name="reporter" value="{{ form.reporter.value }}">
Expand Down Expand Up @@ -110,8 +113,10 @@
{% endif %}

<div class="form-group">
<div class="col-md-1 col-lg-1">
<button type="submit" class="btn btn-default btn-lg">{% trans "Save" %}</button>
<div class="col-md-12 col-lg-12">
<a href="{% if object %}{% url 'bugs-get' object.pk %}{% else %}{% url 'core-views-index' %}{% endif %}"
class="btn btn-danger btn-lg">{% trans "Cancel" %}</a>
<button type="submit" class="btn btn-primary btn-lg">{% trans "Save" %}</button>
</div>
</div>
</form>
Expand Down
1 change: 1 addition & 0 deletions tcms/bugs/templates/bugs/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
<form class="form-horizontal" method="get">
{% csrf_token %}
<div class="form-group">
Expand Down
11 changes: 11 additions & 0 deletions tcms/static/style/patternfly_override.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
29 changes: 29 additions & 0 deletions tcms/telemetry/templates/telemetry/include/nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{% load i18n %}

<ul class="nav nav-tabs">
<li {% if active_tab == "breakdown" %}class="active"{% endif %}>
<a href="{% url 'testing-breakdown' %}">
<span class="fa fa-pie-chart"></span> {% trans "Breakdown" %}
</a>
</li>
<li {% if active_tab == "dashboard" %}class="active"{% endif %}>
<a href="{% url 'execution-dashboard' %}">
<span class="fa fa-table"></span> {% trans "Dashboard" %}
</a>
</li>
<li {% if active_tab == "matrix" %}class="active"{% endif %}>
<a href="{% url 'testing-status-matrix' %}">
<span class="fa fa-th"></span> {% trans "Matrix" %}
</a>
</li>
<li {% if active_tab == "trends" %}class="active"{% endif %}>
<a href="{% url 'testing-execution-trends' %}">
<span class="fa fa-line-chart"></span> {% trans "Trends" %}
</a>
</li>
<li {% if active_tab == "health" %}class="active"{% endif %}>
<a href="{% url 'test-case-health' %}">
<span class="fa fa-heartbeat"></span> {% trans "TestCase health" %}
</a>
</li>
</ul>
1 change: 1 addition & 0 deletions tcms/telemetry/templates/telemetry/testing/breakdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

{% block contents %}
<div class="container-fluid container-cards-pf">
{% include "telemetry/include/nav.html" with active_tab="breakdown" %}
{% include "telemetry/include/filters.html" %}

<div class="col-md-3 kiwi-text-align-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" %}

<form class="form-horizontal">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

{% block contents %}
<div class="container-fluid container-cards-pf main" data-total-key="{% trans 'TOTAL' %}">
{% include "telemetry/include/nav.html" with active_tab="trends" %}
{% include "telemetry/include/filters.html" %}

<div class="passing-rate-summary">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

{% block contents %}
<div class="container-fluid container-cards-pf">
{% include "telemetry/include/nav.html" with active_tab="matrix" %}
{% include "telemetry/include/filters.html" %}

<form class="form-horizontal">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

{% block contents %}
<div class="container-fluid container-cards-pf">
{% include "telemetry/include/nav.html" with active_tab="health" %}
{% include "telemetry/include/filters.html" %}

<h2>{% trans "Most frequently failing test cases" %}</h2>
Expand Down
14 changes: 14 additions & 0 deletions tcms/templates/include/breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% load i18n %}

<ol class="breadcrumb">
<li><a href="{% url 'core-views-index' %}">{% trans "Dashboard" %}</a></li>
<li><a href="{% url search_url %}">{{ search_label }}</a></li>
{% if current_view == "view" %}
<li class="active">{{ object_label }}{{ object.pk }}: {{ object }}</li>
{% elif current_view == "edit" %}
<li><a href="{% url view_url object.pk %}">{{ object_label }}{{ object.pk }}: {{ object }}</a></li>
<li class="active">{% trans "Edit" %}</li>
{% elif current_view == "new" %}
<li class="active">{% trans "New" %}</li>
{% endif %}
</ol>
87 changes: 87 additions & 0 deletions tcms/templates/include/page_toolbar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{% load i18n %}

<div class="well well-sm clearfix">
<ul class="nav nav-pills pull-left">
{% if view_url and object %}
<li {% if current_view == "view" %}class="active"{% endif %}>
<a href="{% url view_url object.pk %}">
<span class="fa fa-eye"></span> {% trans "View" %}
</a>
</li>
{% endif %}

{% if edit_url and object %}
{% if edit_perm %}
<li {% if current_view == "edit" %}class="active"{% endif %}>
<a href="{% url edit_url object.pk %}">
<span class="fa fa-pencil"></span> {% trans "Edit" %}
</a>
</li>
{% endif %}
{% endif %}

{% if new_url %}
{% if add_perm %}
<li {% if current_view == "new" %}class="active"{% endif %}>
<a href="{% url new_url %}">
<span class="fa fa-plus"></span> {% trans "New" %}
</a>
</li>
{% endif %}
{% endif %}

{% if search_url %}
<li {% if current_view == "search" %}class="active"{% endif %}>
<a href="{% url search_url %}">
<span class="fa fa-search"></span> {% trans "Search" %}
</a>
</li>
{% endif %}
</ul>

{% if show_actions and object %}
<ul class="nav nav-pills pull-right">
{% if tc_clone %}
{% if add_perm %}
<li>
<a href="{% url 'testcases-clone' %}?c={{ object.pk }}" title="{% trans 'Clone' %}">
<span class="fa fa-clone"></span> {% trans "Clone" %}
</a>
</li>
{% endif %}
{% elif clone_url %}
{% if add_perm %}
<li>
<a href="{% url clone_url object.pk %}" title="{% trans 'Clone' %}">
<span class="fa fa-clone"></span> {% trans "Clone" %}
</a>
</li>
{% endif %}
{% endif %}

{% if admin_url_prefix and show_history %}
<li>
<a href="/admin/{{ admin_url_prefix }}/{{ object.pk }}/history/" title="{% trans 'History' %}">
<span class="fa fa-history"></span> {% trans "History" %}
</a>
</li>
{% endif %}

{% if admin_perm %}
<li>
<a href="/admin/{{ admin_url_prefix }}/{{ object.pk }}/change/" title="{% trans 'Permissions' %}">
<span class="fa fa-lock"></span> {% trans "Admin" %}
</a>
</li>
{% endif %}

{% if delete_perm %}
<li class="kiwi-pill-danger">
<a href="/admin/{{ admin_url_prefix }}/{{ object.pk }}/delete/" title="{% trans 'Delete' %}">
<span class="fa fa-trash-o"></span> {% trans "Delete" %}
</a>
</li>
{% endif %}
</ul>
{% endif %}
</div>
11 changes: 11 additions & 0 deletions tcms/templates/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,17 @@
<a href="{% url "plans-search" %}?author={{ user.username }}" target="_parent">{% trans "My Test Plans" %}</a>
</li>

<li>
<a href="{% url "testcases-search" %}?author={{ user.username }}" target="_parent">{% trans "My Test Cases" %}</a>
</li>

{% url "bugs-search" as bugs_search_url %}
{% if bugs_search_url %}
<li>
<a href="{{ bugs_search_url }}?reporter={{ user.username }}" target="_parent">{% trans "My Bugs" %}</a>
</li>
{% endif %}

<li class="divider"></li>

<li>
Expand Down
9 changes: 9 additions & 0 deletions tcms/templates/registration/registration_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@
<button type="submit" class="btn btn-primary btn-lg" tabindex="5">{% trans "Register" %}</button>
</div>
</div>

<div class="form-group">
<div class="col-xs-12 col-sm-offset-2 col-sm-10 col-md-offset-2 col-md-10">
<span class="help-block">
{% trans "Already have an account?" %}
<a href="{% url 'tcms-login' %}">{% trans "Log in" %}</a>
</span>
</div>
</div>

@atodorov atodorov Apr 22, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is something worth merging in, however some of the other changes probably won't (notably breadcrumbs have been explicitly removed in the past).

Please break this PR into individual ones - one per logical change so that they can be reviewed and commented on individually.

</form>
</div>
{% endblock %}
10 changes: 9 additions & 1 deletion tcms/testcases/templates/testcases/get.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

{% block contents %}
<div class="container-cards-pf">
{% 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 %}
<!-- Important: if you need to nest additional .row within a .row.row-cards-pf, do *not* use .row-cards-pf on the nested .row -->
<h1 class="col-md-12 kiwi-margin-top-0">
<span id="test_case_pk"
Expand Down Expand Up @@ -118,7 +121,12 @@ <h2 class="card-pf-title kiwi-text-align-left">
{% endif %}
</h2>

<div class="card-pf-body"></div>
<h2 class="card-pf-title kiwi-text-align-left">
<span class="fa fa-exchange"></span>{% trans 'Related' %}
</h2>
<div class="card-pf-body">
<a href="{% url 'testruns-search' %}?case={{ object.pk }}">{% trans 'Test runs with this case' %}</a>
</div>
</div>
</div>

Expand Down
3 changes: 3 additions & 0 deletions tcms/testcases/templates/testcases/mutable.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

{% block contents %}
<div class="container-fluid container-cards-pf">
{% 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 %}
<form class="form-horizontal" action="{% if object %}{% url 'testcases-edit' object.pk %}{% else %}{% url 'testcases-new' %}{% endif %}" method="post">
{% csrf_token %}
<input type="hidden" name="author" value="{{ form.author.value }}">
Expand Down
1 change: 1 addition & 0 deletions tcms/testcases/templates/testcases/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
<form class="form-horizontal" method="get">
{% csrf_token %}
<div class="form-group">
Expand Down
11 changes: 11 additions & 0 deletions tcms/testplans/templates/testplans/get.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

{% block contents %}
<div class="container-cards-pf">
{% 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 %}
<!-- Important: if you need to nest additional .row within a .row.row-cards-pf, do *not* use .row-cards-pf on the nested .row -->
<h1 class="col-md-12 kiwi-margin-top-0">
{% if not object.is_active %}<s>{% endif %}
Expand Down Expand Up @@ -88,6 +91,14 @@ <h2 class="card-pf-title kiwi-text-align-left">
<div class="card-pf-body">
{{ object.tree_view_html|safe }}
</div>

<h2 class="card-pf-title kiwi-text-align-left">
<span class="fa fa-exchange"></span>{% trans 'Related' %}
</h2>
<div class="card-pf-body">
<a href="{% url 'testcases-search' %}?plan={{ object.pk }}">{% trans 'Test cases in this plan' %}</a><br>
<a href="{% url 'testruns-search' %}?plan={{ object.pk }}">{% trans 'Test runs for this plan' %}</a>
</div>
</div>
</div>
</div>
Expand Down
9 changes: 7 additions & 2 deletions tcms/testplans/templates/testplans/mutable.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

{% block contents %}
<div class="container-fluid container-cards-pf">
{% 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 %}
<form class="form-horizontal" action="{% if object %}{% url 'plan-edit' object.pk %}{% else %}{% url 'plans-new' %}{% endif %}" method="post">
{% csrf_token %}
<input type="hidden" name="author" value="{{ form.author.value }}">
Expand Down Expand Up @@ -168,8 +171,10 @@
</div>

<div class="form-group">
<div class="col-md-1 col-lg-1">
<button type="submit" class="btn btn-default btn-lg">{% trans "Save" %}</button>
<div class="col-md-12 col-lg-12">
<a href="{% if object %}{% url 'test_plan_url' object.pk %}{% else %}{% url 'core-views-index' %}{% endif %}"
class="btn btn-danger btn-lg">{% trans "Cancel" %}</a>
<button type="submit" class="btn btn-primary btn-lg">{% trans "Save" %}</button>
</div>
</div>
</form>
Expand Down
1 change: 1 addition & 0 deletions tcms/testplans/templates/testplans/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
<form class="form-horizontal" method="get">
{% csrf_token %}

Expand Down
Loading