summaryrefslogtreecommitdiffstats
path: root/templates/repo/settings/hook_history.tmpl
diff options
context:
space:
mode:
authorAdam Strzelecki <ono@java.pl>2015-12-07 23:30:52 +0100
committerAdam Strzelecki <ono@java.pl>2015-12-08 00:57:46 +0100
commitda2585c11e11023ffa7a8c69d21c6fecac520a8e (patch)
tree1c2a575dfc00e0e78f47c497a6d9347b3edeca9a /templates/repo/settings/hook_history.tmpl
parentdd8a06a397e26c46639eba1313102560dfa49c95 (diff)
downloadgitea-da2585c11e11023ffa7a8c69d21c6fecac520a8e.tar.gz
gitea-da2585c11e11023ffa7a8c69d21c6fecac520a8e.zip
Indent all templates with tabs
This commit improves templates readability, since all of them use consistent indent with all template command blocks indented too. 1. Indents both HTML containers such as <div>, <p> and Go HTML template blocks such as {{if}} {{with}} 2. Cleans all trailing white-space 3. Adds trailing last line-break to each file
Diffstat (limited to 'templates/repo/settings/hook_history.tmpl')
-rw-r--r--templates/repo/settings/hook_history.tmpl128
1 files changed, 64 insertions, 64 deletions
diff --git a/templates/repo/settings/hook_history.tmpl b/templates/repo/settings/hook_history.tmpl
index 15957a6790..9ded6a7905 100644
--- a/templates/repo/settings/hook_history.tmpl
+++ b/templates/repo/settings/hook_history.tmpl
@@ -1,73 +1,73 @@
{{if .PageIsSettingsHooksEdit}}
-<h4 class="ui top attached header">
- {{.i18n.Tr "repo.settings.recent_deliveries"}}
- {{if .IsRepositoryAdmin}}
- <div class="ui right">
- <button class="ui teal tiny button poping up" id="test-delivery" data-content=
- "{{.i18n.Tr "repo.settings.webhook.test_delivery_desc"}}" data-variation="inverted tiny" data-link="{{.Link}}/test" data-redirect="{{.Link}}">{{.i18n.Tr "repo.settings.webhook.test_delivery"}}</button>
- </div>
- {{end}}
-</h4>
-<div class="ui attached table segment">
- <div class="ui hook history list">
- {{range .History}}
- <div class="item">
- <div class="meta">
- {{if .IsSucceed}}
- <span class="text green"><i class="octicon octicon-check"></i></span>
- {{else}}
- <span class="text red"><i class="octicon octicon-alert"></i></span>
- {{end}}
- <a class="ui blue sha label toggle button" data-target="#info-{{.ID}}">{{.UUID}}</a>
- <div class="ui right">
- <span class="text grey time">
- {{.DeliveredString}}
- </span>
- </div>
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "repo.settings.recent_deliveries"}}
+ {{if .IsRepositoryAdmin}}
+ <div class="ui right">
+ <button class="ui teal tiny button poping up" id="test-delivery" data-content=
+ "{{.i18n.Tr "repo.settings.webhook.test_delivery_desc"}}" data-variation="inverted tiny" data-link="{{.Link}}/test" data-redirect="{{.Link}}">{{.i18n.Tr "repo.settings.webhook.test_delivery"}}</button>
</div>
- <div class="info hide" id="info-{{.ID}}">
- <div class="ui top attached tabular menu">
- <a class="item active" data-tab="request-{{.ID}}">{{$.i18n.Tr "repo.settings.webhook.request"}}</a>
- <a class="item" data-tab="response-{{.ID}}">
- {{$.i18n.Tr "repo.settings.webhook.response"}}
- {{if .ResponseInfo}}
- {{if .IsSucceed}}
- <span class="ui green label">{{.ResponseInfo.Status}}</span>
- {{else}}
- <span class="ui red label">{{.ResponseInfo.Status}}</span>
- {{end}}
- {{else}}
- <span class="ui label">N/A</span>
- {{end}}
- </a>
- </div>
- <div class="ui bottom attached tab segment active" data-tab="request-{{.ID}}">
- {{if .RequestInfo}}
- <h5>{{$.i18n.Tr "repo.settings.webhook.headers"}}</h5>
- <pre class="raw"><strong>Request URL:</strong> {{.URL}}
+ {{end}}
+ </h4>
+ <div class="ui attached table segment">
+ <div class="ui hook history list">
+ {{range .History}}
+ <div class="item">
+ <div class="meta">
+ {{if .IsSucceed}}
+ <span class="text green"><i class="octicon octicon-check"></i></span>
+ {{else}}
+ <span class="text red"><i class="octicon octicon-alert"></i></span>
+ {{end}}
+ <a class="ui blue sha label toggle button" data-target="#info-{{.ID}}">{{.UUID}}</a>
+ <div class="ui right">
+ <span class="text grey time">
+ {{.DeliveredString}}
+ </span>
+ </div>
+ </div>
+ <div class="info hide" id="info-{{.ID}}">
+ <div class="ui top attached tabular menu">
+ <a class="item active" data-tab="request-{{.ID}}">{{$.i18n.Tr "repo.settings.webhook.request"}}</a>
+ <a class="item" data-tab="response-{{.ID}}">
+ {{$.i18n.Tr "repo.settings.webhook.response"}}
+ {{if .ResponseInfo}}
+ {{if .IsSucceed}}
+ <span class="ui green label">{{.ResponseInfo.Status}}</span>
+ {{else}}
+ <span class="ui red label">{{.ResponseInfo.Status}}</span>
+ {{end}}
+ {{else}}
+ <span class="ui label">N/A</span>
+ {{end}}
+ </a>
+ </div>
+ <div class="ui bottom attached tab segment active" data-tab="request-{{.ID}}">
+ {{if .RequestInfo}}
+ <h5>{{$.i18n.Tr "repo.settings.webhook.headers"}}</h5>
+ <pre class="raw"><strong>Request URL:</strong> {{.URL}}
<strong>Request method:</strong> POST
{{ range $key, $val := .RequestInfo.Headers }}<strong>{{$key}}:</strong> {{$val}}
{{end}}</pre>
- <h5>{{$.i18n.Tr "repo.settings.webhook.payload"}}</h5>
- <pre class="raw"><code class="json">{{.PayloadContent}}</code></pre>
- {{else}}
- N/A
- {{end}}
- </div>
- <div class="ui bottom attached tab segment" data-tab="response-{{.ID}}">
- {{if .ResponseInfo}}
- <h5>{{$.i18n.Tr "repo.settings.webhook.headers"}}</h5>
- <pre class="raw">{{ range $key, $val := .ResponseInfo.Headers }}<strong>{{$key}}:</strong> {{$val}}
+ <h5>{{$.i18n.Tr "repo.settings.webhook.payload"}}</h5>
+ <pre class="raw"><code class="json">{{.PayloadContent}}</code></pre>
+ {{else}}
+ N/A
+ {{end}}
+ </div>
+ <div class="ui bottom attached tab segment" data-tab="response-{{.ID}}">
+ {{if .ResponseInfo}}
+ <h5>{{$.i18n.Tr "repo.settings.webhook.headers"}}</h5>
+ <pre class="raw">{{ range $key, $val := .ResponseInfo.Headers }}<strong>{{$key}}:</strong> {{$val}}
{{end}}</pre>
- <h5>{{$.i18n.Tr "repo.settings.webhook.body"}}</h5>
- <pre class="raw"><code>{{.ResponseInfo.Body}}</code></pre>
- {{else}}
- N/A
- {{end}}
+ <h5>{{$.i18n.Tr "repo.settings.webhook.body"}}</h5>
+ <pre class="raw"><code>{{.ResponseInfo.Body}}</code></pre>
+ {{else}}
+ N/A
+ {{end}}
+ </div>
+ </div>
</div>
- </div>
+ {{end}}
</div>
- {{end}}
</div>
-</div>
-{{end}} \ No newline at end of file
+{{end}}