|
33 | 33 | <li class="item"> |
34 | 34 | <div class="label-title"> |
35 | 35 | {{RenderLabel $.Context .}} |
36 | | - {{if not .ArchivedUnix.IsZero}} |
37 | | - <span class="gt-ml-3 gt-cursor-default gt-italic" data-tooltip-content="{{$.locale.Tr "repo.issues.label_archive_tooltip"}}"> |
38 | | - {{$.locale.Tr "home.archived"}} |
39 | | - </span> |
40 | | - {{end}} |
41 | 36 | {{if .Description}}<br><small class="desc">{{.Description | RenderEmoji $.Context}}</small>{{end}} |
42 | 37 | </div> |
43 | 38 | <div class="label-issues"> |
|
47 | 42 | <a class="open-issues" href="{{$.RepoLink}}/issues?labels={{.ID}}">{{svg "octicon-issue-opened"}} {{$.locale.Tr "repo.issues.label_open_issues" .NumOpenIssues}}</a> |
48 | 43 | {{end}} |
49 | 44 | </div> |
50 | | - <div class="label-operation"> |
51 | | - {{if and (not $.PageIsOrgSettingsLabels) (not $.Repository.IsArchived) (or $.CanWriteIssues $.CanWritePulls)}} |
52 | | - <a class="edit-label-button" href="#" data-id="{{.ID}}" data-title="{{.Name}}" {{if .Exclusive}}data-exclusive{{end}} {{if gt .ArchivedUnix 0}}data-is-archived{{end}} data-num-issues="{{.NumIssues}}" data-description="{{.Description}}" data-color={{.Color}}>{{svg "octicon-pencil"}} {{$.locale.Tr "repo.issues.label_edit"}}</a> |
53 | | - <a class="delete-button" href="#" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.locale.Tr "repo.issues.label_delete"}}</a> |
54 | | - {{else if $.PageIsOrgSettingsLabels}} |
55 | | - <a class="edit-label-button" href="#" data-id="{{.ID}}" data-title="{{.Name}}" {{if .Exclusive}}data-exclusive{{end}} {{if gt .ArchivedUnix 0}}data-is-archived{{end}} data-num-issues="{{.NumIssues}}" data-description="{{.Description}}" data-color={{.Color}}>{{svg "octicon-pencil"}} {{$.locale.Tr "repo.issues.label_edit"}}</a> |
56 | | - <a class="delete-button" href="#" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.locale.Tr "repo.issues.label_delete"}}</a> |
57 | | - {{end}} |
| 45 | + <div class="label-operation gt-df"> |
| 46 | + {{template "repo/issue/labels/label_archived" .}} |
| 47 | + <div class="gt-df gt-ml-auto"> |
| 48 | + {{if and (not $.PageIsOrgSettingsLabels) (not $.Repository.IsArchived) (or $.CanWriteIssues $.CanWritePulls)}} |
| 49 | + <a class="edit-label-button" href="#" data-id="{{.ID}}" data-title="{{.Name}}" {{if .Exclusive}}data-exclusive{{end}} {{if gt .ArchivedUnix 0}}data-is-archived{{end}} data-num-issues="{{.NumIssues}}" data-description="{{.Description}}" data-color={{.Color}}>{{svg "octicon-pencil"}} {{$.locale.Tr "repo.issues.label_edit"}}</a> |
| 50 | + <a class="delete-button" href="#" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.locale.Tr "repo.issues.label_delete"}}</a> |
| 51 | + {{else if $.PageIsOrgSettingsLabels}} |
| 52 | + <a class="edit-label-button" href="#" data-id="{{.ID}}" data-title="{{.Name}}" {{if .Exclusive}}data-exclusive{{end}} {{if gt .ArchivedUnix 0}}data-is-archived{{end}} data-num-issues="{{.NumIssues}}" data-description="{{.Description}}" data-color={{.Color}}>{{svg "octicon-pencil"}} {{$.locale.Tr "repo.issues.label_edit"}}</a> |
| 53 | + <a class="delete-button" href="#" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.locale.Tr "repo.issues.label_delete"}}</a> |
| 54 | + {{end}} |
| 55 | + </div> |
58 | 56 | </div> |
59 | 57 | </li> |
60 | 58 | {{end}} |
|
78 | 76 | {{if .Description}}<br><small class="desc">{{.Description | RenderEmoji $.Context}}</small>{{end}} |
79 | 77 | </div> |
80 | 78 | <div class="label-issues"> |
81 | | - <a class="open-issues" href="{{$.RepoLink}}/issues?labels={{.ID}}">{{svg "octicon-issue-opened"}} {{$.locale.Tr "repo.issues.label_open_issues" .NumOpenRepoIssues}}</a> |
| 79 | + <a class="open-issues" {{if .IsArchived}}data-is-archived{{end}} href="{{$.RepoLink}}/issues?labels={{.ID}}">{{svg "octicon-issue-opened"}} {{$.locale.Tr "repo.issues.label_open_issues" .NumOpenRepoIssues}}</a> |
| 80 | + </div> |
| 81 | + <div class="label-operation"> |
| 82 | + {{template "repo/issue/labels/label_archived" .}} |
82 | 83 | </div> |
83 | | - <div class="label-operation"></div> |
84 | 84 | </li> |
85 | 85 | {{end}} |
86 | 86 | {{end}} |
|
0 commit comments