1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-03 09:07:19 +00:00

Make sure fmt catches all templates (#20979)

* Make sure fmt catches all templates

Make's `wildcard` is not recursive so it missed many template files, fix
that by using `find`.

* Update Makefile
This commit is contained in:
silverwind
2022-08-31 17:58:54 +02:00
committed by GitHub
parent c80ca94ab1
commit 647b2649b1
62 changed files with 251 additions and 251 deletions

View File

@ -1,10 +1,10 @@
{{if .ctx.IsSigned}}
<div class="item action ui pointing select-reaction dropdown top right" data-action-url="{{ .ActionURL }}">
<div class="item action ui pointing select-reaction dropdown top right" data-action-url="{{.ActionURL}}">
<a class="add-reaction">
{{svg "octicon-smiley"}}
</a>
<div class="menu">
<div class="header">{{ .ctx.locale.Tr "repo.pick_reaction"}}</div>
<div class="header">{{.ctx.locale.Tr "repo.pick_reaction"}}</div>
<div class="divider"></div>
{{range $value := AllowedReactions}}
<div class="item reaction tooltip" data-content="{{$value}}">{{ReactionToEmoji $value}}</div>

View File

@ -1,7 +1,7 @@
{{ template "base/alert" }}
{{template "base/alert"}}
{{range .Issue.Comments}}
{{if call $.ShouldShowCommentType .Type}}
{{ $createdStr:= TimeSinceUnix .CreatedUnix $.locale }}
{{$createdStr:= TimeSinceUnix .CreatedUnix $.locale}}
<!-- 0 = COMMENT, 1 = REOPEN, 2 = CLOSE, 3 = ISSUE_REF, 4 = COMMIT_REF,
5 = COMMENT_REF, 6 = PULL_REF, 7 = COMMENT_LABEL, 12 = START_TRACKING,
@ -14,7 +14,7 @@
35 = CANCEL_SCHEDULED_AUTO_MERGE_PR -->
{{if eq .Type 0}}
<div class="timeline-item comment" id="{{.HashTag}}">
{{if .OriginalAuthor }}
{{if .OriginalAuthor}}
<span class="timeline-avatar"><img src="{{AppSubUrl}}/assets/img/avatar_default.png"></span>
{{else}}
<a class="timeline-avatar" {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>
@ -24,16 +24,16 @@
<div class="content comment-container">
<div class="ui top attached header comment-header df ac sb">
<div class="comment-header-left df ac">
{{if .OriginalAuthor }}
{{if .OriginalAuthor}}
<span class="text black mr-2">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{ .OriginalAuthor }}
{{.OriginalAuthor}}
</span>
<span class="text grey">
{{$.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}} {{if $.Repository.OriginalURL}}
</span>
<span class="text migrate">
({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe }}){{end}}
({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}
</span>
{{else}}
{{if gt .Poster.ID 0}}
@ -101,7 +101,7 @@
</a>
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{if .Issue.IsPull }}
{{if .Issue.IsPull}}
{{$.locale.Tr "repo.pulls.reopened_at" .EventTag $createdStr | Safe}}
{{else}}
{{$.locale.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}}
@ -116,7 +116,7 @@
</a>
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{if .Issue.IsPull }}
{{if .Issue.IsPull}}
{{$.locale.Tr "repo.pulls.closed_at" .EventTag $createdStr | Safe}}
{{else}}
{{$.locale.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}
@ -140,19 +140,19 @@
</span>
</div>
{{else if eq .Type 3 5 6}}
{{ $refFrom:= "" }}
{{$refFrom:= ""}}
{{if ne .RefRepoID .Issue.RepoID}}
{{ $refFrom = $.locale.Tr "repo.issues.ref_from" (.RefRepo.FullName|Escape) }}
{{$refFrom = $.locale.Tr "repo.issues.ref_from" (.RefRepo.FullName|Escape)}}
{{end}}
{{ $refTr := "repo.issues.ref_issue_from" }}
{{$refTr := "repo.issues.ref_issue_from"}}
{{if .Issue.IsPull}}
{{ $refTr = "repo.issues.ref_pull_from" }}
{{else if eq .RefAction 1 }}
{{ $refTr = "repo.issues.ref_closing_from" }}
{{else if eq .RefAction 2 }}
{{ $refTr = "repo.issues.ref_reopening_from" }}
{{$refTr = "repo.issues.ref_pull_from"}}
{{else if eq .RefAction 1}}
{{$refTr = "repo.issues.ref_closing_from"}}
{{else if eq .RefAction 2}}
{{$refTr = "repo.issues.ref_reopening_from"}}
{{end}}
{{ $createdStr:= TimeSinceUnix .CreatedUnix $.locale }}
{{$createdStr:= TimeSinceUnix .CreatedUnix $.locale}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-bookmark"}}</span>
<a href="{{.Poster.HomeLink}}">
@ -224,11 +224,11 @@
</a>
<span class="text grey">
<a class="author" href="{{.Assignee.HomeLink}}">{{.Assignee.GetDisplayName}}</a>
{{ if eq .Poster.ID .Assignee.ID }}
{{if eq .Poster.ID .Assignee.ID}}
{{$.locale.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}}
{{ else }}
{{else}}
{{$.locale.Tr "repo.issues.remove_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
{{ end }}
{{end}}
</span>
{{else}}
<a href="{{.Assignee.HomeLink}}">
@ -288,7 +288,7 @@
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{$.locale.Tr "repo.issues.stop_tracking_history" $createdStr | Safe}}
</span>
{{ template "repo/issue/view_content/comments_delete_time" Dict "ctx" $ "comment" . }}
{{template "repo/issue/view_content/comments_delete_time" Dict "ctx" $ "comment" .}}
<div class="detail">
{{svg "octicon-clock"}}
<span class="text grey">{{.Content}}</span>
@ -304,7 +304,7 @@
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{$.locale.Tr "repo.issues.add_time_history" $createdStr | Safe}}
</span>
{{ template "repo/issue/view_content/comments_delete_time" Dict "ctx" $ "comment" . }}
{{template "repo/issue/view_content/comments_delete_time" Dict "ctx" $ "comment" .}}
<div class="detail">
{{svg "octicon-clock"}}
<span class="text grey">{{.Content}}</span>
@ -408,7 +408,7 @@
{{else if eq .Type 22}}
<div class="timeline-item-group">
<div class="timeline-item event">
{{if .OriginalAuthor }}
{{if .OriginalAuthor}}
{{else}}
<a class="timeline-avatar"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
{{avatar .Poster}}
@ -416,13 +416,13 @@
{{end}}
<span class="badge{{if eq .Review.Type 1}} bg-green text-white{{else if eq .Review.Type 3}} bg-red text-white{{end}}">{{svg (printf "octicon-%s" .Review.Type.Icon)}}</span>
<span class="text grey">
{{if .OriginalAuthor }}
{{if .OriginalAuthor}}
<span class="text black">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{ .OriginalAuthor }}
{{.OriginalAuthor}}
</span>
<span class="text grey"> {{if $.Repository.OriginalURL}}</span>
<span class="text migrate">({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe }}){{end}}</span>
<span class="text migrate">({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}</span>
{{else}}
<a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a>
{{end}}
@ -447,13 +447,13 @@
<div class="ui top attached header comment-header df ac sb">
<div class="comment-header-left df ac">
<span class="text grey">
{{if .OriginalAuthor }}
{{if .OriginalAuthor}}
<span class="text black">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{ .OriginalAuthor }}
{{.OriginalAuthor}}
</span>
<span class="text grey"> {{if $.Repository.OriginalURL}}</span>
<span class="text migrate">({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe }}){{end}}</span>
<span class="text migrate">({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}</span>
{{else}}
<a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a>
{{end}}
@ -509,7 +509,7 @@
{{if .Review.CodeComments}}
<div class="timeline-item event">
{{ range $filename, $lines := .Review.CodeComments}}
{{range $filename, $lines := .Review.CodeComments}}
{{range $line, $comms := $lines}}
<div class="ui segments">
<div class="ui segment py-3 df ac sb">
@ -519,7 +519,7 @@
{{$isNotPending := (not (eq (index $comms 0).Review.Type 0))}}
<div class="df ac">
<a href="{{(index $comms 0).CodeCommentURL}}" class="file-comment ml-3 word-break">{{$filename}}</a>
{{if $invalid }}
{{if $invalid}}
<span class="ui label basic small ml-3">
{{$.locale.Tr "repo.issues.review.outdated"}}
</span>
@ -564,24 +564,24 @@
<div id="code-comments-{{(index $comms 0).ID}}" class="comment-code-cloud ui segment{{if $resolved}} hide{{end}}">
<div class="ui comments mb-0">
{{range $comms}}
{{ $createdSubStr:= TimeSinceUnix .CreatedUnix $.locale }}
{{$createdSubStr:= TimeSinceUnix .CreatedUnix $.locale}}
<div class="comment code-comment pb-4" id="{{.HashTag}}">
<div class="content">
<div class="header comment-header">
<div class="comment-header-left df ac">
{{if not .OriginalAuthor }}
{{if not .OriginalAuthor}}
<a class="avatar">
{{avatar .Poster}}
</a>
{{end}}
<span class="text grey">
{{if .OriginalAuthor }}
{{if .OriginalAuthor}}
<span class="text black">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{ .OriginalAuthor }}
{{.OriginalAuthor}}
</span>
<span class="text grey"> {{if $.Repository.OriginalURL}}</span>
<span class="text migrate">({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe }}){{end}}</span>
<span class="text migrate">({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}</span>
{{else}}
<a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a>
{{end}}
@ -671,17 +671,17 @@
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{ if .Content }}
{{if .Content}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{$.locale.Tr "repo.issues.lock_with_reason" .Content $createdStr | Safe}}
</span>
{{ else }}
{{else}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{$.locale.Tr "repo.issues.lock_no_reason" $createdStr | Safe}}
</span>
{{ end }}
{{end}}
</div>
{{else if eq .Type 24}}
<div class="timeline-item event" id="{{.HashTag}}">
@ -752,7 +752,7 @@
<span class="badge">{{svg "octicon-repo-push"}}</span>
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{ if .IsForcePush }}
{{if .IsForcePush}}
{{$.locale.Tr "repo.issues.force_push_codes" ($.Issue.PullRequest.HeadBranch|Escape) (ShortSha .OldCommit) (($.Issue.Repo.CommitLink .OldCommit)|Escape) (ShortSha .NewCommit) (($.Issue.Repo.CommitLink .NewCommit)|Escape) $createdStr | Safe}}
{{else}}
{{$.locale.TrN (len .Commits) "repo.issues.push_commit_1" "repo.issues.push_commits_n" (len .Commits) $createdStr | Safe}}

