Commit 6ca05585 authored by Nicolas Gelot's avatar Nicolas Gelot
Browse files

Bootstrap kiwi plugin

parent f1e17546
Pipeline #148313 passed with stage
in 58 seconds
......@@ -41,3 +41,6 @@ dev = [
[project.urls]
Source = "https://gitlab.e.foundation/e/infra/kiwi/tcms_gitlab_efoundation_plugin"
[project.entry-points."kiwitcms.plugins"]
report = "tcmscontrib.report"
from django.urls import reverse_lazy
# Follows the format of ``tcms.settings.common.MENU_ITEMS``
MENU_ITEMS = [
("Device report", reverse_lazy("device-report")),
]
{% extends "base.html" %}
{% load i18n %}
{% load static %}
{% block title %}{% trans "Generate device report" %}{% endblock %}
{% block body_class %}cards-pf{% endblock %}
{% block contents %}
<div class="container-fluid container-cards-pf">
<form class="form-horizontal" method="get">
{% csrf_token %}
<div class="form-group">
<label class="col-md-1 col-lg-1" for="id_product">{% trans "Product" %}</label>
<div class="col-md-3 col-lg-3">
<select class="form-control" id="id_product">
<option value="">----------</option>
{% for option in form.product.field.queryset %}
<option value="{{ option.pk }}" {% if form.product.value|add:'0' == option.pk %}selected{% endif %}>
{{ option.name }}
</option>
{% endfor %}
</select>
</div>
<label class="col-md-1 col-lg-1" for="id_tag">{% trans "Tag" %}</label>
<div class="col-md-3 col-lg-3">
<input id="id_tag" type="text" class="form-control" value="{{ form.tag.value|default:'' }}">
<p class="help-block">{% trans "Separate multiple values with comma (,)" %}</p>
</div>
</div>
<div class="form-group">
<div class="col-md-1 col-lg-1">
<button id="btn_search" type="submit" class="btn btn-default btn-lg">{% trans "Search" %}</button>
</div>
</div>
</form>
{% endblock %}
from django.urls import re_path
from . import views
urlpatterns = [
re_path(r"^device/$", views.DeviceReport.as_view(), name="device-report"),
]
from tcms.testruns.views import SearchTestRunView
class DeviceReport(SearchTestRunView):
template_name = "report/device.html"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment