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:
parent
c80ca94ab1
commit
647b2649b1
2
Makefile
2
Makefile
|
@ -243,7 +243,7 @@ clean:
|
|||
.PHONY: fmt
|
||||
fmt:
|
||||
@MISSPELL_PACKAGE=$(MISSPELL_PACKAGE) GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run build/code-batch-process.go gitea-fmt -w '{file-list}'
|
||||
$(eval TEMPLATES := $(wildcard templates/**/*.tmpl))
|
||||
$(eval TEMPLATES := $(shell find templates -type f -name '*.tmpl'))
|
||||
@# strip whitespace after '{{' and before `}}` unless there is only whitespace before it
|
||||
@$(SED_INPLACE) -e 's/{{[ ]\{1,\}/{{/g' -e '/^[ ]\{1,\}}}/! s/[ ]\{1,\}}}/}}/g' $(TEMPLATES)
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
<!-- LDAP and DLDAP -->
|
||||
{{if or .Source.IsLDAP .Source.IsDLDAP}}
|
||||
{{ $cfg:=.Source.Cfg }}
|
||||
{{$cfg:=.Source.Cfg}}
|
||||
<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
|
||||
<label>{{.locale.Tr "admin.auths.security_protocol"}}</label>
|
||||
<div class="ui selection security-protocol dropdown">
|
||||
|
@ -180,7 +180,7 @@
|
|||
|
||||
<!-- SMTP -->
|
||||
{{if .Source.IsSMTP}}
|
||||
{{ $cfg:=.Source.Cfg }}
|
||||
{{$cfg:=.Source.Cfg}}
|
||||
<div class="inline required field">
|
||||
<label>{{.locale.Tr "admin.auths.smtp_auth"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
|
@ -242,7 +242,7 @@
|
|||
|
||||
<!-- PAM -->
|
||||
{{if .Source.IsPAM}}
|
||||
{{ $cfg:=.Source.Cfg }}
|
||||
{{$cfg:=.Source.Cfg}}
|
||||
<div class="required field">
|
||||
<label for="pam_service_name">{{.locale.Tr "admin.auths.pam_service_name"}}</label>
|
||||
<input id="pam_service_name" name="pam_service_name" value="{{$cfg.ServiceName}}" required>
|
||||
|
@ -262,7 +262,7 @@
|
|||
|
||||
<!-- OAuth2 -->
|
||||
{{if .Source.IsOAuth2}}
|
||||
{{ $cfg:=.Source.Cfg }}
|
||||
{{$cfg:=.Source.Cfg}}
|
||||
<div class="inline required field">
|
||||
<label>{{.locale.Tr "admin.auths.oauth2_provider"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
|
@ -337,7 +337,7 @@
|
|||
|
||||
<div class="field">
|
||||
<label for="oauth2_scopes">{{.locale.Tr "admin.auths.oauth2_scopes"}}</label>
|
||||
<input id="oauth2_scopes" name="oauth2_scopes" value="{{if $cfg.Scopes}}{{Join $cfg.Scopes "," }}{{end}}">
|
||||
<input id="oauth2_scopes" name="oauth2_scopes" value="{{if $cfg.Scopes}}{{Join $cfg.Scopes ","}}{{end}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="oauth2_required_claim_name">{{.locale.Tr "admin.auths.oauth2_required_claim_name"}}</label>
|
||||
|
@ -365,7 +365,7 @@
|
|||
|
||||
<!-- SSPI -->
|
||||
{{if .Source.IsSSPI}}
|
||||
{{ $cfg:=.Source.Cfg }}
|
||||
{{$cfg:=.Source.Cfg}}
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<label for="sspi_auto_create_users"><strong>{{.locale.Tr "admin.auths.sspi_auto_create_users"}}</strong></label>
|
||||
|
|
|
@ -30,10 +30,10 @@
|
|||
</div>
|
||||
|
||||
<!-- LDAP and DLDAP -->
|
||||
{{ template "admin/auth/source/ldap" . }}
|
||||
{{template "admin/auth/source/ldap" .}}
|
||||
|
||||
<!-- SMTP -->
|
||||
{{ template "admin/auth/source/smtp" . }}
|
||||
{{template "admin/auth/source/smtp" .}}
|
||||
|
||||
<!-- PAM -->
|
||||
<div class="pam required field {{if not (eq .type 4)}}hide{{end}}">
|
||||
|
@ -51,10 +51,10 @@
|
|||
</div>
|
||||
|
||||
<!-- OAuth2 -->
|
||||
{{ template "admin/auth/source/oauth" . }}
|
||||
{{template "admin/auth/source/oauth" .}}
|
||||
|
||||
<!-- SSPI -->
|
||||
{{ template "admin/auth/source/sspi" . }}
|
||||
{{template "admin/auth/source/sspi" .}}
|
||||
|
||||
<div class="ldap field">
|
||||
<div class="ui checkbox">
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
{{.CsrfTokenHtml}}
|
||||
<div class="field {{if .Err_UserName}}error{{end}}">
|
||||
<label for="user_name">{{.locale.Tr "username"}}</label>
|
||||
<input id="user_name" name="user_name" value="{{.User.Name}}" autofocus {{if not .User.IsLocal }}disabled{{end}}>
|
||||
<input id="user_name" name="user_name" value="{{.User.Name}}" autofocus {{if not .User.IsLocal}}disabled{{end}}>
|
||||
</div>
|
||||
<!-- Types and name -->
|
||||
<div class="inline required field {{if .Err_LoginType}}error{{end}}">
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
|
||||
<div class="inline field local{{if ne .login_type "0-0"}} hide{{end}}">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.locale.Tr "auth.allow_password_change" }}</strong></label>
|
||||
<label><strong>{{.locale.Tr "auth.allow_password_change"}}</strong></label>
|
||||
<input name="must_change_password" type="checkbox" checked>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<title>{{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}}</title>
|
||||
</head>
|
||||
|
||||
{{ $activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}}
|
||||
{{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}}
|
||||
<body>
|
||||
<p>{{.locale.Tr "mail.activate_account.text_1" (.DisplayName|DotEscape) AppName | Str2html}}</p><br>
|
||||
<p>{{.locale.Tr "mail.activate_account.text_2" .ActiveCodeLives | Str2html}}</p><p><a href="{{$activate_url}}">{{$activate_url}}</a></p><br>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<title>{{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}}</title>
|
||||
</head>
|
||||
|
||||
{{ $activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}}
|
||||
{{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}}
|
||||
<body>
|
||||
<p>{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape) | Str2html}}</p><br>
|
||||
<p>{{.locale.Tr "mail.activate_email.text" .ActiveCodeLives | Str2html}}</p><p><a href="{{$activate_url}}">{{$activate_url}}</a></p><br>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<title>{{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}}</title>
|
||||
</head>
|
||||
|
||||
{{ $recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}}
|
||||
{{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}}
|
||||
<body>
|
||||
<p>{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape) | Str2html}}</p><br>
|
||||
<p>{{.locale.Tr "mail.reset_password.text" .ResetPwdCodeLives | Str2html}}</p><p><a href="{{$recover_url}}">{{$recover_url}}</a></p><br>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{{template "base/alert" .}}
|
||||
|
||||
<div class="list">
|
||||
{{ range .Members}}
|
||||
{{range .Members}}
|
||||
<div class="item ui grid">
|
||||
<div class="ui four wide column" style="display: flex;">
|
||||
{{avatar . 48}}
|
||||
|
@ -19,7 +19,7 @@
|
|||
{{$.locale.Tr "org.members.membership_visibility"}}
|
||||
</div>
|
||||
<div class="meta">
|
||||
{{ $isPublic := index $.MembersIsPublicMember .ID}}
|
||||
{{$isPublic := index $.MembersIsPublicMember .ID}}
|
||||
{{if $isPublic}}
|
||||
<strong>{{$.locale.Tr "org.members.public"}}</strong>
|
||||
{{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a class="link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{$.locale.Tr "org.members.public_helper"}}</a>){{end}}
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
{{svg "octicon-package" 32}}
|
||||
<h2>{{.locale.Tr "packages.empty"}}</h2>
|
||||
{{if and .Repository .CanWritePackages}}
|
||||
{{$packagesUrl := URLJoin .Owner.HTMLURL "-" "packages" }}
|
||||
{{$packagesUrl := URLJoin .Owner.HTMLURL "-" "packages"}}
|
||||
<p>{{.locale.Tr "packages.empty.repo" $packagesUrl | Safe}}</p>
|
||||
{{end}}
|
||||
<p>{{.locale.Tr "packages.empty.documentation" | Safe}}</p>
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
<tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}">
|
||||
{{if eq .GetType 4}}
|
||||
<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}">
|
||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }}
|
||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}}
|
||||
<a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.PageIsWiki}}" data-anchor="{{$.Anchor}}">
|
||||
{{svg "octicon-fold-down"}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }}
|
||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}}
|
||||
<a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=up&wiki={{$.PageIsWiki}}" data-anchor="{{$.Anchor}}">
|
||||
{{svg "octicon-fold-up"}}
|
||||
</a>
|
||||
|
@ -47,12 +47,12 @@
|
|||
<tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}">
|
||||
{{if eq .GetType 4}}
|
||||
<td colspan="2" class="lines-num">
|
||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }}
|
||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}}
|
||||
<a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.PageIsWiki}}" data-anchor="{{$.Anchor}}">
|
||||
{{svg "octicon-fold-down"}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }}
|
||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}}
|
||||
<a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=up&wiki={{$.PageIsWiki}}" data-anchor="{{$.Anchor}}">
|
||||
{{svg "octicon-fold-up"}}
|
||||
</a>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{{if $.comment}}
|
||||
{{ template "repo/diff/comment_form" dict "root" $.root "hidden" $.hidden "reply" $.reply "Line" $.comment.UnsignedLine "File" $.comment.TreePath "Side" $.comment.DiffSide "HasComments" true}}
|
||||
{{template "repo/diff/comment_form" dict "root" $.root "hidden" $.hidden "reply" $.reply "Line" $.comment.UnsignedLine "File" $.comment.TreePath "Side" $.comment.DiffSide "HasComments" true}}
|
||||
{{else if $.root}}
|
||||
{{ template "repo/diff/comment_form" $}}
|
||||
{{template "repo/diff/comment_form" $}}
|
||||
{{else}}
|
||||
{{ template "repo/diff/comment_form" dict "root" $}}
|
||||
{{template "repo/diff/comment_form" dict "root" $}}
|
||||
{{end}}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{{range .comments}}
|
||||
|
||||
{{ $createdStr:= TimeSinceUnix .CreatedUnix $.root.locale }}
|
||||
{{$createdStr:= TimeSinceUnix .CreatedUnix $.root.locale}}
|
||||
<div class="comment" id="{{.HashTag}}">
|
||||
{{if .OriginalAuthor }}
|
||||
{{if .OriginalAuthor}}
|
||||
<span class="avatar"><img src="{{AppSubUrl}}/assets/img/avatar_default.png"></span>
|
||||
{{else}}
|
||||
<a class="avatar" {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>
|
||||
|
@ -12,17 +12,17 @@
|
|||
<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 $.root.Repository.GetOriginalURLHostname)}}
|
||||
{{ .OriginalAuthor }}
|
||||
{{.OriginalAuthor}}
|
||||
</span>
|
||||
<span class="text grey">
|
||||
{{$.root.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}}
|
||||
</span>
|
||||
<span class="text migrate">
|
||||
{{if $.root.Repository.OriginalURL}}
|
||||
({{$.root.locale.Tr "repo.migrated_from" ($.root.Repository.OriginalURL | Escape) ($.root.Repository.GetOriginalURLHostname | Escape) | Safe }})
|
||||
({{$.root.locale.Tr "repo.migrated_from" ($.root.Repository.OriginalURL | Escape) ($.root.Repository.GetOriginalURLHostname | Escape) | Safe}})
|
||||
{{end}}
|
||||
</span>
|
||||
{{else}}
|
||||
|
@ -46,7 +46,7 @@
|
|||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{template "repo/issue/view_content/add_reaction" Dict "ctx" $.root "ActionURL" (Printf "%s/comments/%d/reactions" $.root.RepoLink .ID) }}
|
||||
{{template "repo/issue/view_content/add_reaction" Dict "ctx" $.root "ActionURL" (Printf "%s/comments/%d/reactions" $.root.RepoLink .ID)}}
|
||||
{{template "repo/issue/view_content/context_menu" Dict "ctx" $.root "item" . "delete" true "issue" false "diff" true "IsCommentPoster" (and $.root.IsSigned (eq $.root.SignedUserID .PosterID))}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
{{if and $.PageIsComparePull $.IsSigned (not .Repository.IsArchived)}}
|
||||
{{.locale.Tr "repo.pulls.compare_changes"}}
|
||||
<div class="sub header">{{.locale.Tr "repo.pulls.compare_changes_desc"}}</div>
|
||||
{{ else }}
|
||||
{{else}}
|
||||
{{.locale.Tr "action.compare_commits_general"}}
|
||||
{{ end }}
|
||||
{{end}}
|
||||
</h2>
|
||||
{{ $BaseCompareName := $.BaseName -}}
|
||||
{{$BaseCompareName := $.BaseName -}}
|
||||
{{- $HeadCompareName := $.HeadRepo.OwnerName -}}
|
||||
{{- if and (eq $.BaseName $.HeadRepo.OwnerName) (ne $.Repository.Name $.HeadRepo.Name) -}}
|
||||
{{- $HeadCompareName = printf "%s/%s" $.HeadRepo.OwnerName $.HeadRepo.Name -}}
|
||||
|
@ -174,7 +174,7 @@
|
|||
</div>
|
||||
|
||||
{{if .IsNothingToCompare}}
|
||||
{{if and $.IsSigned $.AllowEmptyPr (not .Repository.IsArchived) }}
|
||||
{{if and $.IsSigned $.AllowEmptyPr (not .Repository.IsArchived)}}
|
||||
<div class="ui segment">{{.locale.Tr "repo.pulls.nothing_to_compare_and_allow_empty_pr"}}</div>
|
||||
<div class="ui info message show-form-container" {{if .Flash}}style="display: none"{{end}}>
|
||||
<button class="ui button green show-form">{{.locale.Tr "repo.pulls.new"}}</button>
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
<div class="image-diff" data-path-before="{{.root.BeforeRawPath}}/{{PathEscapeSegments .file.OldName}}" data-path-after="{{.root.RawPath}}/{{PathEscapeSegments .file.Name}}">
|
||||
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu">
|
||||
<div class="new-menu-inner">
|
||||
<a class="item active" data-tab="diff-side-by-side-{{ .file.Index }}">{{.root.locale.Tr "repo.diff.image.side_by_side"}}</a>
|
||||
<a class="item active" data-tab="diff-side-by-side-{{.file.Index}}">{{.root.locale.Tr "repo.diff.image.side_by_side"}}</a>
|
||||
{{if and .blobBase .blobHead}}
|
||||
<a class="item" data-tab="diff-swipe-{{ .file.Index }}">{{.root.locale.Tr "repo.diff.image.swipe"}}</a>
|
||||
<a class="item" data-tab="diff-overlay-{{ .file.Index }}">{{.root.locale.Tr "repo.diff.image.overlay"}}</a>
|
||||
<a class="item" data-tab="diff-swipe-{{.file.Index}}">{{.root.locale.Tr "repo.diff.image.swipe"}}</a>
|
||||
<a class="item" data-tab="diff-overlay-{{.file.Index}}">{{.root.locale.Tr "repo.diff.image.overlay"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="hide">
|
||||
<div class="ui bottom attached tab image-diff-container active" data-tab="diff-side-by-side-{{ .file.Index }}">
|
||||
<div class="ui bottom attached tab image-diff-container active" data-tab="diff-side-by-side-{{.file.Index}}">
|
||||
<div class="diff-side-by-side">
|
||||
{{if .blobBase }}
|
||||
{{if .blobBase}}
|
||||
<span class="side">
|
||||
<p class="side-header">{{.root.locale.Tr "repo.diff.file_before"}}</p>
|
||||
<span class="before-container"><img class="image-before" /></span>
|
||||
|
@ -29,7 +29,7 @@
|
|||
</p>
|
||||
</span>
|
||||
{{end}}
|
||||
{{if .blobHead }}
|
||||
{{if .blobHead}}
|
||||
<span class="side">
|
||||
<p class="side-header">{{.root.locale.Tr "repo.diff.file_after"}}</p>
|
||||
<span class="after-container"><img class="image-after" /></span>
|
||||
|
@ -47,7 +47,7 @@
|
|||
</div>
|
||||
</div>
|
||||
{{if and .blobBase .blobHead}}
|
||||
<div class="ui bottom attached tab image-diff-container" data-tab="diff-swipe-{{ .file.Index }}">
|
||||
<div class="ui bottom attached tab image-diff-container" data-tab="diff-swipe-{{.file.Index}}">
|
||||
<div class="diff-swipe">
|
||||
<div class="swipe-frame">
|
||||
<span class="before-container"><img class="image-before" /></span>
|
||||
|
@ -61,7 +61,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui bottom attached tab image-diff-container" data-tab="diff-overlay-{{ .file.Index }}">
|
||||
<div class="ui bottom attached tab image-diff-container" data-tab="diff-overlay-{{.file.Index}}">
|
||||
<div class="diff-overlay">
|
||||
<div class="overlay-frame">
|
||||
<div class="ui centered">
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
</div>
|
||||
{{end}}
|
||||
<div class="ui divider"></div>
|
||||
<button type="submit" name="type" value="approve" {{ if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID) }} disabled {{ end }} class="ui submit green tiny button btn-submit">{{$.locale.Tr "repo.diff.review.approve"}}</button>
|
||||
<button type="submit" name="type" value="approve" {{if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID)}} disabled {{end}} class="ui submit green tiny button btn-submit">{{$.locale.Tr "repo.diff.review.approve"}}</button>
|
||||
<button type="submit" name="type" value="comment" class="ui submit tiny basic button btn-submit">{{$.locale.Tr "repo.diff.review.comment"}}</button>
|
||||
<button type="submit" name="type" value="reject" {{ if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID) }} disabled {{ end }} class="ui submit red tiny button btn-submit">{{$.locale.Tr "repo.diff.review.reject"}}</button>
|
||||
<button type="submit" name="type" value="reject" {{if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID)}} disabled {{end}} class="ui submit red tiny button btn-submit">{{$.locale.Tr "repo.diff.review.reject"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
<tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}" data-line-type="{{DiffLineTypeToStr .GetType}}">
|
||||
{{if eq .GetType 4}}
|
||||
<td class="lines-num lines-num-old">
|
||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }}
|
||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}}
|
||||
<a role="button" class="blob-excerpt" data-url="{{$.root.RepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.root.PageIsWiki}}" data-anchor="diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}">
|
||||
{{svg "octicon-fold-down"}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }}
|
||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}}
|
||||
<a role="button" class="blob-excerpt" data-url="{{$.root.RepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=up&wiki={{$.root.PageIsWiki}}" data-anchor="diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}">
|
||||
{{svg "octicon-fold-up"}}
|
||||
</a>
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
<tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}" data-line-type="{{DiffLineTypeToStr .GetType}}">
|
||||
{{if eq .GetType 4}}
|
||||
<td colspan="2" class="lines-num">
|
||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }}
|
||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}}
|
||||
<a role="button" class="blob-excerpt" data-url="{{$.root.RepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.root.PageIsWiki}}" data-anchor="diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}">
|
||||
{{svg "octicon-fold-down"}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }}
|
||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}}
|
||||
<a role="button" class="blob-excerpt" data-url="{{$.root.RepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=up&wiki={{$.root.PageIsWiki}}" data-anchor="diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}">
|
||||
{{svg "octicon-fold-up"}}
|
||||
</a>
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<div class="menu">
|
||||
<a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=show-all">
|
||||
<i class="circle {{ if eq .WhitespaceBehavior "show-all" }}dot{{else}}outline{{end}} icon"></i>
|
||||
<i class="circle {{if eq .WhitespaceBehavior "show-all"}}dot{{else}}outline{{end}} icon"></i>
|
||||
{{.locale.Tr "repo.diff.whitespace_show_everything"}}
|
||||
</a>
|
||||
<a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-all">
|
||||
<i class="circle {{ if eq .WhitespaceBehavior "ignore-all" }}dot{{else}}outline{{end}} icon"></i>
|
||||
<i class="circle {{if eq .WhitespaceBehavior "ignore-all"}}dot{{else}}outline{{end}} icon"></i>
|
||||
{{.locale.Tr "repo.diff.whitespace_ignore_all_whitespace"}}
|
||||
</a>
|
||||
<a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-change">
|
||||
<i class="circle {{ if eq .WhitespaceBehavior "ignore-change" }}dot{{else}}outline{{end}} icon"></i>
|
||||
<i class="circle {{if eq .WhitespaceBehavior "ignore-change"}}dot{{else}}outline{{end}} icon"></i>
|
||||
{{.locale.Tr "repo.diff.whitespace_ignore_amount_changes"}}
|
||||
</a>
|
||||
<a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-eol">
|
||||
<i class="circle {{ if eq .WhitespaceBehavior "ignore-eol" }}dot{{else}}outline{{end}} icon"></i>
|
||||
<i class="circle {{if eq .WhitespaceBehavior "ignore-eol"}}dot{{else}}outline{{end}} icon"></i>
|
||||
{{.locale.Tr "repo.diff.whitespace_ignore_at_eol"}}
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
<div class="fitted item treepath">
|
||||
<div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
|
||||
<a class="section" href="{{$.BranchLink}}">{{.Repository.Name}}</a>
|
||||
{{ $n := len .TreeNames}}
|
||||
{{ $l := Subtract $n 1}}
|
||||
{{$n := len .TreeNames}}
|
||||
{{$l := Subtract $n 1}}
|
||||
{{range $i, $v := .TreeNames}}
|
||||
<div class="divider"> / </div>
|
||||
{{if eq $i $l}}
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
<div class="item fitted treepath">
|
||||
<div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
|
||||
<a class="section" href="{{$.BranchLink}}">{{.Repository.Name}}</a>
|
||||
{{ $n := len .TreeNames}}
|
||||
{{ $l := Subtract $n 1}}
|
||||
{{$n := len .TreeNames}}
|
||||
{{$l := Subtract $n 1}}
|
||||
{{range $i, $v := .TreeNames}}
|
||||
<div class="divider"> / </div>
|
||||
{{if eq $i $l}}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<div id="rev-container">
|
||||
<ul id="rev-list">
|
||||
{{ range $commitI, $commit := .Graph.Commits }}
|
||||
{{range $commitI, $commit := .Graph.Commits}}
|
||||
<li {{if $commit.Rev}}id="commit-{{$commit.Rev}}"{{end}} data-flow="{{$commit.Flow}}">
|
||||
{{ if $commit.OnlyRelation }}
|
||||
{{if $commit.OnlyRelation}}
|
||||
<span></span>
|
||||
{{ else }}
|
||||
{{else}}
|
||||
<span class="sha" id="{{$commit.ShortRev}}">
|
||||
{{$class := "ui sha label"}}
|
||||
{{if $commit.Commit.Signature}}
|
||||
|
@ -72,8 +72,8 @@
|
|||
{{end}}
|
||||
</span>
|
||||
<span class="time df ac">{{$commit.Date}}</span>
|
||||
{{ end }}
|
||||
{{end}}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived) }}
|
||||
{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
|
||||
{{template "repo/issue/labels/edit_delete_label" .}}
|
||||
{{end}}
|
||||
</div>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<div class="ui attached segment">
|
||||
<div class="labelspage">
|
||||
{{if and (not $.PageIsOrgSettingsLabels) (or $.CanWriteIssues $.CanWritePulls) (eq .NumLabels 0) (not $.Repository.IsArchived) }}
|
||||
{{if and (not $.PageIsOrgSettingsLabels) (or $.CanWriteIssues $.CanWritePulls) (eq .NumLabels 0) (not $.Repository.IsArchived)}}
|
||||
{{template "repo/issue/labels/label_load_template" .}}
|
||||
<div class="ui divider"></div>
|
||||
{{else if and ($.PageIsOrgSettingsLabels) (eq .NumLabels 0)}}
|
||||
|
@ -57,7 +57,7 @@
|
|||
</div>
|
||||
</li>
|
||||
{{end}}
|
||||
{{if and (not .PageIsOrgSettingsLabels) (.OrgLabels) }}
|
||||
{{if and (not .PageIsOrgSettingsLabels) (.OrgLabels)}}
|
||||
<li class="item">
|
||||
<div class="ui grid middle aligned">
|
||||
<div class="ten wide column">
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</div>
|
||||
<div class="ui one column stackable grid">
|
||||
<div class="column">
|
||||
{{ $closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix $.locale }}
|
||||
{{$closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix $.locale}}
|
||||
{{if .IsClosed}}
|
||||
{{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate|Str2html}}
|
||||
{{else}}
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="meta">
|
||||
{{ $closedDate:= TimeSinceUnix .ClosedDateUnix $.locale }}
|
||||
{{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}}
|
||||
{{if .IsClosed}}
|
||||
{{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate|Str2html}}
|
||||
{{else}}
|
||||
|
|
|
@ -57,13 +57,13 @@
|
|||
{{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>
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
<input type="hidden" id="issueIndex" value="{{.Issue.Index}}"/>
|
||||
<input type="hidden" id="type" value="{{.IssueType}}">
|
||||
|
||||
{{ $createdStr:= TimeSinceUnix .Issue.CreatedUnix $.locale }}
|
||||
{{$createdStr:= TimeSinceUnix .Issue.CreatedUnix $.locale}}
|
||||
<div class="twelve wide column comment-list prevent-before-timeline">
|
||||
<ui class="ui timeline">
|
||||
<div id="{{.Issue.HashTag}}" class="timeline-item comment first">
|
||||
{{if .Issue.OriginalAuthor }}
|
||||
{{if .Issue.OriginalAuthor}}
|
||||
<span class="timeline-avatar"><img src="{{AppSubUrl}}/assets/img/avatar_default.png"></span>
|
||||
{{else}}
|
||||
<a class="timeline-avatar" {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>
|
||||
|
@ -29,16 +29,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 .Issue.OriginalAuthor }}
|
||||
{{if .Issue.OriginalAuthor}}
|
||||
<span class="text black">
|
||||
{{svg (MigrationIcon .Repository.GetOriginalURLHostname)}}
|
||||
{{ .Issue.OriginalAuthor }}
|
||||
{{.Issue.OriginalAuthor}}
|
||||
</span>
|
||||
<span class="text grey">
|
||||
{{ .locale.Tr "repo.issues.commented_at" (.Issue.HashTag|Escape) $createdStr | Safe }}
|
||||
{{.locale.Tr "repo.issues.commented_at" (.Issue.HashTag|Escape) $createdStr | Safe}}
|
||||
</span>
|
||||
<span class="text migrate">
|
||||
{{if .Repository.OriginalURL}} ({{$.locale.Tr "repo.migrated_from" (.Repository.OriginalURL|Escape) (.Repository.GetOriginalURLHostname|Escape) | Safe }}){{end}}
|
||||
{{if .Repository.OriginalURL}} ({{$.locale.Tr "repo.migrated_from" (.Repository.OriginalURL|Escape) (.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}
|
||||
</span>
|
||||
{{else}}
|
||||
<a class="inline-timeline-avatar" href="{{.Issue.Poster.HomeLink}}">
|
||||
|
@ -92,13 +92,13 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{ template "repo/issue/view_content/comments" . }}
|
||||
{{template "repo/issue/view_content/comments" .}}
|
||||
|
||||
{{if and .Issue.IsPull (not $.Repository.IsArchived)}}
|
||||
{{ template "repo/issue/view_content/pull". }}
|
||||
{{template "repo/issue/view_content/pull".}}
|
||||
{{end}}
|
||||
{{if .IsSigned}}
|
||||
{{ if and (or .IsRepoAdmin .HasIssuesOrPullsWritePermission (not .Issue.IsLocked)) (not .Repository.IsArchived) }}
|
||||
{{if and (or .IsRepoAdmin .HasIssuesOrPullsWritePermission (not .Issue.IsLocked)) (not .Repository.IsArchived)}}
|
||||
<div class="timeline-item comment form">
|
||||
<a class="timeline-avatar" href="{{.SignedUser.HomeLink}}">
|
||||
{{avatar .SignedUser}}
|
||||
|
@ -129,7 +129,7 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{ else if .Repository.IsArchived }}
|
||||
{{else if .Repository.IsArchived}}
|
||||
<div class="ui warning message">
|
||||
{{if .Issue.IsPull}}
|
||||
{{.locale.Tr "repo.archive.pull.nocomment"}}
|
||||
|
@ -137,7 +137,7 @@
|
|||
{{.locale.Tr "repo.archive.issue.nocomment"}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{if .Repository.IsArchived}}
|
||||
<div class="ui warning message">
|
||||
|
@ -191,7 +191,7 @@
|
|||
</ui>
|
||||
</div>
|
||||
|
||||
{{ template "repo/issue/view_content/sidebar" . }}
|
||||
{{template "repo/issue/view_content/sidebar" .}}
|
||||
</div>
|
||||
|
||||
<div class="hide" id="edit-content-form">
|
||||
|
@ -231,7 +231,7 @@
|
|||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.locale.Tr "repo.branch.delete" .HeadTarget }}
|
||||
{{.locale.Tr "repo.branch.delete" .HeadTarget}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.locale.Tr "repo.branch.delete_desc" | Str2html}}</p>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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}}
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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}}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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"}}
|
||||
|
|
|
@ -44,8 +44,8 @@
|
|||
{{$baseHref = printf "<a href=\"%s\">%s</a>" (.BaseBranchHTMLURL | Escape) $baseHref}}
|
||||
{{end}}
|
||||
{{if .Issue.PullRequest.HasMerged}}
|
||||
{{ $mergedStr:= TimeSinceUnix .Issue.PullRequest.MergedUnix $.locale }}
|
||||
{{if .Issue.OriginalAuthor }}
|
||||
{{$mergedStr:= TimeSinceUnix .Issue.PullRequest.MergedUnix $.locale}}
|
||||
{{if .Issue.OriginalAuthor}}
|
||||
{{.Issue.OriginalAuthor}}
|
||||
<span class="pull-desc">{{$.locale.Tr "repo.pulls.merged_title_desc" .NumCommits $headHref $baseHref $mergedStr | Safe}}</span>
|
||||
{{else}}
|
||||
|
@ -53,7 +53,7 @@
|
|||
<span class="pull-desc">{{$.locale.Tr "repo.pulls.merged_title_desc" .NumCommits $headHref $baseHref $mergedStr | Safe}}</span>
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{if .Issue.OriginalAuthor }}
|
||||
{{if .Issue.OriginalAuthor}}
|
||||
<span id="pull-desc" class="pull-desc">{{.Issue.OriginalAuthor}} {{$.locale.Tr "repo.pulls.title_desc" .NumCommits $headHref $baseHref | Safe}}</span>
|
||||
{{else}}
|
||||
<span id="pull-desc" class="pull-desc">
|
||||
|
@ -80,11 +80,11 @@
|
|||
</div>
|
||||
<div class="scrolling menu" id="branch-select">
|
||||
{{range .Branches}}
|
||||
{{ $sameBase := ne $.BaseName $.HeadUserName }}
|
||||
{{ $differentBranch := ne . $.HeadBranch }}
|
||||
{{ if or $sameBase $differentBranch }}
|
||||
{{$sameBase := ne $.BaseName $.HeadUserName}}
|
||||
{{$differentBranch := ne . $.HeadBranch}}
|
||||
{{if or $sameBase $differentBranch}}
|
||||
<div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-branch="{{.}}">{{$.BaseName}}{{if $.HeadRepo}}/{{$.HeadRepo}}{{end}}:{{.}}</div>
|
||||
{{ end }}
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -92,9 +92,9 @@
|
|||
</span>
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{ $createdStr:= TimeSinceUnix .Issue.CreatedUnix $.locale }}
|
||||
{{$createdStr:= TimeSinceUnix .Issue.CreatedUnix $.locale}}
|
||||
<span class="time-desc">
|
||||
{{if .Issue.OriginalAuthor }}
|
||||
{{if .Issue.OriginalAuthor}}
|
||||
{{$.locale.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.OriginalAuthor|Escape) | Safe}}
|
||||
{{else if gt .Issue.Poster.ID 0}}
|
||||
{{$.locale.Tr "repo.issues.opened_by" $createdStr (.Issue.Poster.HomeLink|Escape) (.Issue.Poster.GetDisplayName|Escape) | Safe}}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
{{.Title}}
|
||||
</div>
|
||||
<div class="description tc">
|
||||
{{(Printf "repo.migrate.%s.description" .Name) | $.locale.Tr }}
|
||||
{{(Printf "repo.migrate.%s.description" .Name) | $.locale.Tr}}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
<li class="item">
|
||||
{{svg "octicon-project"}} <a href="{{$.RepoLink}}/projects/{{.ID}}">{{.Title}}</a>
|
||||
<div class="meta">
|
||||
{{ $closedDate:= TimeSinceUnix .ClosedDateUnix $.locale }}
|
||||
{{if .IsClosed }}
|
||||
{{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}}
|
||||
{{if .IsClosed}}
|
||||
{{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate|Str2html}}
|
||||
{{end}}
|
||||
<span class="issue-stats">
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
<div class="ui container fluid padded" id="project-board">
|
||||
|
||||
<div class="board">
|
||||
{{ range $board := .Boards }}
|
||||
{{range $board := .Boards}}
|
||||
|
||||
<div class="ui segment board-column" style="background: {{.Color}} !important;" data-id="{{.ID}}" data-sorting="{{.Sorting}}" data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}">
|
||||
<div class="board-column-header df ac sb">
|
||||
|
@ -169,13 +169,13 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
|
||||
<div class="ui cards board" data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}" data-project="{{$.Project.ID}}" data-board="{{.ID}}" id="board_{{.ID}}">
|
||||
|
||||
{{ range (index $.IssuesMap .ID) }}
|
||||
{{range (index $.IssuesMap .ID)}}
|
||||
|
||||
<!-- start issue card -->
|
||||
<div class="card board-card" data-issue="{{.ID}}">
|
||||
|
@ -207,8 +207,8 @@
|
|||
<div class="meta my-2">
|
||||
<span class="text light grey">
|
||||
#{{.Index}}
|
||||
{{ $timeStr := TimeSinceUnix .GetLastEventTimestamp $.locale }}
|
||||
{{if .OriginalAuthor }}
|
||||
{{$timeStr := TimeSinceUnix .GetLastEventTimestamp $.locale}}
|
||||
{{if .OriginalAuthor}}
|
||||
{{$.locale.Tr .GetLastEventLabelFake $timeStr (.OriginalAuthor|Escape) | Safe}}
|
||||
{{else if gt .Poster.ID 0}}
|
||||
{{$.locale.Tr .GetLastEventLabel $timeStr (.Poster.HomeLink|Escape) (.Poster.GetDisplayName | Escape) | Safe}}
|
||||
|
@ -217,43 +217,43 @@
|
|||
{{end}}
|
||||
</span>
|
||||
</div>
|
||||
{{- if .MilestoneID }}
|
||||
{{- if .MilestoneID}}
|
||||
<div class="meta my-2">
|
||||
<a class="milestone" href="{{$.RepoLink}}/milestone/{{ .MilestoneID}}">
|
||||
<a class="milestone" href="{{$.RepoLink}}/milestone/{{.MilestoneID}}">
|
||||
{{svg "octicon-milestone" 16 "mr-2 vm"}}
|
||||
<span class="vm">{{ .Milestone.Name }}</span>
|
||||
<span class="vm">{{.Milestone.Name}}</span>
|
||||
</a>
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- range index $.LinkedPRs .ID }}
|
||||
{{- end}}
|
||||
{{- range index $.LinkedPRs .ID}}
|
||||
<div class="meta my-2">
|
||||
<a href="{{$.RepoLink}}/pulls/{{ .Index }}">
|
||||
<a href="{{$.RepoLink}}/pulls/{{.Index}}">
|
||||
<span class="m-0 {{if .PullRequest.HasMerged}}purple{{else if .IsClosed}}red{{else}}green{{end}}">{{svg "octicon-git-merge" 16 "mr-2 vm"}}</span>
|
||||
<span class="vm">{{ .Title}} <span class="text light grey">#{{.Index}}</span></span>
|
||||
<span class="vm">{{.Title}} <span class="text light grey">#{{.Index}}</span></span>
|
||||
</a>
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- end}}
|
||||
</div>
|
||||
|
||||
{{ if or .Labels .Assignees }}
|
||||
{{if or .Labels .Assignees}}
|
||||
<div class="extra content labels-list p-0 pt-2">
|
||||
{{ range .Labels }}
|
||||
{{range .Labels}}
|
||||
<a class="ui label" target="_blank" href="{{$.RepoLink}}/issues?labels={{.ID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}};" title="{{.Description | RenderEmojiPlain}}">{{.Name | RenderEmoji}}</a>
|
||||
{{ end }}
|
||||
{{end}}
|
||||
<div class="right floated">
|
||||
{{ range .Assignees }}
|
||||
{{range .Assignees}}
|
||||
<a class="tooltip" target="_blank" href="{{.HTMLURL}}" data-content="{{$.locale.Tr "repo.projects.board.assigned_to"}} {{.Name}}">{{avatar . 28 "mini mr-3"}}</a>
|
||||
{{ end }}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{end}}
|
||||
</div>
|
||||
<!-- stop issue card -->
|
||||
|
||||
{{ end }}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
<a class="mono" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "mr-2"}}{{ShortSha .Sha1}}</a>
|
||||
</span>
|
||||
{{end}}
|
||||
{{if .Sha1 }}
|
||||
{{if .Sha1}}
|
||||
{{template "repo/branch_dropdown" dict "root" $ "release" .}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
@ -95,12 +95,12 @@
|
|||
<a href="{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{svg "octicon-tag" 16 "mr-2"}}{{.TagName}}</a>
|
||||
</h4>
|
||||
<p class="text grey">
|
||||
{{ if gt .Publisher.ID 0 }}
|
||||
{{if gt .Publisher.ID 0}}
|
||||
<span class="author">
|
||||
{{avatar .Publisher 20}}
|
||||
<a href="{{.Publisher.HomeLink}}">{{.Publisher.Name}}</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{end}}
|
||||
<span class="ahead"><a href="{{$.RepoLink}}/compare/{{.TagName | PathEscapeSegments}}{{if .Target}}...{{.Target | PathEscapeSegments}}{{end}}">{{$.locale.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}}</a> {{$.locale.Tr "repo.release.ahead.target" $.DefaultBranch}}</span>
|
||||
</p>
|
||||
<div class="download">
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<h4 class="ui top attached header">
|
||||
{{$.locale.Tr "repo.settings.teams"}}
|
||||
</h4>
|
||||
{{ $allowedToChangeTeams := ( or (.Org.RepoAdminChangeTeamAccess) (.Permission.IsOwner)) }}
|
||||
{{$allowedToChangeTeams := ( or (.Org.RepoAdminChangeTeamAccess) (.Permission.IsOwner))}}
|
||||
{{if .Teams}}
|
||||
<div class="ui attached segment collaborator list">
|
||||
{{range $t, $team := .Teams}}
|
||||
|
@ -71,10 +71,10 @@
|
|||
<div class="ui inline dropdown">
|
||||
<div class="text">{{if eq .AccessMode 1}}{{$.locale.Tr "repo.settings.collaboration.read"}}{{else if eq .AccessMode 2}}{{$.locale.Tr "repo.settings.collaboration.write"}}{{else if eq .AccessMode 3}}{{$.locale.Tr "repo.settings.collaboration.admin"}}{{else if eq .AccessMode 4}}{{$.locale.Tr "repo.settings.collaboration.owner"}}{{else}}{{$.locale.Tr "repo.settings.collaboration.undefined"}}{{end}}</div>
|
||||
</div>
|
||||
{{ if or (eq .AccessMode 1) (eq .AccessMode 2) }}
|
||||
{{ $first := true }}
|
||||
{{if or (eq .AccessMode 1) (eq .AccessMode 2)}}
|
||||
{{$first := true}}
|
||||
<div class="description">
|
||||
Sections: {{range $u, $unit := $.Units}}{{if and ($.Repo.UnitEnabled $unit.Type) ($team.UnitEnabled $unit.Type)}}{{if $first}}{{ $first = false }}{{else}}, {{end}}{{$.locale.Tr $unit.NameKey}}{{end}}{{end}} {{if $first}}None{{end}}
|
||||
Sections: {{range $u, $unit := $.Units}}{{if and ($.Repo.UnitEnabled $unit.Type) ($team.UnitEnabled $unit.Type)}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{$.locale.Tr $unit.NameKey}}{{end}}{{end}} {{if $first}}None{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.locale.Tr "repo.settings.lfs_pointers.found" .NumPointers .NumAssociated .NumNotAssociated .NumNoExist }}
|
||||
{{.locale.Tr "repo.settings.lfs_pointers.found" .NumPointers .NumAssociated .NumNotAssociated .NumNoExist}}
|
||||
{{if gt .NumAssociatable 0}}
|
||||
<div class="ui right">
|
||||
<form class="ui form" method="post" action="{{$.Link}}/associate">
|
||||
|
|
|
@ -336,7 +336,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="ui checkbox">
|
||||
<input name="enable_close_issues_via_commit_in_any_branch" type="checkbox" {{ if .Repository.CloseIssuesViaCommitInAnyBranch }}checked{{end}}>
|
||||
<input name="enable_close_issues_via_commit_in_any_branch" type="checkbox" {{if .Repository.CloseIssuesViaCommitInAnyBranch}}checked{{end}}>
|
||||
<label>{{.locale.Tr "repo.settings.admin_enable_close_issues_via_commit_in_any_branch"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -678,9 +678,9 @@
|
|||
<input type="hidden" name="action" value="cancel_transfer">
|
||||
<button class="ui red button">{{.locale.Tr "repo.settings.transfer_abort"}}</button>
|
||||
</form>
|
||||
{{ else }}
|
||||
{{else}}
|
||||
<button class="ui basic red show-modal button" data-modal="#transfer-repo-modal">{{.locale.Tr "repo.settings.transfer"}}</button>
|
||||
{{ end }}
|
||||
{{end}}
|
||||
</div>
|
||||
<div>
|
||||
<h5>{{.locale.Tr "repo.settings.transfer"}}</h5>
|
||||
|
|
|
@ -93,14 +93,14 @@
|
|||
{{if or .AllowlistUserIDs (and $.Owner.IsOrganization .AllowlistTeamIDs)}}
|
||||
{{$userIDs := .AllowlistUserIDs}}
|
||||
{{range $.Users}}
|
||||
{{if contain $userIDs .ID }}
|
||||
{{if contain $userIDs .ID}}
|
||||
<a class="ui basic image label" href="{{.HomeLink}}">{{avatar . 26}} {{.GetDisplayName}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if $.Owner.IsOrganization}}
|
||||
{{$teamIDs := .AllowlistTeamIDs}}
|
||||
{{range $.Teams}}
|
||||
{{if contain $teamIDs .ID }}
|
||||
{{if contain $teamIDs .ID}}
|
||||
<a class="ui basic image label" href="{{$.Owner.OrganisationLink}}/teams/{{PathEscape .LowerName}}">{{.Name}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<h5>{{$.locale.Tr "repo.settings.webhook.headers"}}</h5>
|
||||
<pre class="webhook-info"><strong>Request URL:</strong> {{.RequestInfo.URL}}
|
||||
<strong>Request method:</strong> {{if .RequestInfo.HTTPMethod}}{{.RequestInfo.HTTPMethod}}{{else}}POST{{end}}
|
||||
{{ range $key, $val := .RequestInfo.Headers }}<strong>{{$key}}:</strong> {{$val}}
|
||||
{{range $key, $val := .RequestInfo.Headers}}<strong>{{$key}}:</strong> {{$val}}
|
||||
{{end}}</pre>
|
||||
<h5>{{$.locale.Tr "repo.settings.webhook.payload"}}</h5>
|
||||
<pre class="webhook-info"><code class="json">{{.PayloadContent}}</code></pre>
|
||||
|
@ -65,7 +65,7 @@
|
|||
<div class="ui bottom attached tab segment" data-tab="response-{{.ID}}">
|
||||
{{if .ResponseInfo}}
|
||||
<h5>{{$.locale.Tr "repo.settings.webhook.headers"}}</h5>
|
||||
<pre class="webhook-info">{{ range $key, $val := .ResponseInfo.Headers }}<strong>{{$key}}:</strong> {{$val}}
|
||||
<pre class="webhook-info">{{range $key, $val := .ResponseInfo.Headers}}<strong>{{$key}}:</strong> {{$val}}
|
||||
{{end}}</pre>
|
||||
<h5>{{$.locale.Tr "repo.settings.webhook.body"}}</h5>
|
||||
<pre class="webhook-info"><code>{{.ResponseInfo.Body}}</code></pre>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="page-content repository wiki revisions">
|
||||
{{template "repo/header" .}}
|
||||
{{ $title := .title}}
|
||||
{{$title := .title}}
|
||||
<div class="ui container">
|
||||
<div class="ui stackable grid">
|
||||
<div class="ui eight wide column text right df ac je">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="page-content repository wiki view">
|
||||
{{template "repo/header" .}}
|
||||
{{ $title := .title}}
|
||||
{{$title := .title}}
|
||||
<div class="ui container">
|
||||
<div class="repo-button-row df ac sb fw">
|
||||
<div class="df ac">
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<button class="ui green button">{{.locale.Tr "settings.change_password" }}</button>
|
||||
<button class="ui green button">{{.locale.Tr "settings.change_password"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div class="column seven wide">
|
||||
<div class="ui middle centered raised segments">
|
||||
<h1 class="ui top attached header">
|
||||
{{.locale.Tr "auth.authorization_failed" }}
|
||||
{{.locale.Tr "auth.authorization_failed"}}
|
||||
</h1>
|
||||
<h3 class="ui attached segment">{{.Error.ErrorDescription}}</h3>
|
||||
<div class="ui attached segment">
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
</h2>
|
||||
<div class="ui attached segment">
|
||||
{{template "base/alert" .}}
|
||||
{{if .user_email }}
|
||||
{{if .user_email}}
|
||||
<div class="inline field">
|
||||
<label for="user_name">{{.locale.Tr "email"}}</label>
|
||||
<input id="user_name" type="text" value="{{ .user_email }}" disabled>
|
||||
<input id="user_name" type="text" value="{{.user_email}}" disabled>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .IsResetForm}}
|
||||
|
@ -34,7 +34,7 @@
|
|||
<h4 class="ui dividing header">
|
||||
{{.locale.Tr "twofa"}}
|
||||
</h4>
|
||||
<div class="ui warning visible message">{{.locale.Tr "settings.twofa_is_enrolled" | Str2html }}</div>
|
||||
<div class="ui warning visible message">{{.locale.Tr "settings.twofa_is_enrolled" | Str2html}}</div>
|
||||
{{if .scratch_code}}
|
||||
<div class="required inline field {{if .Err_Token}}error{{end}}">
|
||||
<label for="token">{{.locale.Tr "auth.scratch_code"}}</label>
|
||||
|
|
|
@ -46,19 +46,19 @@
|
|||
{{end}}
|
||||
{{if and .EnableCaptcha (eq .CaptchaType "recaptcha")}}
|
||||
<div class="inline field required">
|
||||
<div class="g-recaptcha" data-sitekey="{{ .RecaptchaSitekey }}"></div>
|
||||
<div class="g-recaptcha" data-sitekey="{{.RecaptchaSitekey}}"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .EnableCaptcha (eq .CaptchaType "hcaptcha")}}
|
||||
<div class="inline field required">
|
||||
<div class="h-captcha" data-sitekey="{{ .HcaptchaSitekey }}"></div>
|
||||
<div class="h-captcha" data-sitekey="{{.HcaptchaSitekey}}"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .EnableCaptcha (eq .CaptchaType "mcaptcha")}}
|
||||
<div class="inline field df ac db-small captcha-field">
|
||||
<span>{{.locale.Tr "captcha"}}</span>
|
||||
<div class="border-secondary w-100-small" id="mcaptcha__widget-container" style="width: 50%; height: 5em"></div>
|
||||
<div class="m-captcha" data-sitekey="{{ .McaptchaSitekey }}" data-instance-url="{{ .McaptchaURL }}"></div>
|
||||
<div class="m-captcha" data-sitekey="{{.McaptchaSitekey}}" data-instance-url="{{.McaptchaURL}}"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</div>
|
||||
<div class="inline field">
|
||||
<label for="openid">OpenID URI</label>
|
||||
<input id="openid" value="{{ .OpenID }}" readonly>
|
||||
<input id="openid" value="{{.OpenID}}" readonly>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
|
|
|
@ -32,22 +32,22 @@
|
|||
{{end}}
|
||||
{{if and .EnableCaptcha (eq .CaptchaType "recaptcha")}}
|
||||
<div class="inline field required">
|
||||
<div class="g-recaptcha" data-sitekey="{{ .RecaptchaSitekey }}"></div>
|
||||
<div class="g-recaptcha" data-sitekey="{{.RecaptchaSitekey}}"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .EnableCaptcha (eq .CaptchaType "hcaptcha")}}
|
||||
<div class="inline field required">
|
||||
<div class="h-captcha" data-sitekey="{{ .HcaptchaSitekey }}"></div>
|
||||
<div class="h-captcha" data-sitekey="{{.HcaptchaSitekey}}"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .EnableCaptcha (eq .CaptchaType "mcaptcha")}}
|
||||
<div class="inline field required">
|
||||
<div class="m-captcha" data-sitekey="{{ .McaptchaSitekey }}" data-instance-url="{{ .McaptchaURL }}"></div>
|
||||
<div class="m-captcha" data-sitekey="{{.McaptchaSitekey}}" data-instance-url="{{.McaptchaURL}}"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="inline field">
|
||||
<label for="openid">OpenID URI</label>
|
||||
<input id="openid" value="{{ .OpenID }}" readonly>
|
||||
<input id="openid" value="{{.OpenID}}" readonly>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
|
|
|
@ -23,38 +23,38 @@
|
|||
{{$.locale.Tr "action.create_branch" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{end}}
|
||||
{{else if eq .GetOpType 6}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.create_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 7}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.create_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 8}}
|
||||
{{$.locale.Tr "action.transfer_repo" .GetContent (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 9}}
|
||||
{{$.locale.Tr "action.push_tag" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 10}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.comment_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 11}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.merge_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 12}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.close_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 13}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.reopen_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 14}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.close_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 15}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.reopen_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 16}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.delete_tag" (.GetRepoLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 17}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.delete_branch" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 18}}
|
||||
{{$.locale.Tr "action.mirror_sync_push" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
|
@ -63,30 +63,30 @@
|
|||
{{else if eq .GetOpType 20}}
|
||||
{{$.locale.Tr "action.mirror_sync_delete" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 21}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.approve_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 22}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.reject_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 23}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.comment_pull" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 24}}
|
||||
{{ $linkText := .Content | RenderEmoji }}
|
||||
{{$linkText := .Content | RenderEmoji}}
|
||||
{{$.locale.Tr "action.publish_release" (.GetRepoLink|Escape) ((printf "%s/releases/tag/%s" .GetRepoLink .GetTag)|Escape) (.ShortRepoPath|Escape) $linkText | Str2html}}
|
||||
{{else if eq .GetOpType 25}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{ $reviewer := index .GetIssueInfos 1}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$reviewer := index .GetIssueInfos 1}}
|
||||
{{$.locale.Tr "action.review_dismissed" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) $reviewer | Str2html}}
|
||||
{{end}}
|
||||
</p>
|
||||
{{if or (eq .GetOpType 5) (eq .GetOpType 18)}}
|
||||
<div class="content">
|
||||
<ul>
|
||||
{{ $push := ActionContent2Commits .}}
|
||||
{{ $repoLink := .GetRepoLink}}
|
||||
{{$push := ActionContent2Commits .}}
|
||||
{{$repoLink := .GetRepoLink}}
|
||||
{{range $push.Commits}}
|
||||
{{ $commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
|
||||
{{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
|
||||
<li>
|
||||
{{avatarHTML ($push.AvatarLink .AuthorEmail) 16 "mr-2" .AuthorName}}
|
||||
<a class="commit-id mr-2" href="{{$commitLink}}">{{ShortSha .Sha1}}</a>
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="meta">
|
||||
{{ $closedDate:= TimeSinceUnix .ClosedDateUnix $.locale }}
|
||||
{{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}}
|
||||
{{if .IsClosed}}
|
||||
{{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate|Str2html}}
|
||||
{{else}}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="ui container">
|
||||
<h1 class="ui dividing header">{{.locale.Tr "notification.notifications"}}</h1>
|
||||
<div class="ui top attached tabular menu">
|
||||
{{ $notificationUnreadCount := call .NotificationUnreadCount}}
|
||||
{{$notificationUnreadCount := call .NotificationUnreadCount}}
|
||||
<a href="{{AppSubUrl}}/notifications?q=unread" class="{{if eq .Status 1}}active{{end}} item">
|
||||
{{.locale.Tr "notification.unread"}}
|
||||
<div class="ui label {{if not $notificationUnreadCount}}hidden{{end}}">{{$notificationUnreadCount}}</div>
|
||||
|
|
|
@ -139,9 +139,9 @@
|
|||
<div class="ui attached error segment">
|
||||
<div class="ui red message">
|
||||
<p class="text left">{{svg "octicon-alert"}} {{.locale.Tr "settings.delete_prompt" | Str2html}}</p>
|
||||
{{ if .UserDeleteWithComments }}
|
||||
{{if .UserDeleteWithComments}}
|
||||
<p class="text left" style="font-weight: bold;">{{.locale.Tr "settings.delete_with_all_comments" .UserDeleteWithCommentsMaxTime | Str2html}}</p>
|
||||
{{ end }}
|
||||
{{end}}
|
||||
</div>
|
||||
<form class="ui form ignore-dirty" id="delete-form" action="{{AppSubUrl}}/user/settings/account/delete" method="post">
|
||||
{{template "base/disable_form_autofill"}}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</div>
|
||||
<div class="ui attached bottom segment">
|
||||
<h5 class="ui top header">
|
||||
{{.locale.Tr "settings.create_oauth2_application" }}
|
||||
{{.locale.Tr "settings.create_oauth2_application"}}
|
||||
</h5>
|
||||
<form class="ui form ignore-dirty" action="{{.Link}}/oauth2" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<h4 class="ui top attached header">
|
||||
{{.locale.Tr "settings.manage_ssh_keys"}}
|
||||
<div class="ui right">
|
||||
{{if not .DisableSSH }}
|
||||
{{if not .DisableSSH}}
|
||||
<div id="add-ssh-button" class="ui primary tiny show-panel button" data-panel="#add-ssh-key-panel">
|
||||
{{.locale.Tr "settings.add_key"}}
|
||||
</div>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
{{if .Dirs}}
|
||||
<div class="ui middle aligned divided list">
|
||||
{{range $dirI, $dir := .Dirs}}
|
||||
{{ $repo := index $.ReposMap $dir}}
|
||||
{{$repo := index $.ReposMap $dir}}
|
||||
<div class="item">
|
||||
<div class="content">
|
||||
{{if $repo}}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div class="ui attached segment">
|
||||
<p>{{.locale.Tr "settings.twofa_desc"}}</p>
|
||||
{{if .TOTPEnrolled}}
|
||||
<p>{{$.locale.Tr "settings.twofa_is_enrolled" | Str2html }}</p>
|
||||
<p>{{$.locale.Tr "settings.twofa_is_enrolled" | Str2html}}</p>
|
||||
<form class="ui form" action="{{AppSubUrl}}/user/settings/security/two_factor/regenerate_scratch" method="post" enctype="multipart/form-data">
|
||||
{{.CsrfTokenHtml}}
|
||||
<p>{{.locale.Tr "settings.regenerate_scratch_token_desc"}}</p>
|
||||
|
|
Loading…
Reference in a new issue