mirror of
https://github.com/go-gitea/gitea
synced 2025-07-27 04:38:36 +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:
@@ -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>
|
||||
|
Reference in New Issue
Block a user