View File

@ -1,6 +1,6 @@
{{ if .comment.Time }} {{/* compatibility with time comments made before v1.14 */}}
{{ if (not .comment.Time.Deleted) }}
{{ if (or .ctx.IsAdmin (and .ctx.IsSigned (eq .ctx.SignedUserID .comment.PosterID))) }}
{{if .comment.Time}} {{/* compatibility with time comments made before v1.14 */}}
{{if (not .comment.Time.Deleted)}}
{{if (or .ctx.IsAdmin (and .ctx.IsSigned (eq .ctx.SignedUserID .comment.PosterID)))}}
<span class="ui float right">
<div class="ui mini modal issue-delete-time-modal" data-id="{{.comment.Time.ID}}">
<form method="POST" class="delete-time-form" action="{{.ctx.RepoLink}}/issues/{{.ctx.Issue.Index}}/times/{{.comment.TimeID}}/delete">

View File

@ -4,12 +4,12 @@
{{svg "octicon-kebab-horizontal"}}
</a>
<div class="menu">
{{ $referenceUrl := "" }}
{{ if .issue }}
{{ $referenceUrl = Printf "%s#%s" .ctx.Issue.HTMLURL .item.HashTag }}
{{ else }}
{{ $referenceUrl = Printf "%s/files#%s" .ctx.Issue.HTMLURL .item.HashTag }}
{{ end }}
{{$referenceUrl := ""}}
{{if .issue}}
{{$referenceUrl = Printf "%s#%s" .ctx.Issue.HTMLURL .item.HashTag}}
{{else}}
{{$referenceUrl = Printf "%s/files#%s" .ctx.Issue.HTMLURL .item.HashTag}}
{{end}}
<div class="item context" data-clipboard-text="{{$referenceUrl}}">{{.ctx.locale.Tr "repo.issues.context.copy_link"}}</div>
<div class="item context quote-reply {{if .diff}}quote-reply-diff{{end}}" data-target="{{.item.ID}}">{{.ctx.locale.Tr "repo.issues.context.quote_reply"}}</div>
{{if not .ctx.UnitIssuesGlobalDisabled}}

