blob: ba1683b932587eef237847fdf6e344cebe3ea019 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
<h4 class="ui top attached header">
{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.title"}}
<div class="ui right">
<a class="ui primary tiny button" href="{{.Link}}/rules/add">{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.add"}}</a>
</div>
</h4>
<div class="ui attached segment">
<div class="flex-list">
{{range .CleanupRules}}
<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">
<p>{{if .Enabled}}{{ctx.Locale.Tr "enabled"}}{{else}}{{ctx.Locale.Tr "disabled"}}{{end}}</p>
</div>
{{if .KeepCount}}
<div class="flex-item-body">
<p>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count"}}:</p> {{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}}
</div>
{{end}}
{{if .KeepPattern}}
<div class="flex-item-body">
<p>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.pattern"}}:</p> {{StringUtils.EllipsisString .KeepPattern 100}}
</div>
{{end}}
{{if .RemoveDays}}
<div class="flex-item-body">
<p>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.remove.days"}}:</p> {{ctx.Locale.Tr "tool.days" .RemoveDays}}
</div>
{{end}}
{{if .RemovePattern}}
<div class="flex-item-body">
<p>{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.remove.pattern"}}:</p> {{StringUtils.EllipsisString .RemovePattern 100}}
</div>
{{end}}
</div>
<div class="flex-item-trailing">
<div class="ui dropdown tiny basic button">
{{svg "octicon-kebab-horizontal"}}
<div class="menu">
<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>
</div>
</div>
</div>
</div>
{{else}}
<div class="item">{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.none"}}</div>
{{end}}
</div>
</div>
|