src/web/__init__.py \
src/web/auth.py \
src/web/base.py \
+ src/web/bugs.py \
src/web/builders.py \
src/web/builds.py \
src/web/distributions.py \
templatesdir = $(datadir)/templates
+templates_bugsdir = $(templatesdir)/bugs
+
+dist_templates_bugs_modules_DATA = \
+ src/templates/bugs/modules/list.html
+
+templates_bugs_modulesdir = $(templates_bugsdir)/modules
+
dist_templates_builders_DATA = \
src/templates/builders/delete.html \
src/templates/builders/detail.html \
def init(self, data):
self.data = data
+ def __repr__(self):
+ return "<%s #%s>" % (self.__class__.__name__, self.id)
+
+ def __str__(self):
+ return "#%s" % self.id
+
def __eq__(self, other):
if isinstance(other, self.__class__):
return self.id == other.id
--- /dev/null
+<table>
+ <tbody>
+ {% for bug in bugs %}
+ <tr>
+ <th scope="row">
+ <a href="{{ bug.url }}">{{ bug }}</a>
+ </th>
+
+ <td>
+ {{ bug.summary }}
+
+ <br>
+
+ {{ bug.status }} {% if bug.resolution %}{{ bug.resolution }}{% end %}
+
+ {% if bug.assignee %}
+ ‐ {% module LinkToUser(bug.assignee) %}
+ {% end %}
+ </td>
+ </tr>
+ {% end %}
+ </tbody>
+</table>
{% end %}
{% if bugs %}
- <div class="row">
- <div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
- <h4>
- {{ _("Open bugs") }}
- </h4>
- </div>
- <div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
- <div class="btn-group">
- <a class="btn btn-secondary" href="{{ backend.bugzilla.enter_url(package.name) }}" target="_blank">
- {{ _("File new bug") }}
- </a>
- <a class="btn btn-secondary" href="{{ backend.bugzilla.list_url(package.name) }}" target="_blank">
- {{ _("Show all bugs") }}
- </a>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
- {% module BugsTable(package, bugs) %}
- </div>
- </div>
+ <h5>{{ _("Open Bugs In This Package") }}</h5>
+
+ {% module BugsList(bugs) %}
+
+ <a class="secondary button expanded" href="{{ backend.bugzilla.list_url(package.name) }}">
+ {{ _("Show All Bugs") }}
+ </a>
+
+ <a class="success button expanded" href="{{ backend.bugzilla.enter_url(package.name) }}">
+ {{ _("File A New Bug") }}
+ </a>
{% end %}
{% end block %}
# Import all handlers
from . import auth
+from . import bugs
from . import builders
from . import builds
from . import distributions
"LogEntry" : ui_modules.LogEntryModule,
"LogEntryComment" : ui_modules.LogEntryCommentModule,
+ # Bugs
+ "BugsList" : bugs.ListModule,
+
"BuildHeadline" : ui_modules.BuildHeadlineModule,
"BuildsList" : builds.ListModule,
"BuildStateWarnings" : ui_modules.BuildStateWarningsModule,
--- /dev/null
+#!/usr/bin/python3
+###############################################################################
+# #
+# Pakfire - The IPFire package management system #
+# Copyright (C) 2022 Pakfire development team #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+import tornado.web
+
+from . import ui_modules
+
+class ListModule(ui_modules.UIModule):
+ def render(self, bugs):
+ return self.render_string("bugs/modules/list.html", bugs=bugs)