View File

@ -1,10 +1,10 @@
{{if or .PullReviewers .OriginalReviews }}
{{if or .PullReviewers .OriginalReviews}}
<div class="comment box">
<div class="content">
<div class="ui segment">
<h4>{{$.locale.Tr "repo.issues.review.reviewers"}}</h4>
{{range .PullReviewers}}
{{ $createdStr:= TimeSinceUnix .Review.UpdatedUnix $.locale }}
{{$createdStr:= TimeSinceUnix .Review.UpdatedUnix $.locale}}
<div class="ui divider"></div>
<div class="review-item">
<div class="review-item-left">
@ -71,7 +71,7 @@
{{- else if eq .Review.Type 4}}yellow
{{else}}grey{{end}}">
{{if .CanChange }}
{{if .CanChange}}
<a href="#" class="ui tooltip icon re-request-review {{if .Checked}}checked{{end}}" data-issue-id="{{$.Issue.ID}}" data-content="{{if .Checked}} {{$.locale.Tr "repo.issues.remove_request_review"}} {{else}} {{$.locale.Tr "repo.issues.re_request_review"}} {{end}}" data-id="{{.ItemID}}" data-update-url="{{$.RepoLink}}/issues/request_review">
{{if .Checked}} {{svg "octicon-trash"}} {{else}} {{svg "octicon-sync"}} {{end}}
</a>
@ -82,14 +82,14 @@
</div>
{{end}}
{{range .OriginalReviews}}
{{ $createdStr:= TimeSinceUnix .UpdatedUnix $.locale }}
{{$createdStr:= TimeSinceUnix .UpdatedUnix $.locale}}
<div class="ui divider"></div>
<div class="review-item">
<div class="review-item-left">
<a href="{{$.Repository.OriginalURL}}" class="ui tooltip" data-content="{{$.locale.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe }}">
<a href="{{$.Repository.OriginalURL}}" class="ui tooltip" data-content="{{$.locale.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe}}">
<span class="text black ">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{ .OriginalAuthor }}
{{.OriginalAuthor}}
</span>
</a>
</div>
@ -180,7 +180,7 @@
<div class="item toggle-wip df ac sb" data-title="{{.Issue.Title}}" data-wip-prefix="{{(.WorkInProgressPrefix|Escape)}}" data-update-url="{{.Issue.Link}}/title">
<div>
<i class="icon icon-octicon">{{svg "octicon-x"}}</i>
{{$.locale.Tr "repo.pulls.cannot_merge_work_in_progress" }}
{{$.locale.Tr "repo.pulls.cannot_merge_work_in_progress"}}
</div>
<div>
{{if or .HasIssuesOrPullsWritePermission .IsIssuePoster}}
@ -224,7 +224,7 @@
{{else if .IsBlockedByChangedProtectedFiles}}
<div class="item">
<i class="icon icon-octicon">{{svg "octicon-x" 16}}</i>
{{$.locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n" | Safe }}
{{$.locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n" | Safe}}
<div class="ui ordered list">
{{range .ChangedProtectedFiles}}
<div data-value="-" class="item">{{.}}</div>
@ -248,7 +248,7 @@
</div>
<div class="item">
<i class="icon unlock"></i>
{{$.locale.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason) }}
{{$.locale.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason)}}
</div>
{{end}}
@ -278,7 +278,7 @@
{{else if .IsSigned}}
<div class="item">
<i class="icon unlock"></i>
{{$.locale.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason) }}
{{$.locale.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason)}}
</div>
{{end}}
{{end}}
@ -290,7 +290,7 @@
{{$.locale.Tr "repo.pulls.outdated_with_base_branch"}}
</div>
<div class="item-section-right">
{{if and .UpdateAllowed .UpdateByRebaseAllowed }}
{{if and .UpdateAllowed .UpdateByRebaseAllowed}}
<div class="dib">
<div class="ui buttons update-button">
<button class="ui button" data-do="{{.Link}}/update" data-redirect="{{.Link}}">
@ -460,7 +460,7 @@
{{else if .IsBlockedByChangedProtectedFiles}}
<div class="item text red">
<i class="icon icon-octicon">{{svg "octicon-x" 16}}</i>
{{$.locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n" | Safe }}
{{$.locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n" | Safe}}
<div class="ui ordered list">
{{range .ChangedProtectedFiles}}
<div data-value="-" class="item">{{.}}</div>

View File

@ -1,5 +1,5 @@
{{range $key, $value := .Reactions}}
<a class="ui label basic{{if $value.HasUser $.ctx.SignedUserID}} primary{{end}}{{if not $.ctx.IsSigned}} disabled{{end}}" data-title="{{$value.GetFirstUsers}}{{if gt ($value.GetMoreUserCount) 0}} {{ $.ctx.locale.Tr "repo.reactions_more" $value.GetMoreUserCount}}{{end}}" data-content="{{ $key }}" data-action-url="{{ $.ActionURL }}">
<a class="ui label basic{{if $value.HasUser $.ctx.SignedUserID}} primary{{end}}{{if not $.ctx.IsSigned}} disabled{{end}}" data-title="{{$value.GetFirstUsers}}{{if gt ($value.GetMoreUserCount) 0}} {{$.ctx.locale.Tr "repo.reactions_more" $value.GetMoreUserCount}}{{end}}" data-content="{{$key}}" data-action-url="{{$.ActionURL}}">
<span class="reaction">{{ReactionToEmoji $key}}</span>
<span class="reaction-count">{{len $value}}</span>
</a>

View File

@ -3,7 +3,7 @@
{{.locale.Tr "repo.issues.context.reference_issue"}}
</div>
<div class="content" style="text-align:left">
<form class="ui form" action="{{ Printf "%s/issues/new" .Repository.Link }}" method="post">
<form class="ui form" action="{{Printf "%s/issues/new" .Repository.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="ui segment content">
<div class="field">

View File

@ -2,7 +2,7 @@
<div class="ui segment metas">
{{template "repo/issue/branch_selector_field" .}}
{{if .Issue.IsPull }}
{{if .Issue.IsPull}}
<input id="reviewer_id" name="reviewer_id" type="hidden" value="{{.reviewer_id}}">
<div class="ui {{if or (not .Reviewers) (not .CanChooseReviewer) .Repository.IsArchived}}disabled{{end}} floating jump select-reviewers-modify dropdown">
@ -79,10 +79,10 @@
{{end}}
{{range .OriginalReviews}}
<div class="item" style="margin-bottom: 10px;">
<a href="{{$.Repository.OriginalURL}}" class="ui tooltip" data-content="{{$.locale.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe }}">
<a href="{{$.Repository.OriginalURL}}" class="ui tooltip" data-content="{{$.locale.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe}}">
<span class="text black">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{ .OriginalAuthor }}
{{.OriginalAuthor}}
</span>
</a>
<span class="ui right type-icon text {{if eq .Type 1}}green
@ -125,12 +125,12 @@
{{if or .Labels .OrgLabels}}
{{range .Labels}}
<a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon-check {{if not .IsChecked}}invisible{{end}}">{{svg "octicon-check"}}</span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name | RenderEmoji}}
{{if .Description }}<br><small class="desc">{{.Description | RenderEmoji}}</small>{{end}}</a>
{{if .Description}}<br><small class="desc">{{.Description | RenderEmoji}}</small>{{end}}</a>
{{end}}
<div class="ui divider"></div>
{{range .OrgLabels}}
<a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon-check {{if not .IsChecked}}invisible{{end}}">{{svg "octicon-check"}}</span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name | RenderEmoji}}
{{if .Description }}<br><small class="desc">{{.Description | RenderEmoji}}</small>{{end}}</a>
{{if .Description}}<br><small class="desc">{{.Description | RenderEmoji}}</small>{{end}}</a>
{{end}}
{{else}}
<div class="header" style="text-transform: none;font-size:14px;">{{.locale.Tr "repo.issues.new.no_items"}}</div>
@ -337,7 +337,7 @@
</div>
</div>
{{end}}
{{if .Repository.IsTimetrackerEnabled }}
{{if .Repository.IsTimetrackerEnabled}}
{{if and .CanUseTimetracker (not .Repository.IsArchived)}}
<div class="ui divider"></div>
<div class="ui timetrack">
@ -580,7 +580,7 @@
{{if and .IsRepoAdmin (not .Repository.IsArchived)}}
<div class="ui divider"></div>
<div class="ui watching">
<button class="fluid ui show-modal button {{if .Issue.IsLocked }} negative {{end}}" data-modal="#lock">
<button class="fluid ui show-modal button {{if .Issue.IsLocked}} negative {{end}}" data-modal="#lock">
{{if .Issue.IsLocked}}
{{svg "octicon-key"}}
{{.locale.Tr "repo.issues.unlock"}}
@ -592,7 +592,7 @@
</div>
<div class="ui tiny modal" id="lock">
<div class="header">
{{ if .Issue.IsLocked }}
{{if .Issue.IsLocked}}
{{.locale.Tr "repo.issues.unlock.title"}}
{{else}}
{{.locale.Tr "repo.issues.lock.title"}}
@ -600,7 +600,7 @@
</div>
<div class="content">
<div class="ui warning message text left">
{{ if .Issue.IsLocked }}
{{if .Issue.IsLocked}}
{{.locale.Tr "repo.issues.unlock.notice_1"}}<br>
{{.locale.Tr "repo.issues.unlock.notice_2"}}<br>
{{else}}
@ -610,13 +610,13 @@
{{end}}
</div>
<form class="ui form" action="{{.Issue.Link}}{{ if .Issue.IsLocked }}/unlock{{else}}/lock{{end}}"
<form class="ui form" action="{{.Issue.Link}}{{if .Issue.IsLocked}}/unlock{{else}}/lock{{end}}"
method="post">
{{.CsrfTokenHtml}}
{{ if not .Issue.IsLocked }}
{{if not .Issue.IsLocked}}
<div class="field">
<strong> {{ .locale.Tr "repo.issues.lock.reason" }} </strong>
<strong> {{.locale.Tr "repo.issues.lock.reason"}} </strong>
</div>
<div class="field">
@ -644,7 +644,7 @@
<div class="text right actions">
<div class="ui cancel button">{{.locale.Tr "settings.cancel"}}</div>
<button class="ui red button">
{{ if .Issue.IsLocked }}
{{if .Issue.IsLocked}}
{{.locale.Tr "repo.issues.unlock_confirm"}}
{{else}}
{{.locale.Tr "repo.issues.lock_confirm"}}