From: Michael Tremer Date: Tue, 9 May 2023 16:12:44 +0000 (+0000) Subject: web: Correctly use
and the container class X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4b6c830e13059c979e6fea7e2138adb249f2c613;p=pbs.git web: Correctly use
and the container class Signed-off-by: Michael Tremer --- diff --git a/src/templates/base.html b/src/templates/base.html index 5edafb16..5fc6ae96 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -115,13 +115,11 @@ {# Main Stuff #} {% block body %} -
-
- {% block container %} - NO CONTENT - {% end block %} -
-
+
+ {% block container %} + NO CONTENT + {% end block %} +
{% end block %} {# Footer #} diff --git a/src/templates/builders/detail.html b/src/templates/builders/detail.html index d1d88bbd..40679f7b 100644 --- a/src/templates/builders/detail.html +++ b/src/templates/builders/detail.html @@ -2,104 +2,112 @@ {% block title %}{{ _("Builders") }} - {{ builder.name }}{% end block %} -{% block container %} - - +{% block body %}
-

{{ builder }}

- {% if builder.cpu_model %} -

- {{ builder.cpu_model or _("Unknown CPU Model") }} - {% if builder.cpu_count > 1 %} - × {{ builder.cpu_count }} - {% end %} +
+ - - {{ builder.arch }} - -

- {% end %} +

{{ builder }}

-
-
-
- + {% end %} + +
+ + {# Builder Stats #} + {% if builder.is_online() %} +
+ {% module BuilderStats(builder) %} +
+ {% end %} + + {% if builder.description %} + {% module Text(builder.description) %} + {% end %}
+
- {# Builder Stats #} + {% if builder.has_perm(current_user) %}
- {% module BuilderStats(builder) %} + + {{ _("Edit") }} +
- - - {% if builder.description %} - {% module Text(builder.description) %} - {% end %} - + {% end %} - - {% if builder.has_perm(current_user) %} - - {% end %}
{% if builder.jobs %}
-
{{ _("Running Jobs") }}
+
+
{{ _("Running Jobs") }}
- {% module JobsList(builder.jobs) %} + {% module JobsList(builder.jobs) %} +
{% end %}
-
{{ _("Log") }}
+
+
{{ _("Log") }}
- {% module EventsList(builder=builder, show_builder=False, limit=10) %} + {% module EventsList(builder=builder, show_builder=False, limit=10) %} +
{% end block %} diff --git a/src/templates/builders/list.html b/src/templates/builders/list.html index ccdedf36..74c78b6e 100644 --- a/src/templates/builders/list.html +++ b/src/templates/builders/list.html @@ -2,71 +2,79 @@ {% block title %}{{ _("Builders") }}{% end block %} -{% block container %} - +{% block body %} +
+
+ -

{{ _("Builders") }}

+

{{ _("Builders") }}

- {% if current_user and current_user.is_admin() %} - - {% end %} + {% if current_user and current_user.is_admin() %} + + {% end %} - {% for builder in builders %} -
-
-
- {{ builder }} + {% for builder in builders %} +
+
+
+ {{ builder }} - {% if builder.is_online() %} -
- {{ _("Online") }} - {{ len(builder.jobs) }} -
- {% else %} - {{ _("Offline") }} - {% end %} -
+ {% if builder.is_online() %} +
+ {{ _("Online") }} + {{ len(builder.jobs) }} +
+ {% else %} + {{ _("Offline") }} + {% end %} +
-
- {{ builder.cpu_model or _("Unknown Processor") }} -
-
+
+ {{ builder.cpu_model or _("Unknown Processor") }} +
+
+
+ {% end %} - {% end %} +
{# Statistics #} - +
+
+ -
{{ _("Total Build Time By Architecture") }}
+
{{ _("Total Build Time By Architecture") }}
- {% set arches = backend.builders.total_build_time_by_arch %} + {% set arches = backend.builders.total_build_time_by_arch %} - + +
+
{% end block %} diff --git a/src/templates/builds/index.html b/src/templates/builds/index.html index 95b22af9..5767ad91 100644 --- a/src/templates/builds/index.html +++ b/src/templates/builds/index.html @@ -2,25 +2,29 @@ {% block title %}{{ _("Builds") }}{% end block %} -{% block container %} - +{% block body %} +
+
+ -

- {% if user %} - {{ _("%s's Builds") % user }} - {% else %} - {{ _("Recent Builds") }} - {% end %} -

+

+ {% if user %} + {{ _("%s's Builds") % user }} + {% else %} + {{ _("Recent Builds") }} + {% end %} +

- {# Render all builds #} - {% module BuildsList(builds) %} + {# Render all builds #} + {% module BuildsList(builds) %} +
+
{% end block %} diff --git a/src/templates/builds/show.html b/src/templates/builds/show.html index 1aa1a21c..402bf924 100644 --- a/src/templates/builds/show.html +++ b/src/templates/builds/show.html @@ -2,269 +2,226 @@ {% block title %}{{ _("Build") }} - {{ build }}{% end block %} -{% block container %} - - +{% block body %}
-

{{ build }}

- - {% if build.is_test() %} -
- {{ _("Test Build") }} +
+ + +

{{ build }}

+ + {% if build.is_test() %} +
+ {{ _("Test Build") }} - - {{ build.test_build_for }} - -
- {% else %} - {% if build.pkg.summary %} + + {{ build.test_build_for }} + +
+ {% else %}
{{ build.pkg.summary }}
{% end %} - {% end %} - -
-
-
- {% if build.owner %} -
-

- -

-
- -
-

- - {{ build.owner }} - - - - {{ _("Created %s") % locale.format_date(build.created_at, shorter=True) }} - -

- - {% module Text(build.message) %} -
- {% end %} -
- {# List any fixed bugs #} - {% if bugs %} -
- {{ _("Fixed Bugs") }} -
+
+ {# Scratch Build #} + {% if build.owner %} + + {{ _("Scratch Build by %s") % build.owner }} + + {% end %} - {% module BugsList(bugs) %} + {# Deprecated? #} + {% if build.is_deprecated() %} + + {{ _("Deprecated") }} + {% end %}
-
-
- {# Icon Bar #} - - - {# Score #} - - -
- {# Watch/Unwatch #} - {% if current_user in build.watchers %} -
- {% raw xsrf_form_html() %} +
+
+
+ {# Scratch Build #} + {% if build.owner %} + {% if build.message %} + {% module Text(build.message) %} + {% else %} +

+ {{ _("No Message") }} +

+ {% end %} + + {# Commit Message #} + {% elif build.commit %} + {% module CommitMessage(build.commit) %} - - - {% else %} -
- {% raw xsrf_form_html() %} - - -
{% end %} +
+
- {# More... #} - - {# XXX THIS IS SOME LEGACY STUFF I DON'T KNOW WHERE TO PUT #} -
-
-
- {% if build.commit %} - {% module CommitMessage(build.commit) %} +
+
+ + + + + + {{ _("Source Package") }} + + + {# Delete #} + {% if build.can_be_deleted(current_user) %} + + {{ _("Delete Build") }} + + {% end %} +
-

-

-

- {% end %} -
+ + {% if len(build.watchers) == 1 %} + {{ _("You are watching this build") }} + {% else %} + {{ _("You and one other are watching this build", + "You and %(num)s others are watching this build", + len(build.watchers)) % { "num" : len(build.watchers) } + }} + {% end %} + + + + {% else %} +
+ {% raw xsrf_form_html() %} + + +
+ {% end %}
+ {# List any fixed bugs #} + {% if bugs %} +
+
+
{{ _("Fixed Bugs") }}
+ + {% module BugsList(bugs) %} +
+
+ {% end %} + {% if build.jobs %}
- {% module JobsList(build.jobs, show_arch_only=True, show_packages=True) %} +
+ {% module JobsList(build.jobs, show_arch_only=True, show_packages=True) %} +
{% end %} {# Test Builds #} {% if build.disable_test_builds %}
-
{{ _("Test Builds")}}
+
+
{{ _("Test Builds")}}
-
- {{ _("Test builds have been disabled for this build") }} +
+ {{ _("Test builds have been disabled for this build") }} +
{% elif build.test_builds %}
-
{{ _("Test Builds")}}
+
+
{{ _("Test Builds")}}
- {% module BuildGroupList(build.test_builds, limit=8) %} + {% module BuildGroupList(build.test_builds, limit=8) %} +
{% end %} {# Log #}
-
{{ _("Log") }}
+
+
{{ _("Log") }}
- {% module EventsList(priority=4, build=build, show_build=False) %} + {% module EventsList(priority=4, build=build, show_build=False) %} +
{# Comment - This probably should go into a modal #}
-
- {% raw xsrf_form_html() %} - -
- -
- +
+ + {% raw xsrf_form_html() %} + +
+ +
+ +
-
-
-
- +
+
+ +
-
- + +
{% end block %} diff --git a/src/templates/distros/index.html b/src/templates/distros/index.html index 95deeb24..7b1e51e9 100644 --- a/src/templates/distros/index.html +++ b/src/templates/distros/index.html @@ -2,26 +2,30 @@ {% block title %}{{ _("Distributions") }}{% end block %} -{% block container %} - +{% block body %} +
+
+ -

{{ _("Distributions") }}

+

{{ _("Distributions") }}

- {% if current_user and current_user.is_admin() %} - - {% end %} + {% if current_user and current_user.is_admin() %} + + {% end %} - {% module DistrosList(distros) %} + {% module DistrosList(distros) %} +
+
{% end block %} diff --git a/src/templates/distros/show.html b/src/templates/distros/show.html index 05d43b80..169db31e 100644 --- a/src/templates/distros/show.html +++ b/src/templates/distros/show.html @@ -2,61 +2,70 @@ {% block title %}{{ _("Distributions") }} - {{ distro }}{% end block %} -{% block container %} - - -

{{ distro }}

- {% if distro.slogan %} -

{{ distro.slogan }}

- {% end %} +{% block body %} +
+
+ + +

{{ distro }}

+ + {% if distro.slogan %} +

{{ distro.slogan }}

+ {% end %} + + {% if distro.description %} +
+
+ {% module Text(distro.description) %} - {% if distro.description %} -
-
- {% module Text(distro.description) %} - - - -
- {% if distro.has_perm(current_user) %} - - {{ _("Edit") }} - - {% end %}
-
+ {% end %}
- {% end %} +
{# Repositories #} {% if distro.repos %} -

{{ _("Repositories") }}

+
+
+

{{ _("Repositories") }}

- {% module ReposList(distro.repos) %} + {% module ReposList(distro.repos) %} +
+
{% end %} {% end block %} diff --git a/src/templates/log.html b/src/templates/log.html index 76d42c1f..6d5162f4 100644 --- a/src/templates/log.html +++ b/src/templates/log.html @@ -2,34 +2,36 @@ {% block title %}{{ _("Log") }}{% end block %} -{% block container %} - - +{% block body %}
-

{{ _("Log") }}

+
+ -
- {% module EventsList(priority=priority, offset=offset, limit=limit, - builder=builder, user=user) %} -
+

{{ _("Log") }}

-
- +
{% end %} diff --git a/src/templates/packages/index.html b/src/templates/packages/index.html index 309e03ca..fd649e83 100644 --- a/src/templates/packages/index.html +++ b/src/templates/packages/index.html @@ -2,41 +2,45 @@ {% block title %}{{ _("Packages") }}{% end block %} -{% block container %} - +{% block body %} +
+
+ -

{{ _("Packages") }}

+

{{ _("Packages") }}

- - - {% for letter, pkgs in sorted(packages.items()) %} - - - +
- {{ letter.upper() }} -
+ + {% for letter, pkgs in sorted(packages.items()) %} + + + - {% for package in pkgs %} - - - - - {% end %} - {% end %} - -
+ {{ letter.upper() }} +
- - {{ package.name }} - - - {{ package.summary }} -
+ {% for package in pkgs %} + + + + {{ package.name }} + + + + {{ package.summary }} + + + {% end %} + {% end %} + + +
+
{% end block %} diff --git a/src/templates/packages/name.html b/src/templates/packages/name.html index 01ef9248..99b91bb0 100644 --- a/src/templates/packages/name.html +++ b/src/templates/packages/name.html @@ -2,67 +2,73 @@ {% block title %}{{ _("Package") }} - {{ package.name }}{% end block %} -{% block container %} - - +{% block body %}
- {% module PackageInfo(package) %} +
+ + + {% module PackageInfo(package) %} +
- {% for distro in backend.distros %} -
-

{{ distro }}

+
+ {% for distro in backend.distros %} +
+

{{ distro }}

- {% for repo in distro.repositories %} - {% set builds = repo.get_builds_by_name(package.name) %} + {% for repo in distro.repositories %} + {% set builds = repo.get_builds_by_name(package.name) %} - {% if builds %} -
-
- {{ repo }} -
+ {% if builds %} +
+
+ {{ repo }} +
- {% for build in builds %} - - - - + {% for build in builds %} + + + + - {{ build }} - - {% end %} -
+ {{ build }} + + {% end %} +
+ {% end %} {% end %} - {% end %} -
- {% end %} +
+ {% end %} +
{% if bugs %}
-

{{ _("Open Bugs") }}

+
{% end %} {% end block %} diff --git a/src/templates/packages/show.html b/src/templates/packages/show.html index 03286e8a..72c1267f 100644 --- a/src/templates/packages/show.html +++ b/src/templates/packages/show.html @@ -2,65 +2,71 @@ {% block title %}{{ _("Packages") }} - {{ package }}{% end block %} -{% block container %} - +{% block body %} +
+
+ - {% module PackageInfo(package, show_evr=True) %} + {% module PackageInfo(package, show_evr=True) %} -
- {# Download Button #} - - {{ _("Download Package") }} ({{ format_size(package.size) }}) - +
+ {# Download Button #} + + {{ _("Download Package") }} ({{ format_size(package.size) }}) + - {# Dropdown with all Builds #} - {% if package.builds %} - - {# XXX add reference to commit for source packages #} + {# XXX add reference to commit for source packages #} -
- {% module PackageDependencies(package) %} -
+
+ {% module PackageDependencies(package) %} +
+
+
{# Filelist #} {% if package.files %} -
-
{{ _("Filelist") }}
+
+
+
{{ _("Filelist") }}
- {% module PackageFilesTable(package, package.files) %} -
+ {% module PackageFilesTable(package, package.files) %} +
+
{% end %} {% end block %} diff --git a/src/templates/packages/view-file.html b/src/templates/packages/view-file.html index 5546d503..a3a6eafa 100644 --- a/src/templates/packages/view-file.html +++ b/src/templates/packages/view-file.html @@ -2,32 +2,34 @@ {% block title %}{{ package }} - {{ file }}{% end block %} -{% block container %} - - +{% block body %}
-

{{ file }}

+
+ -
- {% module Highlight(payload, filename=file.path) %} -
+

{{ file }}

+ +
+ {% module Highlight(payload, filename=file.path) %} +
-
{% end block %} diff --git a/src/templates/queue.html b/src/templates/queue.html index 31821244..b6bdc8e2 100644 --- a/src/templates/queue.html +++ b/src/templates/queue.html @@ -2,18 +2,22 @@ {% block title %}{{ _("Job Queue") }}{% end block %} -{% block container %} - +{% block body %} +
+
+ -

{{ _("Job Queue") }}

+

{{ _("Job Queue") }}

- {% module JobsList(queue) %} + {% module JobsList(queue) %} +
+
{% end block %} diff --git a/src/templates/repos/show.html b/src/templates/repos/show.html index 7047c81c..f2de048b 100644 --- a/src/templates/repos/show.html +++ b/src/templates/repos/show.html @@ -2,78 +2,81 @@ {% block title %}{{ _("Repository") }} - {{ repo }}{% end block %} -{% block container %} - - -

{{ distro }} - {{ repo }}

+{% block body %} +
+
+ +

{{ distro }} - {{ repo }}

-
-
- {# Description #} - {% if repo.description %} - {% module Text(repo.description) %} - {% end %} +
+
+ {# Description #} + {% if repo.description %} + {% module Text(repo.description) %} + {% end %} - - -
- - {{ _("Download Configuration") }} - - {% if repo.has_perm(current_user) %} - - {{ _("Edit") }} +
+ + {{ _("Download Configuration") }} - {% end %} + + {% if repo.has_perm(current_user) %} + + {{ _("Edit") }} + + {% end %} +
-
+
{% end block %} diff --git a/src/templates/users/index.html b/src/templates/users/index.html index 7b226e7f..270381cf 100644 --- a/src/templates/users/index.html +++ b/src/templates/users/index.html @@ -2,20 +2,22 @@ {% block title %}{{ _("Users") }}{% end block %} -{% block container %} - +{% block body %} +
+
+ -

{{ _("Users") }}

+

{{ _("Users") }}

-
- {% module UsersList(users) %} + {% module UsersList(users) %} +
{% end block %} diff --git a/src/templates/users/show.html b/src/templates/users/show.html index 29b99a0d..2eff083a 100644 --- a/src/templates/users/show.html +++ b/src/templates/users/show.html @@ -2,102 +2,108 @@ {% block title %}{{ _("Users") }} - {{ user }}{% end block %} -{% block container %} - +{% block body %} +
+
+ -

{{ user }}

-

{{ user.name }}

+

{{ user }}

+

{{ user.name }}

-
- {% if user == current_user and user.has_exceeded_quota() %} -
-
-

{{ _("Quota Exceeded") }}

-
+
+ {% if user == current_user and user.has_exceeded_quota() %} +
+
+

{{ _("Quota Exceeded") }}

+
-
- {{ _("You have exceeded your quota.") }} -
-
- {% end %} +
+ {{ _("You have exceeded your quota.") }} +
+
+ {% end %} -
-
-
-
- {{ user }} -
-
+
+
+
+
+ {{ user }} +
+
-
- {% if user.has_perm(current_user) %} -
{{ _("Resource Limits") }}
+
+ {% if user.has_perm(current_user) %} +
{{ _("Resource Limits") }}
- - {% end %} + + {% end %} -
- {% if user.has_perm(current_user) %} - - {{ _("Edit") }} - - {% end %} +
+ {% if user.has_perm(current_user) %} + + {{ _("Edit") }} + + {% end %} - {% if current_user and current_user.is_admin() %} - - {{ _("Email") }} - - {% end %} + {% if current_user and current_user.is_admin() %} + + {{ _("Email") }} + + {% end %} +
+
-
+
{# Repositories #} -
-
{{ _("Repositories") }}
+
+
+
{{ _("Repositories") }}
- {% if user.has_perm(current_user) %} - - {{ _("Create Repository") }} - - {% end %} + {% if user.has_perm(current_user) %} + + {{ _("Create Repository") }} + + {% end %} - {% if user.repos %} - {% for distro in sorted(user.repos) %} -
{{ distro }}
+ {% if user.repos %} + {% for distro in sorted(user.repos) %} +
{{ distro }}
- {% module ReposList(user.repos[distro]) %} + {% module ReposList(user.repos[distro]) %} + {% end %} {% end %} - {% end %} -
+
+
{% end block %}