|
254 | 254 | <div class="ui divider"></div>
|
255 | 255 |
|
256 | 256 | <div class="ui depending">
|
257 |
| - <span class="text"><strong>{{.i18n.Tr "repo.issues.dependency.title"}}</strong></span> |
258 |
| - <br> |
259 |
| - {{if .BlockedByDependencies}} |
| 257 | + {{if (and (not .BlockedByDependencies) (not .BlockingDependencies))}} |
| 258 | + <span class="text"><strong>{{.i18n.Tr "repo.issues.dependency.title"}}</strong></span> |
| 259 | + <br> |
| 260 | + <p>{{if .Issue.IsPull}} |
| 261 | + {{.i18n.Tr "repo.issues.dependency.pr_no_dependencies"}} |
| 262 | + {{else}} |
| 263 | + {{.i18n.Tr "repo.issues.dependency.issue_no_dependencies"}} |
| 264 | + {{end}}</p> |
| 265 | + {{end}} |
| 266 | + |
| 267 | + {{if .BlockingDependencies}} |
260 | 268 | <span class="text" data-tooltip="{{if .Issue.IsPull}}
|
261 |
| - {{.i18n.Tr "repo.issues.dependency.issue_closing_blockedby"}} |
262 |
| - {{else}} |
263 |
| - {{.i18n.Tr "repo.issues.dependency.pr_closing_blockedby"}} |
264 |
| - {{end}}" data-inverted=""> |
265 |
| - {{.i18n.Tr "repo.issues.dependency.blocked_by_short"}}: |
| 269 | + {{.i18n.Tr "repo.issues.dependency.pr_close_blocks"}} |
| 270 | + {{else}} |
| 271 | + {{.i18n.Tr "repo.issues.dependency.issue_close_blocks"}} |
| 272 | + {{end}}" data-inverted=""> |
| 273 | + <strong>{{.i18n.Tr "repo.issues.dependency.blocks_short"}}</strong> |
266 | 274 | </span>
|
267 | 275 | <div class="ui relaxed divided list">
|
268 |
| - {{range .BlockedByDependencies}} |
269 |
| - <div class="item"> |
270 |
| - <div class="right floated content"> |
| 276 | + {{range .BlockingDependencies}} |
| 277 | + <div class="item{{if .IsClosed}} is-closed{{end}}"> |
| 278 | + <div class="ui black label">#{{.Index}}</div> |
| 279 | + <a class="title has-emoji" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title}}</a> |
| 280 | + <div class="ui transparent label right floated"> |
271 | 281 | {{if $.CanCreateIssueDependencies}}
|
272 |
| - <a class="delete-dependency-button" onclick="deleteDependencyModal({{.ID}}, 'blockedBy');"> |
| 282 | + <a class="delete-dependency-button" onclick="deleteDependencyModal({{.ID}}, 'blocking');" |
| 283 | + data-tooltip="{{$.i18n.Tr "repo.issues.dependency.remove_info"}}" data-inverted=""> |
273 | 284 | <i class="delete icon text red"></i>
|
274 | 285 | </a>
|
275 | 286 | {{end}}
|
276 |
| - {{if .IsClosed}} |
277 |
| - <div class="ui red mini label"> |
278 |
| - <i class="octicon octicon-issue-closed"></i> |
279 |
| - </div> |
280 |
| - {{else}} |
281 |
| - <div class="ui green mini label"> |
282 |
| - <i class="octicon octicon-issue-opened"></i> |
283 |
| - </div> |
284 |
| - {{end}} |
285 | 287 | </div>
|
286 |
| - <div class="ui black label">#{{.Index}}</div> |
287 |
| - <a class="title has-emoji" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title}}</a> |
288 | 288 | </div>
|
289 | 289 | {{end}}
|
290 | 290 | </div>
|
291 | 291 | {{end}}
|
292 | 292 |
|
293 |
| - {{if .BlockingDependencies}} |
| 293 | + {{if .BlockedByDependencies}} |
294 | 294 | <span class="text" data-tooltip="{{if .Issue.IsPull}}
|
295 |
| - {{.i18n.Tr "repo.issues.dependency.pr_close_blocks"}} |
296 |
| - {{else}} |
297 |
| - {{.i18n.Tr "repo.issues.dependency.issue_close_blocks"}} |
298 |
| - {{end}}" data-inverted=""> |
299 |
| - {{.i18n.Tr "repo.issues.dependency.blocks_short"}}: |
| 295 | + {{.i18n.Tr "repo.issues.dependency.issue_closing_blockedby"}} |
| 296 | + {{else}} |
| 297 | + {{.i18n.Tr "repo.issues.dependency.pr_closing_blockedby"}} |
| 298 | + {{end}}" data-inverted=""> |
| 299 | + <strong>{{.i18n.Tr "repo.issues.dependency.blocked_by_short"}}</strong> |
300 | 300 | </span>
|
301 | 301 | <div class="ui relaxed divided list">
|
302 |
| - {{range .BlockingDependencies}} |
303 |
| - <div class="item"> |
304 |
| - <div class="right floated content"> |
| 302 | + {{range .BlockedByDependencies}} |
| 303 | + <div class="item{{if .IsClosed}} is-closed{{end}}"> |
| 304 | + <div class="ui black label">#{{.Index}}</div> |
| 305 | + <a class="title has-emoji" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title}}</a> |
| 306 | + <div class="ui transparent label right floated"> |
305 | 307 | {{if $.CanCreateIssueDependencies}}
|
306 |
| - <a class="delete-dependency-button" onclick="deleteDependencyModal({{.ID}}, 'blocking');"> |
| 308 | + <a class="delete-dependency-button" onclick="deleteDependencyModal({{.ID}}, 'blockedBy');" |
| 309 | + data-tooltip="{{$.i18n.Tr "repo.issues.dependency.remove_info"}}" data-inverted=""> |
307 | 310 | <i class="delete icon text red"></i>
|
308 | 311 | </a>
|
309 | 312 | {{end}}
|
310 |
| - {{if .IsClosed}} |
311 |
| - <div class="ui red tiny label"> |
312 |
| - <i class="octicon octicon-issue-closed"></i> |
313 |
| - </div> |
314 |
| - {{else}} |
315 |
| - <div class="ui green mini label"> |
316 |
| - <i class="octicon octicon-issue-opened"></i> |
317 |
| - </div> |
318 |
| - {{end}} |
319 | 313 | </div>
|
320 |
| - <div class="ui black label">#{{.Index}}</div> |
321 |
| - <a class="title has-emoji" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title}}</a> |
322 | 314 | </div>
|
323 | 315 | {{end}}
|
324 | 316 | </div>
|
325 | 317 | {{end}}
|
326 | 318 |
|
327 |
| - {{if (and (not .BlockedByDependencies) (not .BlockingDependencies))}} |
328 |
| - <p>{{if .Issue.IsPull}} |
329 |
| - {{.i18n.Tr "repo.issues.dependency.pr_no_dependencies"}} |
330 |
| - {{else}} |
331 |
| - {{.i18n.Tr "repo.issues.dependency.issue_no_dependencies"}} |
332 |
| - {{end}}</p> |
333 |
| - {{end}} |
334 |
| - |
335 | 319 | {{if .CanCreateIssueDependencies}}
|
336 | 320 | <div>
|
337 | 321 | <form method="POST" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/dependency/add" id="addDependencyForm">
|
|
0 commit comments