|
11 | 11 | </div>
|
12 | 12 | {{if not .Repository.IsArchived}}
|
13 | 13 | <div class="column right aligned">
|
| 14 | + {{if or .CanWriteIssues .CanWritePulls}} |
14 | 15 | <a class="ui grey button" href="{{.RepoLink}}/milestones/{{.MilestoneID}}/edit">{{.i18n.Tr "repo.milestones.edit"}}</a>
|
| 16 | + {{end}} |
15 | 17 | <a class="ui green button" href="{{.RepoLink}}/issues/new?milestone={{.MilestoneID}}">{{.i18n.Tr "repo.issues.new"}}</a>
|
16 | 18 | </div>
|
17 | 19 | {{end}}
|
|
58 | 60 | <div class="menu">
|
59 | 61 | <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_label_no_select"}}</a>
|
60 | 62 | {{range .Labels}}
|
61 |
| - <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.ID}}&assignee={{$.AssigneeID}}"><span class="octicon {{if eq $.SelectLabels .ID}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a> |
| 63 | + <a class="item has-emoji" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.ID}}&assignee={{$.AssigneeID}}"><span class="octicon {{if eq $.SelectLabels .ID}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a> |
62 | 64 | {{end}}
|
63 | 65 | </div>
|
64 | 66 | </div>
|
|
111 | 113 | </div>
|
112 | 114 | </div>
|
113 | 115 | </div>
|
114 |
| - <div id="issue-actions" class="ui stackable grid"> |
| 116 | + <div id="issue-actions" class="ui stackable grid hide"> |
115 | 117 | <div class="six wide column">
|
116 |
| - <div class="ui basic status buttons"> |
117 |
| - <div class="ui green active basic button issue-action" data-action="open" data-url="{{$.RepoLink}}/issues/status">{{.i18n.Tr "repo.issues.action_open"}}</div> |
118 |
| - <div class="ui red active basic button issue-action" data-action="close" data-url="{{$.RepoLink}}/issues/status">{{.i18n.Tr "repo.issues.action_close"}}</div> |
| 118 | + <div class="ui tiny basic status buttons"> |
| 119 | + <a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&assignee={{.AssigneeID}}"> |
| 120 | + <i class="octicon octicon-issue-opened"></i> |
| 121 | + {{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}} |
| 122 | + </a> |
| 123 | + <a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{.ViewType}}&sort={{$.SortType}}&state=closed&labels={{.SelectLabels}}&assignee={{.AssigneeID}}"> |
| 124 | + <i class="octicon octicon-issue-closed"></i> |
| 125 | + {{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}} |
| 126 | + </a> |
119 | 127 | </div>
|
120 | 128 | </div>
|
121 | 129 |
|
|
125 | 133 | this one correctly, but not the other one. */}}
|
126 | 134 | <div class="nine wide right aligned right floated column">
|
127 | 135 | <div class="ui secondary filter stackable menu">
|
| 136 | + <!-- Action Button --> |
| 137 | + {{if .IsShowClosed}} |
| 138 | + <div class="ui green active basic button issue-action" data-action="open" data-url="{{$.RepoLink}}/issues/status" style="margin-left: auto">{{.i18n.Tr "repo.issues.action_open"}}</div> |
| 139 | + {{else}} |
| 140 | + <div class="ui red active basic button issue-action" data-action="close" data-url="{{$.RepoLink}}/issues/status" style="margin-left: auto">{{.i18n.Tr "repo.issues.action_close"}}</div> |
| 141 | + {{end}} |
128 | 142 | <!-- Labels -->
|
129 |
| - <div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item" style="margin-left: auto"> |
| 143 | + <div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item"> |
130 | 144 | <span class="text">
|
131 | 145 | {{.i18n.Tr "repo.issues.action_label"}}
|
132 | 146 | <i class="dropdown icon"></i>
|
133 | 147 | </span>
|
134 | 148 | <div class="menu">
|
135 | 149 | {{range .Labels}}
|
136 |
| - <div class="item issue-action" data-action="toggle" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/labels"> |
| 150 | + <div class="item issue-action has-emoji" data-action="toggle" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/labels"> |
137 | 151 | <span class="octicon {{if eq $.SelectLabels .ID}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}
|
138 | 152 | </div>
|
139 | 153 | {{end}}
|
|
165 | 179 | {{range .Issues}}
|
166 | 180 | {{ $timeStr:= TimeSinceUnix .CreatedUnix $.Lang }}
|
167 | 181 | <li class="item">
|
| 182 | + {{if or (and $.CanWriteIssues (not .IsPull)) (and $.CanWritePulls .IsPull)}} |
168 | 183 | <div class="ui checkbox issue-checkbox">
|
169 | 184 | <input type="checkbox" data-issue-id={{.ID}}></input>
|
170 | 185 | </div>
|
| 186 | + {{end}} |
171 | 187 | <div class="ui {{if .IsRead}}black{{else}}green{{end}} label">#{{.Index}}</div>
|
172 | 188 | <a class="title has-emoji" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title}}</a>
|
173 | 189 |
|
174 | 190 | {{if .Ref}}
|
175 | 191 | <a class="ui label" href="{{$.RepoLink}}/src/branch/{{.Ref}}">{{.Ref}}</a>
|
176 | 192 | {{end}}
|
177 | 193 | {{range .Labels}}
|
178 |
| - <a class="ui label" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&assignee={{$.AssigneeID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description}}">{{.Name}}</a> |
| 194 | + <a class="ui label has-emoji" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&assignee={{$.AssigneeID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description}}">{{.Name}}</a> |
179 | 195 | {{end}}
|
180 | 196 |
|
181 | 197 | {{if .NumComments}}
|
|
0 commit comments