From: Michael Tremer Date: Sun, 22 Oct 2017 11:50:45 +0000 (+0100) Subject: Move mirror templates into own subdirectory X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d72a55bef69033ad7dbeccd72d451507e635184b;p=people%2Fjschlag%2Fpbs.git Move mirror templates into own subdirectory Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index d7384c2..8e6fd05 100644 --- a/Makefile.am +++ b/Makefile.am @@ -187,11 +187,6 @@ dist_templates_DATA = \ src/templates/keys-list.html \ src/templates/log.html \ src/templates/login.html \ - src/templates/mirrors-delete.html \ - src/templates/mirrors-detail.html \ - src/templates/mirrors-edit.html \ - src/templates/mirrors-list.html \ - src/templates/mirrors-new.html \ src/templates/package-detail.html \ src/templates/package-detail-list.html \ src/templates/package-properties.html \ @@ -246,6 +241,15 @@ dist_templates_errors_DATA = \ templates_errorsdir = $(templatesdir)/errors +dist_templates_mirrors_DATA = \ + src/templates/mirrors/delete.html \ + src/templates/mirrors/detail.html \ + src/templates/mirrors/edit.html \ + src/templates/mirrors/list.html \ + src/templates/mirrors/new.html + +templates_mirrorsdir = $(templatesdir)/mirrors + dist_templates_modules_DATA = \ src/templates/modules/bugs-table.html \ src/templates/modules/build-headline.html \ diff --git a/po/POTFILES.in b/po/POTFILES.in index 44486a5..f644886 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -78,11 +78,11 @@ src/templates/keys-import.html src/templates/keys-list.html src/templates/log.html src/templates/login.html -src/templates/mirrors-delete.html -src/templates/mirrors-detail.html -src/templates/mirrors-edit.html -src/templates/mirrors-list.html -src/templates/mirrors-new.html +src/templates/mirrors/delete.html +src/templates/mirrors/detail.html +src/templates/mirrors/edit.html +src/templates/mirrors/list.html +src/templates/mirrors/new.html src/templates/modules/bugs-table.html src/templates/modules/builders/load.html src/templates/modules/build-headline.html diff --git a/src/templates/mirrors-delete.html b/src/templates/mirrors/delete.html similarity index 97% rename from src/templates/mirrors-delete.html rename to src/templates/mirrors/delete.html index c1c1ef3..2ad9993 100644 --- a/src/templates/mirrors-delete.html +++ b/src/templates/mirrors/delete.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "../base.html" %} {% block title %}{{ _("Delete mirror %s") % mirror.hostname }}{% end block %} diff --git a/src/templates/mirrors-detail.html b/src/templates/mirrors/detail.html similarity index 99% rename from src/templates/mirrors-detail.html rename to src/templates/mirrors/detail.html index 4b9ac38..fffa71c 100644 --- a/src/templates/mirrors-detail.html +++ b/src/templates/mirrors/detail.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "../base.html" %} {% block title %}{{ _("Mirror: %s") % mirror.hostname }}{% end block %} diff --git a/src/templates/mirrors-edit.html b/src/templates/mirrors/edit.html similarity index 98% rename from src/templates/mirrors-edit.html rename to src/templates/mirrors/edit.html index 2e3b3c3..4be0bac 100644 --- a/src/templates/mirrors-edit.html +++ b/src/templates/mirrors/edit.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "../base.html" %} {% block title %}{{ _("Manage mirror %s") % mirror.hostname }}{% end block %} diff --git a/src/templates/mirrors-list.html b/src/templates/mirrors/list.html similarity index 98% rename from src/templates/mirrors-list.html rename to src/templates/mirrors/list.html index bbf03f1..670a260 100644 --- a/src/templates/mirrors-list.html +++ b/src/templates/mirrors/list.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "../base.html" %} {% block title %}{{ _("Mirrors") }}{% end block %} diff --git a/src/templates/mirrors-new.html b/src/templates/mirrors/new.html similarity index 98% rename from src/templates/mirrors-new.html rename to src/templates/mirrors/new.html index 67ee96b..2e5a9ab 100644 --- a/src/templates/mirrors-new.html +++ b/src/templates/mirrors/new.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "../base.html" %} {% block title %}{{ _("Add new mirror") }}{% end block %} diff --git a/src/web/handlers_mirrors.py b/src/web/handlers_mirrors.py index fa32e43..43822ef 100644 --- a/src/web/handlers_mirrors.py +++ b/src/web/handlers_mirrors.py @@ -27,7 +27,7 @@ class MirrorListHandler(BaseHandler): # Get recent log messages. kwargs["log"] = self.pakfire.mirrors.get_history(limit=5) - self.render("mirrors-list.html", **kwargs) + self.render("mirrors/list.html", **kwargs) class MirrorDetailHandler(BaseHandler): @@ -38,7 +38,7 @@ class MirrorDetailHandler(BaseHandler): log = self.pakfire.mirrors.get_history(mirror=mirror, limit=10) - self.render("mirrors-detail.html", mirror=mirror, log=log) + self.render("mirrors/detail.html", mirror=mirror, log=log) class MirrorActionHandler(BaseHandler): @@ -55,7 +55,7 @@ class MirrorActionHandler(BaseHandler): class MirrorNewHandler(MirrorActionHandler): @tornado.web.authenticated def get(self, hostname="", path="", hostname_missing=False, path_invalid=False): - self.render("mirrors-new.html", _hostname=hostname, path=path, + self.render("mirrors/new.html", _hostname=hostname, path=path, hostname_missing=hostname_missing, path_invalid=path_invalid) @tornado.web.authenticated @@ -91,7 +91,7 @@ class MirrorEditHandler(MirrorActionHandler): if not mirror: raise tornado.web.HTTPError(404, "Could not find mirror: %s" % hostname) - self.render("mirrors-edit.html", mirror=mirror) + self.render("mirrors/edit.html", mirror=mirror) @tornado.web.authenticated def post(self, hostname): @@ -123,4 +123,4 @@ class MirrorDeleteHandler(MirrorActionHandler): self.redirect("/mirrors") return - self.render("mirrors-delete.html", mirror=mirror) + self.render("mirrors/delete.html", mirror=mirror)