From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- templates/package/shared/cleanup_rules/edit.tmpl | 73 ++++++++++++++++++++++ templates/package/shared/cleanup_rules/list.tmpl | 56 +++++++++++++++++ .../package/shared/cleanup_rules/preview.tmpl | 34 ++++++++++ 3 files changed, 163 insertions(+) create mode 100644 templates/package/shared/cleanup_rules/edit.tmpl create mode 100644 templates/package/shared/cleanup_rules/list.tmpl create mode 100644 templates/package/shared/cleanup_rules/preview.tmpl (limited to 'templates/package/shared/cleanup_rules') diff --git a/templates/package/shared/cleanup_rules/edit.tmpl b/templates/package/shared/cleanup_rules/edit.tmpl new file mode 100644 index 0000000..138a907 --- /dev/null +++ b/templates/package/shared/cleanup_rules/edit.tmpl @@ -0,0 +1,73 @@ +

{{if .IsEditRule}}{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.edit"}}{{else}}{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.add"}}{{end}}

+
+
+ {{.CsrfTokenHtml}} + +
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+

{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.title"}}

+
+ + +
+
+ + +

{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.pattern.container"}}

+
+
+

{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.remove.title"}}

+
+ + +
+
+ + +
+
+ {{if .IsEditRule}} + + + {{ctx.Locale.Tr "packages.owner.settings.cleanuprules.preview"}} + {{else}} + + {{end}} +
+
+
diff --git a/templates/package/shared/cleanup_rules/list.tmpl b/templates/package/shared/cleanup_rules/list.tmpl new file mode 100644 index 0000000..ba1683b --- /dev/null +++ b/templates/package/shared/cleanup_rules/list.tmpl @@ -0,0 +1,56 @@ +

+ {{ctx.Locale.Tr "packages.owner.settings.cleanuprules.title"}} + +

+
+
+ {{range .CleanupRules}} +
+
+ {{svg .Type.SVGName 32}} +
+
+ +
+

{{if .Enabled}}{{ctx.Locale.Tr "enabled"}}{{else}}{{ctx.Locale.Tr "disabled"}}{{end}}

+
+ {{if .KeepCount}} +
+

{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count"}}:

{{if eq .KeepCount 1}}{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count.1"}}{{else}}{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" .KeepCount}}{{end}} +
+ {{end}} + {{if .KeepPattern}} +
+

{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.pattern"}}:

{{StringUtils.EllipsisString .KeepPattern 100}} +
+ {{end}} + {{if .RemoveDays}} +
+

{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.remove.days"}}:

{{ctx.Locale.Tr "tool.days" .RemoveDays}} +
+ {{end}} + {{if .RemovePattern}} +
+

{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.remove.pattern"}}:

{{StringUtils.EllipsisString .RemovePattern 100}} +
+ {{end}} +
+ +
+ {{else}} +
{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.none"}}
+ {{end}} +
+
diff --git a/templates/package/shared/cleanup_rules/preview.tmpl b/templates/package/shared/cleanup_rules/preview.tmpl new file mode 100644 index 0000000..0d9c4b0 --- /dev/null +++ b/templates/package/shared/cleanup_rules/preview.tmpl @@ -0,0 +1,34 @@ +

{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.preview"}}

+
+

{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.preview.overview" (len .VersionsToRemove)}}

+
+
+ + + + + + + + + + + + + {{range .VersionsToRemove}} + + + + + + + + + {{else}} + + + + {{end}} + +
{{ctx.Locale.Tr "admin.packages.type"}}{{ctx.Locale.Tr "admin.packages.name"}}{{ctx.Locale.Tr "admin.packages.version"}}{{ctx.Locale.Tr "admin.packages.creator"}}{{ctx.Locale.Tr "admin.packages.size"}}{{ctx.Locale.Tr "admin.packages.published"}}
{{.Package.Type.Name}}{{.Package.Name}}{{.Version.Version}}{{.Creator.Name}}{{ctx.Locale.TrSize .CalculateBlobSize}}{{DateTime "short" .Version.CreatedUnix}}
{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.preview.none"}}
+
-- cgit v1.2.3