From da2585c11e11023ffa7a8c69d21c6fecac520a8e Mon Sep 17 00:00:00 2001 From: Adam Strzelecki Date: Mon, 7 Dec 2015 23:30:52 +0100 Subject: 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
,

and Go HTML template blocks such as {{if}} {{with}} 2. Cleans all trailing white-space 3. Adds trailing last line-break to each file --- templates/repo/pulls/commits.tmpl | 6 +- templates/repo/pulls/compare.tmpl | 80 +++++++++++++-------------- templates/repo/pulls/files.tmpl | 6 +- templates/repo/pulls/fork.tmpl | 110 ++++++++++++++++++------------------- templates/repo/pulls/tab_menu.tmpl | 32 +++++------ 5 files changed, 117 insertions(+), 117 deletions(-) (limited to 'templates/repo/pulls') diff --git a/templates/repo/pulls/commits.tmpl b/templates/repo/pulls/commits.tmpl index 851880383e..5095009a9e 100644 --- a/templates/repo/pulls/commits.tmpl +++ b/templates/repo/pulls/commits.tmpl @@ -11,9 +11,9 @@

{{template "repo/issue/view_title" .}} {{template "repo/pulls/tab_menu" .}} -
+
{{template "repo/commits_table" .}} -
+
-{{template "base/footer" .}} \ No newline at end of file +{{template "base/footer" .}} diff --git a/templates/repo/pulls/compare.tmpl b/templates/repo/pulls/compare.tmpl index c3851d8053..f1236c2ba6 100644 --- a/templates/repo/pulls/compare.tmpl +++ b/templates/repo/pulls/compare.tmpl @@ -4,63 +4,63 @@

- {{.i18n.Tr "repo.pulls.compare_changes"}} -
{{.i18n.Tr "repo.pulls.compare_changes_desc"}}
+ {{.i18n.Tr "repo.pulls.compare_changes"}} +
{{.i18n.Tr "repo.pulls.compare_changes_desc"}}

+ ...
{{if .IsNothingToCompare}} -
- {{.i18n.Tr "repo.pulls.nothing_to_compare"}} -
+
+ {{.i18n.Tr "repo.pulls.nothing_to_compare"}} +
{{else if .HasPullRequest}} -
- {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}} -
+
+ {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}} +
{{else}} - {{template "repo/issue/new_form" .}} - {{template "repo/commits_table" .}} - {{template "repo/diff_box" .}} - {{end}} + {{template "repo/issue/new_form" .}} + {{template "repo/commits_table" .}} + {{template "repo/diff_box" .}} + {{end}}
-{{template "base/footer" .}} \ No newline at end of file +{{template "base/footer" .}} diff --git a/templates/repo/pulls/files.tmpl b/templates/repo/pulls/files.tmpl index 1226944b41..9070112e53 100644 --- a/templates/repo/pulls/files.tmpl +++ b/templates/repo/pulls/files.tmpl @@ -11,9 +11,9 @@
{{template "repo/issue/view_title" .}} {{template "repo/pulls/tab_menu" .}} -
+
{{template "repo/diff_box" .}} -
+
-{{template "base/footer" .}} \ No newline at end of file +{{template "base/footer" .}} diff --git a/templates/repo/pulls/fork.tmpl b/templates/repo/pulls/fork.tmpl index b2f857dac6..e02ee180f6 100644 --- a/templates/repo/pulls/fork.tmpl +++ b/templates/repo/pulls/fork.tmpl @@ -3,69 +3,69 @@
- {{.CsrfTokenHtml}} + {{.CsrfTokenHtml}}

- {{.i18n.Tr "new_fork"}} + {{.i18n.Tr "new_fork"}}

{{template "base/alert" .}} -
- - -
+
+ + +
-
- +
+ {{.ForkFrom}} -
-
- - -
-
- -
- - -
- {{.i18n.Tr "repo.fork_visiblity_helper"}} -
-
- - -
+
+
+ + +
+
+ +
+ + +
+ {{.i18n.Tr "repo.fork_visiblity_helper"}} +
+
+ + +
-
- - - {{.i18n.Tr "cancel"}} -
-
+
+ + + {{.i18n.Tr "cancel"}} +
+
-{{template "base/footer" .}} \ No newline at end of file +{{template "base/footer" .}} diff --git a/templates/repo/pulls/tab_menu.tmpl b/templates/repo/pulls/tab_menu.tmpl index 0023cd29e4..d6a9920bff 100644 --- a/templates/repo/pulls/tab_menu.tmpl +++ b/templates/repo/pulls/tab_menu.tmpl @@ -1,17 +1,17 @@ \ No newline at end of file + + + {{$.i18n.Tr "repo.pulls.tab_conversation"}} + {{.Issue.NumComments}} + + + + {{$.i18n.Tr "repo.pulls.tab_commits"}} + {{if .NumCommits}}{{.NumCommits}}{{else}}N/A{{end}} + + + + {{$.i18n.Tr "repo.pulls.tab_files"}} + {{if .NumFiles}}{{.NumFiles}}{{else}}N/A{{end}} + + -- cgit v1.2.3