2022-11-20 15:08:38 +01:00
|
|
|
<h4 class="ui top attached header">
|
2023-09-25 15:15:51 +02:00
|
|
|
{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.title"}}
|
2022-11-20 15:08:38 +01:00
|
|
|
<div class="ui right">
|
2023-09-25 15:15:51 +02:00
|
|
|
<a class="ui primary tiny button" href="{{.Link}}/rules/add">{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.add"}}</a>
|
2022-11-20 15:08:38 +01:00
|
|
|
</div>
|
|
|
|
</h4>
|
|
|
|
<div class="ui attached segment">
|
2023-08-01 00:13:42 +02:00
|
|
|
<div class="flex-list">
|
2022-11-20 15:08:38 +01:00
|
|
|
{{range .CleanupRules}}
|
2023-08-01 00:13:42 +02:00
|
|
|
<div class="flex-item">
|
|
|
|
<div class="flex-item-leading">
|
|
|
|
{{svg .Type.SVGName 32}}
|
|
|
|
</div>
|
|
|
|
<div class="flex-item-main">
|
|
|
|
<div class="flex-item-title">
|
|
|
|
<a class="item" href="{{$.Link}}/rules/{{.ID}}">{{.Type.Name}}</a>
|
|
|
|
</div>
|
|
|
|
<div class="flex-item-body">
|
2023-09-25 15:15:51 +02:00
|
|
|
<i>{{if .Enabled}}{{ctx.Locale.Tr "enabled"}}{{else}}{{ctx.Locale.Tr "disabled"}}{{end}}</i>
|
2023-08-01 00:13:42 +02:00
|
|
|
</div>
|
|
|
|
{{if .KeepCount}}
|
|
|
|
<div class="flex-item-body">
|
2023-09-25 15:15:51 +02:00
|
|
|
<i>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count"}}:</i> {{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}}
|
2023-08-01 00:13:42 +02:00
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{if .KeepPattern}}
|
|
|
|
<div class="flex-item-body">
|
2023-09-25 15:15:51 +02:00
|
|
|
<i>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.pattern"}}:</i> {{StringUtils.EllipsisString .KeepPattern 100}}
|
2023-08-01 00:13:42 +02:00
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{if .RemoveDays}}
|
|
|
|
<div class="flex-item-body">
|
2023-09-25 15:15:51 +02:00
|
|
|
<i>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.remove.days"}}:</i> {{ctx.Locale.Tr "tool.days" .RemoveDays}}
|
2023-08-01 00:13:42 +02:00
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{if .RemovePattern}}
|
|
|
|
<div class="flex-item-body">
|
2023-09-25 15:15:51 +02:00
|
|
|
<i>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.remove.pattern"}}:</i> {{StringUtils.EllipsisString .RemovePattern 100}}
|
2023-08-01 00:13:42 +02:00
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
<div class="flex-item-trailing">
|
2023-06-21 01:22:48 +02:00
|
|
|
<div class="ui dropdown tiny basic button">
|
2022-11-20 15:08:38 +01:00
|
|
|
{{svg "octicon-kebab-horizontal"}}
|
|
|
|
<div class="menu">
|
2023-09-25 15:15:51 +02:00
|
|
|
<a class="item" href="{{$.Link}}/rules/{{.ID}}">{{ctx.Locale.Tr "edit"}}</a>
|
|
|
|
<a class="item" href="{{$.Link}}/rules/{{.ID}}/preview">{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.preview"}}</a>
|
2022-11-20 15:08:38 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
2023-09-25 15:15:51 +02:00
|
|
|
<div class="item">{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.none"}}</div>
|
2022-11-20 15:08:38 +01:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|