mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-19 16:23:40 +08:00
refactor: extract to subtemplate
This commit is contained in:
parent
aa061b409f
commit
925ac870dc
|
@ -1685,7 +1685,9 @@ issues.dependency.issue_close_blocked = You need to close all issues blocking th
|
|||
issues.dependency.issue_batch_close_blocked = "Cannot batch close issues that you choose, because issue #%d still has open dependencies"
|
||||
issues.dependency.pr_close_blocked = You need to close all issues blocking this pull request before you can merge it.
|
||||
issues.dependency.blocks_short = Blocks
|
||||
issues.dependency.blocks_following = Blocks:
|
||||
issues.dependency.blocked_by_short = Depends on
|
||||
issues.dependency.blocked_by_following = Depends on:
|
||||
issues.dependency.remove_header = Remove Dependency
|
||||
issues.dependency.issue_remove_text = This will remove the dependency from this issue. Continue?
|
||||
issues.dependency.pr_remove_text = This will remove the dependency from this pull request. Continue?
|
||||
|
|
13
templates/shared/issue_dependency.tmpl
Normal file
13
templates/shared/issue_dependency.tmpl
Normal file
|
@ -0,0 +1,13 @@
|
|||
{{if and .DependenciesMap (index .DependenciesMap .ID)}}
|
||||
<div class="flex-text-inline gt-gap-0">
|
||||
<strong class="gt-mr-2">{{.Title}}</strong>
|
||||
{{$first := true}}
|
||||
{{range (index .DependenciesMap .ID)}}
|
||||
{{if not $first}}<span class="gt-mr-2">,</span>{{end}}
|
||||
{{$first = false}}
|
||||
<a href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}">
|
||||
#{{.Issue.Index}}
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
|
@ -118,32 +118,14 @@
|
|||
</span>
|
||||
</span>
|
||||
{{end}}
|
||||
{{if and $.BlockingDependenciesMap (index $.BlockingDependenciesMap .ID)}}
|
||||
<div class="flex-text-inline gt-gap-0">
|
||||
<strong class="gt-mr-2">{{ctx.Locale.Tr "repo.issues.dependency.blocks_short"}}:</strong>
|
||||
{{ $first := true }}
|
||||
{{range (index $.BlockingDependenciesMap .ID)}}
|
||||
{{if not $first}}<span class="gt-mr-2">, </span>{{end}}
|
||||
{{ $first = false }}
|
||||
<a href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}">
|
||||
#{{.Issue.Index}}
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and $.BlockedByDependenciesMap (index $.BlockedByDependenciesMap .ID)}}
|
||||
<div class="flex-text-inline gt-gap-0">
|
||||
<strong class="gt-mr-2">{{ctx.Locale.Tr "repo.issues.dependency.blocked_by_short"}}:</strong>
|
||||
{{ $first := true }}
|
||||
{{range (index $.BlockedByDependenciesMap .ID)}}
|
||||
{{if not $first}}<span class="gt-mr-2">, </span>{{end}}
|
||||
{{ $first = false }}
|
||||
<a href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}">
|
||||
#{{.Issue.Index}}
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{template "shared/issue_dependency" (dict
|
||||
"ID" .ID
|
||||
"DependenciesMap" $.BlockingDependenciesMap
|
||||
"Title" (ctx.Locale.Tr "repo.issues.dependency.blocks_following"))}}
|
||||
{{template "shared/issue_dependency" (dict
|
||||
"ID" .ID
|
||||
"DependenciesMap" $.BlockedByDependenciesMap
|
||||
"Title" (ctx.Locale.Tr "repo.issues.dependency.blocked_by_following"))}}
|
||||
{{if .IsPull}}
|
||||
{{$approveOfficial := call $approvalCounts .ID "approve"}}
|
||||
{{$rejectOfficial := call $approvalCounts .ID "reject"}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user