Add whitespace removal inside template curly brackes (#20853)
This commit is contained in:
parent
27ac65a124
commit
6c4688e1b1
12
Makefile
12
Makefile
@ -242,8 +242,10 @@ clean:
|
|||||||
|
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
fmt:
|
fmt:
|
||||||
@echo "Running gitea-fmt (with gofumpt)..."
|
|
||||||
@MISSPELL_PACKAGE=$(MISSPELL_PACKAGE) GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run build/code-batch-process.go gitea-fmt -w '{file-list}'
|
@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))
|
||||||
|
@# strip whitespace after '{{' and before `}}` unless there is only whitespace before it
|
||||||
|
@$(SED_INPLACE) -e 's/{{[ ]\{1,\}/{{/g' -e '/^[ ]\{1,\}}}/! s/[ ]\{1,\}}}/}}/g' $(TEMPLATES)
|
||||||
|
|
||||||
.PHONY: vet
|
.PHONY: vet
|
||||||
vet:
|
vet:
|
||||||
@ -288,13 +290,19 @@ errcheck:
|
|||||||
|
|
||||||
.PHONY: fmt-check
|
.PHONY: fmt-check
|
||||||
fmt-check:
|
fmt-check:
|
||||||
# get all go files and run gitea-fmt (with gofmt) on them
|
@# get all go files and run gitea-fmt (with gofmt) on them
|
||||||
@diff=$$(MISSPELL_PACKAGE=$(MISSPELL_PACKAGE) GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run build/code-batch-process.go gitea-fmt -l '{file-list}'); \
|
@diff=$$(MISSPELL_PACKAGE=$(MISSPELL_PACKAGE) GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run build/code-batch-process.go gitea-fmt -l '{file-list}'); \
|
||||||
if [ -n "$$diff" ]; then \
|
if [ -n "$$diff" ]; then \
|
||||||
echo "Please run 'make fmt' and commit the result:"; \
|
echo "Please run 'make fmt' and commit the result:"; \
|
||||||
echo "$${diff}"; \
|
echo "$${diff}"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
@diff2=$$(git diff templates); \
|
||||||
|
if [ -n "$$diff2" ]; then \
|
||||||
|
echo "Please run 'make fmt' and commit the result:"; \
|
||||||
|
echo "$${diff2}"; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
.PHONY: checks
|
.PHONY: checks
|
||||||
checks: checks-frontend checks-backend
|
checks: checks-frontend checks-backend
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
<dt>{{.locale.Tr "admin.config.reverse_auth_user"}}</dt>
|
<dt>{{.locale.Tr "admin.config.reverse_auth_user"}}</dt>
|
||||||
<dd>{{.ReverseProxyAuthUser}}</dd>
|
<dd>{{.ReverseProxyAuthUser}}</dd>
|
||||||
|
|
||||||
{{if .EnvVars }}
|
{{if .EnvVars}}
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
{{range .EnvVars}}
|
{{range .EnvVars}}
|
||||||
<dt>{{.Name}}</dt>
|
<dt>{{.Name}}</dt>
|
||||||
|
@ -22,9 +22,9 @@
|
|||||||
<td>{{$.locale.Tr (printf "admin.dashboard.%s" .Name)}}</td>
|
<td>{{$.locale.Tr (printf "admin.dashboard.%s" .Name)}}</td>
|
||||||
<td>{{.Spec}}</td>
|
<td>{{.Spec}}</td>
|
||||||
<td>{{DateFmtLong .Next}}</td>
|
<td>{{DateFmtLong .Next}}</td>
|
||||||
<td>{{if gt .Prev.Year 1 }}{{DateFmtLong .Prev}}{{else}}N/A{{end}}</td>
|
<td>{{if gt .Prev.Year 1}}{{DateFmtLong .Prev}}{{else}}N/A{{end}}</td>
|
||||||
<td>{{.ExecTimes}}</td>
|
<td>{{.ExecTimes}}</td>
|
||||||
<td {{if ne .Status ""}}class="tooltip" data-content="{{.FormatLastMessage $.locale}}"{{end}} >{{if eq .Status "" }}—{{else if eq .Status "finished"}}{{svg "octicon-check" 16}}{{else}}{{svg "octicon-x" 16}}{{end}}</td>
|
<td {{if ne .Status ""}}class="tooltip" data-content="{{.FormatLastMessage $.locale}}"{{end}} >{{if eq .Status ""}}—{{else if eq .Status "finished"}}{{svg "octicon-check" 16}}{{else}}{{svg "octicon-x" 16}}{{end}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
</tbody>
|
</tbody>
|
||||||
{{ if .Notices }}
|
{{if .Notices}}
|
||||||
<tfoot class="full-width">
|
<tfoot class="full-width">
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
@ -65,11 +65,11 @@
|
|||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
{{ end }}
|
{{end}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ template "base/paginate" . }}
|
{{template "base/paginate" .}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="df ac">
|
<div class="df ac">
|
||||||
<div class="icon ml-3 mr-3">{{if eq .Process.Type "request"}}{{svg "octicon-globe" 16 }}{{else if eq .Process.Type "system"}}{{svg "octicon-cpu" 16 }}{{else}}{{svg "octicon-terminal" 16 }}{{end}}</div>
|
<div class="icon ml-3 mr-3">{{if eq .Process.Type "request"}}{{svg "octicon-globe" 16}}{{else if eq .Process.Type "system"}}{{svg "octicon-cpu" 16}}{{else}}{{svg "octicon-terminal" 16}}{{end}}</div>
|
||||||
<div class="content f1">
|
<div class="content f1">
|
||||||
<div class="header">{{.Process.Description}}</div>
|
<div class="header">{{.Process.Description}}</div>
|
||||||
<div class="description"><span title="{{DateFmtLong .Process.Start}}">{{TimeSince .Process.Start .root.locale}}</span></div>
|
<div class="description"><span title="{{DateFmtLong .Process.Start}}">{{TimeSince .Process.Start .root.locale}}</span></div>
|
||||||
|
@ -30,12 +30,12 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{if lt $sum 0 }}
|
{{if lt $sum 0}}
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.locale.Tr "admin.monitor.queue.nopool.title"}}
|
{{.locale.Tr "admin.monitor.queue.nopool.title"}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached segment">
|
<div class="ui attached segment">
|
||||||
{{if eq .Queue.Type "wrapped" }}
|
{{if eq .Queue.Type "wrapped"}}
|
||||||
<p>{{.locale.Tr "admin.monitor.queue.wrapped.desc"}}</p>
|
<p>{{.locale.Tr "admin.monitor.queue.wrapped.desc"}}</p>
|
||||||
{{else if eq .Queue.Type "persistable-channel"}}
|
{{else if eq .Queue.Type "persistable-channel"}}
|
||||||
<p>{{.locale.Tr "admin.monitor.queue.persistable-channel.desc"}}</p>
|
<p>{{.locale.Tr "admin.monitor.queue.persistable-channel.desc"}}</p>
|
||||||
@ -58,7 +58,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label for="timeout">{{.locale.Tr "admin.monitor.queue.settings.timeout"}}</label>
|
<label for="timeout">{{.locale.Tr "admin.monitor.queue.settings.timeout"}}</label>
|
||||||
<input name="timeout" type="text" placeholder="{{.locale.Tr "admin.monitor.queue.settings.timeout.placeholder" .Queue.BoostTimeout }}">
|
<input name="timeout" type="text" placeholder="{{.locale.Tr "admin.monitor.queue.settings.timeout.placeholder" .Queue.BoostTimeout}}">
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label for="number">{{.locale.Tr "admin.monitor.queue.settings.numberworkers"}}</label>
|
<label for="number">{{.locale.Tr "admin.monitor.queue.settings.numberworkers"}}</label>
|
||||||
@ -166,7 +166,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{{else}}
|
{{else}}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4">{{.locale.Tr "admin.monitor.queue.pool.workers.none" }}
|
<td colspan="4">{{.locale.Tr "admin.monitor.queue.pool.workers.none"}}
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
<div class="df ac">
|
<div class="df ac">
|
||||||
<div class="icon ml-3 mr-3">
|
<div class="icon ml-3 mr-3">
|
||||||
{{if eq .Process.Type "request"}}
|
{{if eq .Process.Type "request"}}
|
||||||
{{svg "octicon-globe" 16 }}
|
{{svg "octicon-globe" 16}}
|
||||||
{{else if eq .Process.Type "system"}}
|
{{else if eq .Process.Type "system"}}
|
||||||
{{svg "octicon-cpu" 16 }}
|
{{svg "octicon-cpu" 16}}
|
||||||
{{else if eq .Process.Type "normal"}}
|
{{else if eq .Process.Type "normal"}}
|
||||||
{{svg "octicon-terminal" 16 }}
|
{{svg "octicon-terminal" 16}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{svg "octicon-code" 16 }}
|
{{svg "octicon-code" 16}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div class="content f1">
|
<div class="content f1">
|
||||||
@ -16,7 +16,7 @@
|
|||||||
<div class="description">{{if ne .Process.Type "none"}}<span title="{{DateFmtLong .Process.Start}}">{{TimeSince .Process.Start .root.locale}}</span>{{end}}</div>
|
<div class="description">{{if ne .Process.Type "none"}}<span title="{{DateFmtLong .Process.Start}}">{{TimeSince .Process.Start .root.locale}}</span>{{end}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{if or (eq .Process.Type "request") (eq .Process.Type "normal") }}
|
{{if or (eq .Process.Type "request") (eq .Process.Type "normal")}}
|
||||||
<a class="delete-button icon" href="" data-url="{{.root.Link}}/cancel/{{.Process.PID}}" data-id="{{.Process.PID}}" data-name="{{.Process.Description}}">{{svg "octicon-trash" 16 "text-red"}}</a>
|
<a class="delete-button icon" href="" data-url="{{.root.Link}}/cancel/{{.Process.PID}}" data-id="{{.Process.PID}}" data-name="{{.Process.Description}}">{{svg "octicon-trash" 16 "text-red"}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<summary>
|
<summary>
|
||||||
<div class="dif content">
|
<div class="dif content">
|
||||||
<div class="header ml-3">
|
<div class="header ml-3">
|
||||||
<span class="icon mr-3">{{svg "octicon-code" 16 }}</span>{{.Description}}{{if gt .Count 1}} * {{.Count}}{{end}}
|
<span class="icon mr-3">{{svg "octicon-code" 16}}</span>{{.Description}}{{if gt .Count 1}} * {{.Count}}{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
{{range .Labels}}
|
{{range .Labels}}
|
||||||
@ -41,7 +41,7 @@
|
|||||||
<div class="list">
|
<div class="list">
|
||||||
{{range .Entry}}
|
{{range .Entry}}
|
||||||
<div class="item df ac">
|
<div class="item df ac">
|
||||||
<span class="icon mr-4">{{svg "octicon-dot-fill" 16 }}</span>
|
<span class="icon mr-4">{{svg "octicon-dot-fill" 16}}</span>
|
||||||
<div class="content f1">
|
<div class="content f1">
|
||||||
<div class="header"><code>{{.Function}}</code></div>
|
<div class="header"><code>{{.Function}}</code></div>
|
||||||
<div class="description"><code>{{.File}}:{{.Line}}</code></div>
|
<div class="description"><code>{{.File}}:{{.Line}}</code></div>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<!-- Third-party libraries -->
|
<!-- Third-party libraries -->
|
||||||
{{if .EnableCaptcha}}
|
{{if .EnableCaptcha}}
|
||||||
{{if eq .CaptchaType "recaptcha"}}
|
{{if eq .CaptchaType "recaptcha"}}
|
||||||
<script src='{{ URLJoin .RecaptchaURL "api.js"}}' async></script>
|
<script src='{{URLJoin .RecaptchaURL "api.js"}}' async></script>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if eq .CaptchaType "hcaptcha"}}
|
{{if eq .CaptchaType "hcaptcha"}}
|
||||||
<script src='https://hcaptcha.com/1/api.js' async></script>
|
<script src='https://hcaptcha.com/1/api.js' async></script>
|
||||||
|
@ -65,8 +65,8 @@
|
|||||||
<meta property="og:description" content="{{MetaDescription}}">
|
<meta property="og:description" content="{{MetaDescription}}">
|
||||||
{{end}}
|
{{end}}
|
||||||
<meta property="og:site_name" content="{{AppName}}">
|
<meta property="og:site_name" content="{{AppName}}">
|
||||||
{{if .IsSigned }}
|
{{if .IsSigned}}
|
||||||
{{ if ne .SignedUser.Theme "gitea" }}
|
{{if ne .SignedUser.Theme "gitea"}}
|
||||||
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/theme-{{.SignedUser.Theme | PathEscape}}.css?v={{AssetVersion}}">
|
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/theme-{{.SignedUser.Theme | PathEscape}}.css?v={{AssetVersion}}">
|
||||||
{{end}}
|
{{end}}
|
||||||
{{else if ne DefaultTheme "gitea"}}
|
{{else if ne DefaultTheme "gitea"}}
|
||||||
|
@ -21,18 +21,18 @@ If you introduce mistakes in it, Gitea JavaScript code wouldn't run correctly.
|
|||||||
enableTimeTracking: {{EnableTimetracking}},
|
enableTimeTracking: {{EnableTimetracking}},
|
||||||
{{if .RequireTribute}}
|
{{if .RequireTribute}}
|
||||||
tributeValues: Array.from(new Map([
|
tributeValues: Array.from(new Map([
|
||||||
{{ range .Participants }}
|
{{range .Participants}}
|
||||||
['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}',
|
['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}',
|
||||||
name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.AvatarLink}}'}],
|
name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.AvatarLink}}'}],
|
||||||
{{ end }}
|
{{end}}
|
||||||
{{ range .Assignees }}
|
{{range .Assignees}}
|
||||||
['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}',
|
['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}',
|
||||||
name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.AvatarLink}}'}],
|
name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.AvatarLink}}'}],
|
||||||
{{ end }}
|
{{end}}
|
||||||
{{ range .MentionableTeams }}
|
{{range .MentionableTeams}}
|
||||||
['{{$.MentionableTeamsOrg}}/{{.Name}}', {key: '{{$.MentionableTeamsOrg}}/{{.Name}}', value: '{{$.MentionableTeamsOrg}}/{{.Name}}',
|
['{{$.MentionableTeamsOrg}}/{{.Name}}', {key: '{{$.MentionableTeamsOrg}}/{{.Name}}', value: '{{$.MentionableTeamsOrg}}/{{.Name}}',
|
||||||
name: '{{$.MentionableTeamsOrg}}/{{.Name}}', avatar: '{{$.MentionableTeamsOrgAvatar}}'}],
|
name: '{{$.MentionableTeamsOrg}}/{{.Name}}', avatar: '{{$.MentionableTeamsOrgAvatar}}'}],
|
||||||
{{ end }}
|
{{end}}
|
||||||
]).values()),
|
]).values()),
|
||||||
{{end}}
|
{{end}}
|
||||||
mermaidMaxSourceCharacters: {{MermaidMaxSourceCharacters}},
|
mermaidMaxSourceCharacters: {{MermaidMaxSourceCharacters}},
|
||||||
|
@ -4,27 +4,27 @@
|
|||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<form class="ui form ignore-dirty" style="max-width: 100%">
|
<form class="ui form ignore-dirty" style="max-width: 100%">
|
||||||
<div class="ui fluid action input">
|
<div class="ui fluid action input">
|
||||||
<input name="q" value="{{.Keyword}}"{{if .CodeIndexerUnavailable }} disabled{{end}} placeholder="{{.locale.Tr "explore.search"}}..." autofocus>
|
<input name="q" value="{{.Keyword}}"{{if .CodeIndexerUnavailable}} disabled{{end}} placeholder="{{.locale.Tr "explore.search"}}..." autofocus>
|
||||||
<div class="ui dropdown selection{{if .CodeIndexerUnavailable }} disabled{{end}}">
|
<div class="ui dropdown selection{{if .CodeIndexerUnavailable}} disabled{{end}}">
|
||||||
<input name="t" type="hidden" value="{{.queryType}}"{{if .CodeIndexerUnavailable }} disabled{{end}}>{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
<input name="t" type="hidden" value="{{.queryType}}"{{if .CodeIndexerUnavailable}} disabled{{end}}>{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="text">{{.locale.Tr (printf "explore.search.%s" (or .queryType "fuzzy"))}}</div>
|
<div class="text">{{.locale.Tr (printf "explore.search.%s" (or .queryType "fuzzy"))}}</div>
|
||||||
<div class="menu transition hidden" tabindex="-1" style="display: block !important;">
|
<div class="menu transition hidden" tabindex="-1" style="display: block !important;">
|
||||||
<div class="item" data-value="">{{.locale.Tr "explore.search.fuzzy"}}</div>
|
<div class="item" data-value="">{{.locale.Tr "explore.search.fuzzy"}}</div>
|
||||||
<div class="item" data-value="match">{{.locale.Tr "explore.search.match"}}</div>
|
<div class="item" data-value="match">{{.locale.Tr "explore.search.match"}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="ui primary button"{{if .CodeIndexerUnavailable }} disabled{{end}}>{{.locale.Tr "explore.search"}}</button>
|
<button class="ui primary button"{{if .CodeIndexerUnavailable}} disabled{{end}}>{{.locale.Tr "explore.search"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
<div class="ui user list">
|
<div class="ui user list">
|
||||||
{{if .CodeIndexerUnavailable }}
|
{{if .CodeIndexerUnavailable}}
|
||||||
<div class="ui error message">
|
<div class="ui error message">
|
||||||
<p>{{$.locale.Tr "explore.code_search_unavailable"}}</p>
|
<p>{{$.locale.Tr "explore.code_search_unavailable"}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{else if .SearchResults}}
|
{{else if .SearchResults}}
|
||||||
<h3>
|
<h3>
|
||||||
{{.locale.Tr "explore.code_search_results" (.Keyword|Escape) | Str2html }}
|
{{.locale.Tr "explore.code_search_results" (.Keyword|Escape) | Str2html}}
|
||||||
</h3>
|
</h3>
|
||||||
<div class="df ac fw">
|
<div class="df ac fw">
|
||||||
{{range $term := .SearchResultLanguages}}
|
{{range $term := .SearchResultLanguages}}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
{{$avatar}}
|
{{$avatar}}
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="name" href="{{.Link}}">
|
<a class="name" href="{{.Link}}">
|
||||||
{{if or $.PageIsExplore $.PageIsProfileStarList }}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}}
|
{{if or $.PageIsExplore $.PageIsProfileStarList}}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}}
|
||||||
</a>
|
</a>
|
||||||
<div class="labels df ac fw">
|
<div class="labels df ac fw">
|
||||||
{{if .IsArchived}}
|
{{if .IsArchived}}
|
||||||
@ -39,9 +39,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="metas df ac">
|
<div class="metas df ac">
|
||||||
{{if .PrimaryLanguage }}
|
{{if .PrimaryLanguage}}
|
||||||
<a href="{{$.Link}}?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}">
|
<a href="{{$.Link}}?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}">
|
||||||
<span class="text grey df ac mr-3"><i class="color-icon mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{ .PrimaryLanguage.Language }}</span>
|
<span class="text grey df ac mr-3"><i class="color-icon mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{.PrimaryLanguage.Language}}</span>
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if not $.DisableStars}}
|
{{if not $.DisableStars}}
|
||||||
@ -51,12 +51,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
{{ $description := .DescriptionHTML $.Context}}
|
{{$description := .DescriptionHTML $.Context}}
|
||||||
{{if $description}}<p>{{$description}}</p>{{end}}
|
{{if $description}}<p>{{$description}}</p>{{end}}
|
||||||
{{if .Topics }}
|
{{if .Topics}}
|
||||||
<div class="ui tags">
|
<div class="ui tags">
|
||||||
{{range .Topics}}
|
{{range .Topics}}
|
||||||
{{if ne . "" }}<a href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1"><div class="ui small label topic">{{.}}</div></a>{{end}}
|
{{if ne . ""}}<a href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1"><div class="ui small label topic">{{.}}</div></a>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
{{$release_url := printf "<a href='%s'>%s</a>" (.Release.HTMLURL | Escape) (.Release.TagName | Escape) }}
|
{{$release_url := printf "<a href='%s'>%s</a>" (.Release.HTMLURL | Escape) (.Release.TagName | Escape)}}
|
||||||
{{$repo_url := printf "<a href='%s'>%s</a>" (.Release.Repo.HTMLURL | Escape) (.Release.Repo.FullName | Escape)}}
|
{{$repo_url := printf "<a href='%s'>%s</a>" (.Release.Repo.HTMLURL | Escape) (.Release.Repo.FullName | Escape)}}
|
||||||
<body>
|
<body>
|
||||||
<p>
|
<p>
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
<a class="table-cell tiny background light grey"></a>
|
<a class="table-cell tiny background light grey"></a>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{.locale.TrN .Activity.ActivePRCount "repo.activity.active_prs_count_1" "repo.activity.active_prs_count_n" .Activity.ActivePRCount | Safe }}
|
{{.locale.TrN .Activity.ActivePRCount "repo.activity.active_prs_count_1" "repo.activity.active_prs_count_n" .Activity.ActivePRCount | Safe}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .Permission.CanRead $.UnitTypeIssues}}
|
{{if .Permission.CanRead $.UnitTypeIssues}}
|
||||||
@ -56,7 +56,7 @@
|
|||||||
<a class="table-cell tiny background light grey"></a>
|
<a class="table-cell tiny background light grey"></a>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{.locale.TrN .Activity.ActiveIssueCount "repo.activity.active_issues_count_1" "repo.activity.active_issues_count_n" .Activity.ActiveIssueCount | Safe }}
|
{{.locale.TrN .Activity.ActiveIssueCount "repo.activity.active_issues_count_1" "repo.activity.active_issues_count_n" .Activity.ActiveIssueCount | Safe}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
@ -87,25 +87,25 @@
|
|||||||
{{if .Permission.CanRead $.UnitTypeCode}}
|
{{if .Permission.CanRead $.UnitTypeCode}}
|
||||||
{{if eq .Activity.Code.CommitCountInAllBranches 0}}
|
{{if eq .Activity.Code.CommitCountInAllBranches 0}}
|
||||||
<div class="ui center aligned segment">
|
<div class="ui center aligned segment">
|
||||||
<h4 class="ui header">{{.locale.Tr "repo.activity.no_git_activity" }}</h4>
|
<h4 class="ui header">{{.locale.Tr "repo.activity.no_git_activity"}}</h4>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if gt .Activity.Code.CommitCountInAllBranches 0}}
|
{{if gt .Activity.Code.CommitCountInAllBranches 0}}
|
||||||
<div class="ui attached segment horizontal segments">
|
<div class="ui attached segment horizontal segments">
|
||||||
<div class="ui attached segment text">
|
<div class="ui attached segment text">
|
||||||
{{.locale.Tr "repo.activity.git_stats_exclude_merges" }}
|
{{.locale.Tr "repo.activity.git_stats_exclude_merges"}}
|
||||||
<strong>{{.locale.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_author_1" "repo.activity.git_stats_author_n" .Activity.Code.AuthorCount}}</strong>
|
<strong>{{.locale.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_author_1" "repo.activity.git_stats_author_n" .Activity.Code.AuthorCount}}</strong>
|
||||||
{{.locale.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_pushed_1" "repo.activity.git_stats_pushed_n"}}
|
{{.locale.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_pushed_1" "repo.activity.git_stats_pushed_n"}}
|
||||||
<strong>{{.locale.TrN .Activity.Code.CommitCount "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCount}}</strong>
|
<strong>{{.locale.TrN .Activity.Code.CommitCount "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCount}}</strong>
|
||||||
{{.locale.Tr "repo.activity.git_stats_push_to_branch" .Repository.DefaultBranch }}
|
{{.locale.Tr "repo.activity.git_stats_push_to_branch" .Repository.DefaultBranch}}
|
||||||
<strong>{{.locale.TrN .Activity.Code.CommitCountInAllBranches "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCountInAllBranches}}</strong>
|
<strong>{{.locale.TrN .Activity.Code.CommitCountInAllBranches "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCountInAllBranches}}</strong>
|
||||||
{{.locale.Tr "repo.activity.git_stats_push_to_all_branches" }}
|
{{.locale.Tr "repo.activity.git_stats_push_to_all_branches"}}
|
||||||
{{.locale.Tr "repo.activity.git_stats_on_default_branch" .Repository.DefaultBranch }}
|
{{.locale.Tr "repo.activity.git_stats_on_default_branch" .Repository.DefaultBranch}}
|
||||||
<strong>{{.locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_file_1" "repo.activity.git_stats_file_n" .Activity.Code.ChangedFiles}}</strong>
|
<strong>{{.locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_file_1" "repo.activity.git_stats_file_n" .Activity.Code.ChangedFiles}}</strong>
|
||||||
{{.locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_files_changed_1" "repo.activity.git_stats_files_changed_n"}}
|
{{.locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_files_changed_1" "repo.activity.git_stats_files_changed_n"}}
|
||||||
{{.locale.Tr "repo.activity.git_stats_additions" }}
|
{{.locale.Tr "repo.activity.git_stats_additions"}}
|
||||||
<strong class="text green">{{.locale.TrN .Activity.Code.Additions "repo.activity.git_stats_addition_1" "repo.activity.git_stats_addition_n" .Activity.Code.Additions}}</strong>
|
<strong class="text green">{{.locale.TrN .Activity.Code.Additions "repo.activity.git_stats_addition_1" "repo.activity.git_stats_addition_n" .Activity.Code.Additions}}</strong>
|
||||||
{{.locale.Tr "repo.activity.git_stats_and_deletions" }}
|
{{.locale.Tr "repo.activity.git_stats_and_deletions"}}
|
||||||
<strong class="text red">{{.locale.TrN .Activity.Code.Deletions "repo.activity.git_stats_deletion_1" "repo.activity.git_stats_deletion_n" .Activity.Code.Deletions}}</strong>.
|
<strong class="text red">{{.locale.TrN .Activity.Code.Deletions "repo.activity.git_stats_deletion_1" "repo.activity.git_stats_deletion_n" .Activity.Code.Deletions}}</strong>.
|
||||||
</div>
|
</div>
|
||||||
<div class="ui attached segment">
|
<div class="ui attached segment">
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label>
|
<label>
|
||||||
{{.locale.Tr "repo.branch.new_branch_from" "<span class=\"text\" id=\"modal-create-branch-from-span\"></span>" | Safe }}
|
{{.locale.Tr "repo.branch.new_branch_from" "<span class=\"text\" id=\"modal-create-branch-from-span\"></span>" | Safe}}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="required field">
|
<div class="required field">
|
||||||
@ -112,7 +112,7 @@
|
|||||||
<input type="hidden" name="create_tag" value="true">
|
<input type="hidden" name="create_tag" value="true">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label>
|
<label>
|
||||||
{{.locale.Tr "repo.tag.create_tag_from" "<span class=\"text\" id=\"modal-create-tag-from-span\"></span>" | Safe }}
|
{{.locale.Tr "repo.tag.create_tag_from" "<span class=\"text\" id=\"modal-create-tag-from-span\"></span>" | Safe}}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="required field">
|
<div class="required field">
|
||||||
|
@ -62,8 +62,8 @@
|
|||||||
<span class="message-wrapper">
|
<span class="message-wrapper">
|
||||||
{{if $.PageIsWiki}}
|
{{if $.PageIsWiki}}
|
||||||
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary | RenderEmoji}}</span>
|
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary | RenderEmoji}}</span>
|
||||||
{{else }}
|
{{else}}
|
||||||
{{ $commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String) }}
|
{{$commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String)}}
|
||||||
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject $.Context .Message $commitRepoLink $commitLink $.Repository.ComposeMetas}}</span>
|
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject $.Context .Message $commitRepoLink $commitLink $.Repository.ComposeMetas}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
</span>
|
</span>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{{ $index := 0}}
|
{{$index := 0}}
|
||||||
<div class="timeline-item commits-list">
|
<div class="timeline-item commits-list">
|
||||||
{{range .comment.Commits}}
|
{{range .comment.Commits}}
|
||||||
{{ $tag := printf "%s-%d" $.comment.HashTag $index }}
|
{{$tag := printf "%s-%d" $.comment.HashTag $index}}
|
||||||
{{ $index = Add $index 1}}
|
{{$index = Add $index 1}}
|
||||||
<div class="singular-commit" id="{{$tag}}">
|
<div class="singular-commit" id="{{$tag}}">
|
||||||
<span class="badge badge-commit">{{svg "octicon-git-commit"}}</span>
|
<span class="badge badge-commit">{{svg "octicon-git-commit"}}</span>
|
||||||
{{if .User}}
|
{{if .User}}
|
||||||
@ -46,7 +46,7 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{{ $commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String) }}
|
{{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}}
|
||||||
<span class="mono commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.Link|Escape) $commitLink $.comment.Issue.PullRequest.BaseRepo.ComposeMetas}}</span>
|
<span class="mono commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.Link|Escape) $commitLink $.comment.Issue.PullRequest.BaseRepo.ComposeMetas}}</span>
|
||||||
{{if IsMultilineCommitMessage .Message}}
|
{{if IsMultilineCommitMessage .Message}}
|
||||||
<button class="ui button ellipsis-button" aria-expanded="false">...</button>
|
<button class="ui button ellipsis-button" aria-expanded="false">...</button>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
{{if or .PageIsCommits (gt .CommitCount 0)}}
|
{{if or .PageIsCommits (gt .CommitCount 0)}}
|
||||||
{{.CommitCount}} {{.locale.Tr "repo.commits.commits"}} {{if .RefName}}({{.RefName}}){{end}}
|
{{.CommitCount}} {{.locale.Tr "repo.commits.commits"}} {{if .RefName}}({{.RefName}}){{end}}
|
||||||
{{else if .IsNothingToCompare}}
|
{{else if .IsNothingToCompare}}
|
||||||
{{.locale.Tr "repo.commits.nothing_to_compare" }} {{if .RefName}}({{.RefName}}){{end}}
|
{{.locale.Tr "repo.commits.nothing_to_compare"}} {{if .RefName}}({{.RefName}}){{end}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{.locale.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch}} {{if .RefName}}({{.RefName}}){{end}}
|
{{.locale.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch}} {{if .RefName}}({{.RefName}}){{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -19,6 +19,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ template "base/paginate" . }}
|
{{template "base/paginate" .}}
|
||||||
</div>
|
</div>
|
||||||
{{template "base/footer" .}}
|
{{template "base/footer" .}}
|
||||||
|
@ -52,8 +52,8 @@
|
|||||||
</h2>
|
</h2>
|
||||||
<div class="ui dividing"></div>
|
<div class="ui dividing"></div>
|
||||||
<div class="ui segment loading hide" id="loading-indicator"></div>
|
<div class="ui segment loading hide" id="loading-indicator"></div>
|
||||||
{{ template "repo/graph/svgcontainer" .}}
|
{{template "repo/graph/svgcontainer" .}}
|
||||||
{{ template "repo/graph/commits" .}}
|
{{template "repo/graph/commits" .}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
<form method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
|
<form method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
|
||||||
{{$.CsrfTokenHtml}}
|
{{$.CsrfTokenHtml}}
|
||||||
<div class="ui labeled button{{if not $.IsSigned}} tooltip{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.locale.Tr "repo.watch_guest_user" }}" data-position="top center"{{end}}>
|
<div class="ui labeled button{{if not $.IsSigned}} tooltip{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.locale.Tr "repo.watch_guest_user"}}" data-position="top center"{{end}}>
|
||||||
<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}>
|
<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}>
|
||||||
{{if $.IsWatchingRepo}}{{svg "octicon-eye-closed" 16}}{{$.locale.Tr "repo.unwatch"}}{{else}}{{svg "octicon-eye"}}{{$.locale.Tr "repo.watch"}}{{end}}
|
{{if $.IsWatchingRepo}}{{svg "octicon-eye-closed" 16}}{{$.locale.Tr "repo.unwatch"}}{{else}}{{svg "octicon-eye"}}{{$.locale.Tr "repo.watch"}}{{end}}
|
||||||
</button>
|
</button>
|
||||||
@ -78,7 +78,7 @@
|
|||||||
{{if not $.DisableStars}}
|
{{if not $.DisableStars}}
|
||||||
<form method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
|
<form method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
|
||||||
{{$.CsrfTokenHtml}}
|
{{$.CsrfTokenHtml}}
|
||||||
<div class="ui labeled button{{if not $.IsSigned}} tooltip{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.locale.Tr "repo.star_guest_user" }}" data-position="top center"{{end}}>
|
<div class="ui labeled button{{if not $.IsSigned}} tooltip{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.locale.Tr "repo.star_guest_user"}}" data-position="top center"{{end}}>
|
||||||
<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}>
|
<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}>
|
||||||
{{if $.IsStaringRepo}}{{svg "octicon-star-fill"}}{{$.locale.Tr "repo.unstar"}}{{else}}{{svg "octicon-star"}}{{$.locale.Tr "repo.star"}}{{end}}
|
{{if $.IsStaringRepo}}{{svg "octicon-star-fill"}}{{$.locale.Tr "repo.unstar"}}{{else}}{{svg "octicon-star"}}{{$.locale.Tr "repo.star"}}{{end}}
|
||||||
</button>
|
</button>
|
||||||
@ -182,21 +182,21 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if .Permission.CanRead $.UnitTypePackages}}
|
{{if .Permission.CanRead $.UnitTypePackages}}
|
||||||
<a href="{{.RepoLink}}/packages" class="{{ if .IsPackagesPage }}active{{end}} item">
|
<a href="{{.RepoLink}}/packages" class="{{if .IsPackagesPage}}active{{end}} item">
|
||||||
{{svg "octicon-package"}} {{.locale.Tr "packages.title"}}
|
{{svg "octicon-package"}} {{.locale.Tr "packages.title"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{ if and (not .UnitProjectsGlobalDisabled) (.Permission.CanRead $.UnitTypeProjects)}}
|
{{if and (not .UnitProjectsGlobalDisabled) (.Permission.CanRead $.UnitTypeProjects)}}
|
||||||
<a href="{{.RepoLink}}/projects" class="{{ if .IsProjectsPage }}active{{end}} item">
|
<a href="{{.RepoLink}}/projects" class="{{if .IsProjectsPage}}active{{end}} item">
|
||||||
{{svg "octicon-project"}} {{.locale.Tr "repo.project_board"}}
|
{{svg "octicon-project"}} {{.locale.Tr "repo.project_board"}}
|
||||||
{{if .Repository.NumOpenProjects}}
|
{{if .Repository.NumOpenProjects}}
|
||||||
<span class="ui primary small label">{{CountFmt .Repository.NumOpenProjects}}</span>
|
<span class="ui primary small label">{{CountFmt .Repository.NumOpenProjects}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{end}}
|
||||||
|
|
||||||
{{if and (.Permission.CanRead $.UnitTypeReleases) (not .IsEmptyRepo) }}
|
{{if and (.Permission.CanRead $.UnitTypeReleases) (not .IsEmptyRepo)}}
|
||||||
<a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
|
<a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
|
||||||
{{svg "octicon-tag"}} {{.locale.Tr "repo.releases"}}
|
{{svg "octicon-tag"}} {{.locale.Tr "repo.releases"}}
|
||||||
{{if .NumReleases}}
|
{{if .NumReleases}}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
{{template "base/alert" .}}
|
{{template "base/alert" .}}
|
||||||
<div class="ui repo-description">
|
<div class="ui repo-description">
|
||||||
<div id="repo-desc">
|
<div id="repo-desc">
|
||||||
{{ $description := .Repository.DescriptionHTML $.Context}}
|
{{$description := .Repository.DescriptionHTML $.Context}}
|
||||||
{{if $description}}<span class="description">{{$description}}</span>{{else if .IsRepositoryAdmin}}<span class="no-description text-italic">{{.locale.Tr "repo.no_desc"}}</span>{{end}}
|
{{if $description}}<span class="description">{{$description}}</span>{{else if .IsRepositoryAdmin}}<span class="no-description text-italic">{{.locale.Tr "repo.no_desc"}}</span>{{end}}
|
||||||
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
|
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
|
||||||
</div>
|
</div>
|
||||||
@ -13,12 +13,12 @@
|
|||||||
<div class="ui repo-search">
|
<div class="ui repo-search">
|
||||||
<form class="ui form ignore-dirty" action="{{.RepoLink}}/search" method="get">
|
<form class="ui form ignore-dirty" action="{{.RepoLink}}/search" method="get">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui action input{{if .CodeIndexerUnavailable }} disabled left icon tooltip{{end}}"{{if .CodeIndexerUnavailable }} data-content="{{.locale.Tr "repo.search.code_search_unavailable"}}"{{end}}>
|
<div class="ui action input{{if .CodeIndexerUnavailable}} disabled left icon tooltip{{end}}"{{if .CodeIndexerUnavailable}} data-content="{{.locale.Tr "repo.search.code_search_unavailable"}}"{{end}}>
|
||||||
<input name="q" value="{{.Keyword}}"{{if .CodeIndexerUnavailable }} disabled{{end}} placeholder="{{.locale.Tr "repo.search.search_repo"}}">
|
<input name="q" value="{{.Keyword}}"{{if .CodeIndexerUnavailable}} disabled{{end}} placeholder="{{.locale.Tr "repo.search.search_repo"}}">
|
||||||
{{if .CodeIndexerUnavailable }}
|
{{if .CodeIndexerUnavailable}}
|
||||||
<i class="icon df ac jc">{{svg "octicon-alert"}}</i>
|
<i class="icon df ac jc">{{svg "octicon-alert"}}</i>
|
||||||
{{end}}
|
{{end}}
|
||||||
<button class="ui icon button"{{if .CodeIndexerUnavailable }} disabled{{end}} type="submit">
|
<button class="ui icon button"{{if .CodeIndexerUnavailable}} disabled{{end}} type="submit">
|
||||||
{{svg "octicon-search"}}
|
{{svg "octicon-search"}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -63,8 +63,8 @@
|
|||||||
<div class="repo-button-row df ac sb fw">
|
<div class="repo-button-row df ac sb fw">
|
||||||
<div class="df ac">
|
<div class="df ac">
|
||||||
{{template "repo/branch_dropdown" dict "root" .}}
|
{{template "repo/branch_dropdown" dict "root" .}}
|
||||||
{{ $n := len .TreeNames}}
|
{{$n := len .TreeNames}}
|
||||||
{{ $l := Subtract $n 1}}
|
{{$l := Subtract $n 1}}
|
||||||
<!-- If home page, show new PR. If not, show breadcrumb -->
|
<!-- If home page, show new PR. If not, show breadcrumb -->
|
||||||
{{if eq $n 0}}
|
{{if eq $n 0}}
|
||||||
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
|
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
|
||||||
@ -99,7 +99,7 @@
|
|||||||
</button>
|
</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}" title="{{.Repository.Name}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section" title="{{$v}}">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span class="section"><a href="{{$.BranchLink}}/{{PathEscapeSegments $p}}" title="{{$v}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span>
|
<span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}" title="{{.Repository.Name}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section" title="{{$v}}">{{EllipsisString $v 30}}</span>{{else}}{{$p := index $.Paths $i}}<span class="section"><a href="{{$.BranchLink}}/{{PathEscapeSegments $p}}" title="{{$v}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div class="df ac">
|
<div class="df ac">
|
||||||
@ -130,7 +130,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if and (ne $n 0) (not .IsViewFile) (not .IsBlame) }}
|
{{if and (ne $n 0) (not .IsViewFile) (not .IsBlame)}}
|
||||||
<a class="ui button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">
|
<a class="ui button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">
|
||||||
{{svg "octicon-history" 16 "mr-3"}}{{.locale.Tr "repo.file_history"}}
|
{{svg "octicon-history" 16 "mr-3"}}{{.locale.Tr "repo.file_history"}}
|
||||||
</a>
|
</a>
|
||||||
|
@ -5,26 +5,26 @@
|
|||||||
<div class="ui repo-search">
|
<div class="ui repo-search">
|
||||||
<form class="ui form ignore-dirty" method="get">
|
<form class="ui form ignore-dirty" method="get">
|
||||||
<div class="ui fluid action input">
|
<div class="ui fluid action input">
|
||||||
<input name="q" value="{{.Keyword}}"{{if .CodeIndexerUnavailable }} disabled{{end}} placeholder="{{.locale.Tr "repo.search.search_repo"}}">
|
<input name="q" value="{{.Keyword}}"{{if .CodeIndexerUnavailable}} disabled{{end}} placeholder="{{.locale.Tr "repo.search.search_repo"}}">
|
||||||
<div class="ui dropdown selection{{if .CodeIndexerUnavailable }} disabled{{end}}">
|
<div class="ui dropdown selection{{if .CodeIndexerUnavailable}} disabled{{end}}">
|
||||||
<input name="t" type="hidden"{{if .CodeIndexerUnavailable }} disabled{{end}} value="{{.queryType}}">{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
<input name="t" type="hidden"{{if .CodeIndexerUnavailable}} disabled{{end}} value="{{.queryType}}">{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="text">{{.locale.Tr (printf "repo.search.%s" (or .queryType "fuzzy"))}}</div>
|
<div class="text">{{.locale.Tr (printf "repo.search.%s" (or .queryType "fuzzy"))}}</div>
|
||||||
<div class="menu transition hidden" tabindex="-1" style="display: block !important;">
|
<div class="menu transition hidden" tabindex="-1" style="display: block !important;">
|
||||||
<div class="item" data-value="">{{.locale.Tr "repo.search.fuzzy"}}</div>
|
<div class="item" data-value="">{{.locale.Tr "repo.search.fuzzy"}}</div>
|
||||||
<div class="item" data-value="match">{{.locale.Tr "repo.search.match"}}</div>
|
<div class="item" data-value="match">{{.locale.Tr "repo.search.match"}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="ui icon button"{{if .CodeIndexerUnavailable }} disabled{{end}} type="submit">{{svg "octicon-search" 16}}</button>
|
<button class="ui icon button"{{if .CodeIndexerUnavailable}} disabled{{end}} type="submit">{{svg "octicon-search" 16}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{{if .CodeIndexerUnavailable }}
|
{{if .CodeIndexerUnavailable}}
|
||||||
<div class="ui error message">
|
<div class="ui error message">
|
||||||
<p>{{$.locale.Tr "repo.search.code_search_unavailable"}}</p>
|
<p>{{$.locale.Tr "repo.search.code_search_unavailable"}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{else if .Keyword}}
|
{{else if .Keyword}}
|
||||||
<h3>
|
<h3>
|
||||||
{{.locale.Tr "repo.search.results" (.Keyword|Escape) (.RepoLink|Escape) (.RepoName|Escape) | Str2html }}
|
{{.locale.Tr "repo.search.results" (.Keyword|Escape) (.RepoLink|Escape) (.RepoName|Escape) | Str2html}}
|
||||||
</h3>
|
</h3>
|
||||||
{{if .SearchResults}}
|
{{if .SearchResults}}
|
||||||
<div class="df ac fw">
|
<div class="df ac fw">
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div class="ui segments repository-summary{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats }} repository-summary-language-stats{{end}} mt-2 mb-0">
|
<div class="ui segments repository-summary{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats}} repository-summary-language-stats{{end}} mt-2 mb-0">
|
||||||
<div class="ui segment sub-menu repository-menu">
|
<div class="ui segment sub-menu repository-menu">
|
||||||
<div class="ui two horizontal center link list">
|
<div class="ui two horizontal center link list">
|
||||||
{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo)}}
|
{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo)}}
|
||||||
@ -19,27 +19,27 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats }}
|
{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats}}
|
||||||
<div class="ui segment sub-menu language-stats-details" style="display: none">
|
<div class="ui segment sub-menu language-stats-details" style="display: none">
|
||||||
<div class="ui horizontal center link list">
|
<div class="ui horizontal center link list">
|
||||||
{{range .LanguageStats}}
|
{{range .LanguageStats}}
|
||||||
<div class="item df ac jc">
|
<div class="item df ac jc">
|
||||||
<i class="color-icon mr-3" style="background-color: {{ .Color }}"></i>
|
<i class="color-icon mr-3" style="background-color: {{.Color}}"></i>
|
||||||
<span class="bold mr-3">
|
<span class="bold mr-3">
|
||||||
{{if eq .Language "other" }}
|
{{if eq .Language "other"}}
|
||||||
{{ $.locale.Tr "repo.language_other" }}
|
{{$.locale.Tr "repo.language_other"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{ .Language }}
|
{{.Language}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</span>
|
</span>
|
||||||
{{ .Percentage }}%
|
{{.Percentage}}%
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="ui segment language-stats">
|
<a class="ui segment language-stats">
|
||||||
{{range .LanguageStats}}
|
{{range .LanguageStats}}
|
||||||
<div class="bar" style="width: {{ .Percentage }}%; background-color: {{ .Color }}"> </div>
|
<div class="bar" style="width: {{.Percentage}}%; background-color: {{.Color}}"> </div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -25,5 +25,5 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{{ template "base/paginate" . }}
|
{{template "base/paginate" .}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -122,7 +122,7 @@
|
|||||||
</table>
|
</table>
|
||||||
<div class="code-line-menu ui vertical pointing menu tippy-target">
|
<div class="code-line-menu ui vertical pointing menu tippy-target">
|
||||||
{{if $.Permission.CanRead $.UnitTypeIssues}}
|
{{if $.Permission.CanRead $.UnitTypeIssues}}
|
||||||
<a class="item ref-in-new-issue" href="{{.RepoLink}}/issues/new?body={{.Repository.HTMLURL}}{{printf "/src/commit/" }}{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}" rel="nofollow noindex">{{.locale.Tr "repo.issues.context.reference_issue"}}</a>
|
<a class="item ref-in-new-issue" href="{{.RepoLink}}/issues/new?body={{.Repository.HTMLURL}}{{printf "/src/commit/"}}{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}" rel="nofollow noindex">{{.locale.Tr "repo.issues.context.reference_issue"}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="item view_git_blame" href="{{.Repository.HTMLURL}}/blame/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}">{{.locale.Tr "repo.view_git_blame"}}</a>
|
<a class="item view_git_blame" href="{{.Repository.HTMLURL}}/blame/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}">{{.locale.Tr "repo.view_git_blame"}}</a>
|
||||||
<a class="item copy-line-permalink" data-url="{{.Repository.HTMLURL}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}">{{.locale.Tr "repo.file_copy_permalink"}}</a>
|
<a class="item copy-line-permalink" data-url="{{.Repository.HTMLURL}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}">{{.locale.Tr "repo.file_copy_permalink"}}</a>
|
||||||
|
@ -18,14 +18,14 @@
|
|||||||
<strong>{{.LatestCommit.Author.Name}}</strong>
|
<strong>{{.LatestCommit.Author.Name}}</strong>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
<a rel="nofollow" class="ui sha label {{if .LatestCommit.Signature}} isSigned {{if .LatestCommitVerification.Verified }} isVerified{{if eq .LatestCommitVerification.TrustStatus "trusted"}}{{else if eq .LatestCommitVerification.TrustStatus "untrusted"}}Untrusted{{else}}Unmatched{{end}}{{else if .LatestCommitVerification.Warning}} isWarning{{end}}{{end}}" href="{{.RepoLink}}/commit/{{PathEscape .LatestCommit.ID.String}}">
|
<a rel="nofollow" class="ui sha label {{if .LatestCommit.Signature}} isSigned {{if .LatestCommitVerification.Verified}} isVerified{{if eq .LatestCommitVerification.TrustStatus "trusted"}}{{else if eq .LatestCommitVerification.TrustStatus "untrusted"}}Untrusted{{else}}Unmatched{{end}}{{else if .LatestCommitVerification.Warning}} isWarning{{end}}{{end}}" href="{{.RepoLink}}/commit/{{PathEscape .LatestCommit.ID.String}}">
|
||||||
<span class="shortsha">{{ShortSha .LatestCommit.ID.String}}</span>
|
<span class="shortsha">{{ShortSha .LatestCommit.ID.String}}</span>
|
||||||
{{if .LatestCommit.Signature}}
|
{{if .LatestCommit.Signature}}
|
||||||
{{template "repo/shabox_badge" dict "root" $ "verification" .LatestCommitVerification}}
|
{{template "repo/shabox_badge" dict "root" $ "verification" .LatestCommitVerification}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</a>
|
</a>
|
||||||
{{template "repo/commit_statuses" dict "Status" .LatestCommitStatus "Statuses" .LatestCommitStatuses "root" $}}
|
{{template "repo/commit_statuses" dict "Status" .LatestCommitStatus "Statuses" .LatestCommitStatuses "root" $}}
|
||||||
{{ $commitLink:= printf "%s/commit/%s" .RepoLink (PathEscape .LatestCommit.ID.String) }}
|
{{$commitLink:= printf "%s/commit/%s" .RepoLink (PathEscape .LatestCommit.ID.String)}}
|
||||||
<span class="grey commit-summary" title="{{.LatestCommit.Summary}}"><span class="message-wrapper">{{RenderCommitMessageLinkSubject $.Context .LatestCommit.Message $.RepoLink $commitLink $.Repository.ComposeMetas}}</span>
|
<span class="grey commit-summary" title="{{.LatestCommit.Summary}}"><span class="message-wrapper">{{RenderCommitMessageLinkSubject $.Context .LatestCommit.Message $.RepoLink $commitLink $.Repository.ComposeMetas}}</span>
|
||||||
{{if IsMultilineCommitMessage .LatestCommit.Message}}
|
{{if IsMultilineCommitMessage .LatestCommit.Message}}
|
||||||
<button class="ui button ellipsis-button" aria-expanded="false">...</button>
|
<button class="ui button ellipsis-button" aria-expanded="false">...</button>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="issue list">
|
<div class="issue list">
|
||||||
{{ $approvalCounts := .ApprovalCounts}}
|
{{$approvalCounts := .ApprovalCounts}}
|
||||||
{{range .Issues}}
|
{{range .Issues}}
|
||||||
<li class="item df py-3">
|
<li class="item df py-3">
|
||||||
<div class="issue-item-left df">
|
<div class="issue-item-left df">
|
||||||
@ -55,8 +55,8 @@
|
|||||||
#{{.Index}}
|
#{{.Index}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</a>
|
</a>
|
||||||
{{ $timeStr := TimeSinceUnix .GetLastEventTimestamp $.locale }}
|
{{$timeStr := TimeSinceUnix .GetLastEventTimestamp $.locale}}
|
||||||
{{if .OriginalAuthor }}
|
{{if .OriginalAuthor}}
|
||||||
{{$.locale.Tr .GetLastEventLabelFake $timeStr (.OriginalAuthor|Escape) | Safe}}
|
{{$.locale.Tr .GetLastEventLabelFake $timeStr (.OriginalAuthor|Escape) | Safe}}
|
||||||
{{else if gt .Poster.ID 0}}
|
{{else if gt .Poster.ID 0}}
|
||||||
{{$.locale.Tr .GetLastEventLabel $timeStr (.Poster.HomeLink|Escape) (.Poster.GetDisplayName | Escape) | Safe}}
|
{{$.locale.Tr .GetLastEventLabel $timeStr (.Poster.HomeLink|Escape) (.Poster.GetDisplayName | Escape) | Safe}}
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
{{if .Owner.Location}}
|
{{if .Owner.Location}}
|
||||||
<li>{{svg "octicon-location"}} {{.Owner.Location}}</li>
|
<li>{{svg "octicon-location"}} {{.Owner.Location}}</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .ShowUserEmail }}
|
{{if .ShowUserEmail}}
|
||||||
<li>
|
<li>
|
||||||
{{svg "octicon-mail"}}
|
{{svg "octicon-mail"}}
|
||||||
<a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a>
|
<a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a>
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label></label>
|
<label></label>
|
||||||
<button class="ui green button">
|
<button class="ui green button">
|
||||||
{{.locale.Tr "repo.projects.create" }}
|
{{.locale.Tr "repo.projects.create"}}
|
||||||
</button>
|
</button>
|
||||||
<a class="ui button" href="{{AppSubUrl}}/">{{.locale.Tr "cancel"}}</a>
|
<a class="ui button" href="{{AppSubUrl}}/">{{.locale.Tr "cancel"}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user