2022-11-20 14:08:38 +00:00
|
|
|
<h4 class="ui top attached header">
|
|
|
|
{{.locale.Tr "packages.owner.settings.cleanuprules.title"}}
|
|
|
|
<div class="ui right">
|
|
|
|
<a class="ui primary tiny button" href="{{.Link}}/rules/add">{{.locale.Tr "packages.owner.settings.cleanuprules.add"}}</a>
|
|
|
|
</div>
|
|
|
|
</h4>
|
|
|
|
<div class="ui attached segment">
|
2023-07-31 22:13:42 +00:00
|
|
|
<div class="flex-list">
|
2022-11-20 14:08:38 +00:00
|
|
|
{{range .CleanupRules}}
|
2023-07-31 22:13:42 +00: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">
|
|
|
|
<i>{{if .Enabled}}{{$.locale.Tr "enabled"}}{{else}}{{$.locale.Tr "disabled"}}{{end}}</i>
|
|
|
|
</div>
|
|
|
|
{{if .KeepCount}}
|
|
|
|
<div class="flex-item-body">
|
|
|
|
<i>{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count"}}:</i> {{if eq .KeepCount 1}}{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count.1"}}{{else}}{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" .KeepCount}}{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{if .KeepPattern}}
|
|
|
|
<div class="flex-item-body">
|
|
|
|
<i>{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.pattern"}}:</i> {{StringUtils.EllipsisString .KeepPattern 100}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{if .RemoveDays}}
|
|
|
|
<div class="flex-item-body">
|
|
|
|
<i>{{$.locale.Tr "packages.owner.settings.cleanuprules.remove.days"}}:</i> {{$.locale.Tr "tool.days" .RemoveDays}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{if .RemovePattern}}
|
|
|
|
<div class="flex-item-body">
|
|
|
|
<i>{{$.locale.Tr "packages.owner.settings.cleanuprules.remove.pattern"}}:</i> {{StringUtils.EllipsisString .RemovePattern 100}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
<div class="flex-item-trailing">
|
2023-06-20 23:22:48 +00:00
|
|
|
<div class="ui dropdown tiny basic button">
|
2022-11-20 14:08:38 +00:00
|
|
|
{{svg "octicon-kebab-horizontal"}}
|
|
|
|
<div class="menu">
|
|
|
|
<a class="item" href="{{$.Link}}/rules/{{.ID}}">{{$.locale.Tr "edit"}}</a>
|
|
|
|
<a class="item" href="{{$.Link}}/rules/{{.ID}}/preview">{{$.locale.Tr "packages.owner.settings.cleanuprules.preview"}}</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<div class="item">{{.locale.Tr "packages.owner.settings.cleanuprules.none"}}</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|