From: Michael Tremer Date: Wed, 19 Oct 2022 17:45:46 +0000 (+0000) Subject: web: Drop the unused Modal module X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a59b18ebd750735ee504226d63f9601e841b8fcd;p=pbs.git web: Drop the unused Modal module Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index 9e0f6881..6348ccd4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -255,10 +255,6 @@ dist_templates_modules_DATA = \ src/templates/modules/commits-table.html \ src/templates/modules/commit-message.html \ src/templates/modules/link-to-user.html \ - src/templates/modules/modal-base.html \ - src/templates/modules/modal-build-comment.html \ - src/templates/modules/modal-build-push.html \ - src/templates/modules/modal-build-unpush.html \ src/templates/modules/packages-files-table.html \ src/templates/modules/source-table.html \ src/templates/modules/text.html diff --git a/src/templates/modules/modal-base.html b/src/templates/modules/modal-base.html deleted file mode 100644 index f26143a4..00000000 --- a/src/templates/modules/modal-base.html +++ /dev/null @@ -1,37 +0,0 @@ - \ No newline at end of file diff --git a/src/templates/modules/modal-build-comment.html b/src/templates/modules/modal-build-comment.html deleted file mode 100644 index d292ab10..00000000 --- a/src/templates/modules/modal-build-comment.html +++ /dev/null @@ -1,44 +0,0 @@ -{% extends "modal-base.html" %} - -{% block id %}comment{% end block %} -{% block form_action %}/build/{{ build.uuid }}/comment{% end block %} - -{% block title %} - {% if current_user %} - {{ _("Comment on %s") % build.name }} - {% else %} - {{ _("Log in to comment") }} - {% end %} -{% end block %} - -{% block body %} - {% if current_user %} -
- - -
-
- - -
- {% else %} -

- {{ _("You need to log in to comment.") }} - {{ _("Click on the button below to do so.") }} -

- {% end %} -{% end block %} - -{% block footer %} - {% if current_user %} - - {% else %} - {{ _("Login") }} - {% end %} - - {{ _("Cancel") }} -{% end block %} diff --git a/src/templates/modules/modal-build-push.html b/src/templates/modules/modal-build-push.html deleted file mode 100644 index 7fb61b1f..00000000 --- a/src/templates/modules/modal-build-push.html +++ /dev/null @@ -1,60 +0,0 @@ -{% extends "modal-base.html" %} - -{% block id %}push{% end block %} -{% block form_action %}/build/{{ build.uuid }}/manage{% end block %} - -{% block title %} - {{ _("Push %s to a repository") % build.name }} -{% end block %} - -{% block body %} - - - {% if not build.all_jobs_finished %} -
- {{ _("Not all jobs are finished!") }} - {{ _("So it is strongly discouraged to push this build into the next repository.") }} -
- -
- {% end %} - -
-
- -
- - -

- {{ _("The build will be put into this repository.") }} -

-
-
-
- -
- -

- {{ _("You are going to push this build into a new repository.") }} - {{ _("This means that the build won't be part of the repository it is currently in anymore.") }} -

-

- {{ _("Please make sure you tested this build well enough that it will keep up with the quality level of the target repository.") }} -

-{% end block %} - -{% block footer_text %} - {% if current_repo %} - {{ _("Current repository") }}: - - {{ current_repo.name }} - - {% end %} -{% end %} -{% block submit_text %}{{ _("Push") }}{% end block %} diff --git a/src/templates/modules/modal-build-unpush.html b/src/templates/modules/modal-build-unpush.html deleted file mode 100644 index eeacfb7d..00000000 --- a/src/templates/modules/modal-build-unpush.html +++ /dev/null @@ -1,38 +0,0 @@ -{% extends "modal-base.html" %} - -{% block id %}unpush{% end block %} -{% block form_action %}/build/{{ build.uuid }}/manage{% end block %} - -{% block title %}{{ _("Unpush %s from a repository") % build.name }}{% end block %} - -{% block body %} - - -
-
- -
- -
-
-
- -
- -

- {{ _("You are going to unpush this build from its repository.") }} - {{ _("This means that the build won't be installable from this repository anymore.") }} -

- - {% if not build.state in ("obsolete", "broken") %} -

- {{ _("If you consider this build being obsolete or broken, please don't forget to mark it so.") }} -

- {% end %} -{% end block %} - -{% block submit_text %}{{ _("Unpush") }}{% end block %} diff --git a/src/web/__init__.py b/src/web/__init__.py index dd5620d5..fd6e6dab 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -38,7 +38,6 @@ class Application(tornado.web.Application): ui_modules = { "Highlight" : ui_modules.HighlightModule, "Text" : ui_modules.TextModule, - "Modal" : ui_modules.ModalModule, # Bugs "BugsList" : bugs.ListModule, diff --git a/src/web/ui_modules.py b/src/web/ui_modules.py index 5ebbc615..308a15d5 100644 --- a/src/web/ui_modules.py +++ b/src/web/ui_modules.py @@ -71,13 +71,6 @@ class CommitMessageModule(UIModule): return self.render_string("modules/commit-message.html", commit=commit) -class ModalModule(UIModule): - def render(self, what, **kwargs): - what = "modules/modal-%s.html" % what - - return self.render_string(what, **kwargs) - - class JobsStatusModule(UIModule): def render(self, build): return self.render_string("modules/jobs/status.html",