aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/pulls
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/pulls
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/pulls')
-rw-r--r--templates/repo/pulls/commits.tmpl6
-rw-r--r--templates/repo/pulls/compare.tmpl80
-rw-r--r--templates/repo/pulls/files.tmpl6
-rw-r--r--templates/repo/pulls/fork.tmpl110
-rw-r--r--templates/repo/pulls/tab_menu.tmpl32
5 files changed, 117 insertions, 117 deletions
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 @@
<div class="ui divider"></div>
{{template "repo/issue/view_title" .}}
{{template "repo/pulls/tab_menu" .}}
- <div class="ui bottom attached tab pull segment active">
+ <div class="ui bottom attached tab pull segment active">
{{template "repo/commits_table" .}}
- </div>
+ </div>
</div>
</div>
-{{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 @@
<div class="ui container">
<div class="sixteen wide column page grid">
<h2 class="ui header">
- {{.i18n.Tr "repo.pulls.compare_changes"}}
- <div class="sub header">{{.i18n.Tr "repo.pulls.compare_changes_desc"}}</div>
+ {{.i18n.Tr "repo.pulls.compare_changes"}}
+ <div class="sub header">{{.i18n.Tr "repo.pulls.compare_changes_desc"}}</div>
</h2>
<div class="ui segment choose branch">
<span class="octicon octicon-git-compare"></span>
<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
<div class="ui basic small button">
- <span class="text">{{.i18n.Tr "repo.pulls.compare_base"}}: {{$.BaseBranch}}</span>
- <i class="dropdown icon"></i>
+ <span class="text">{{.i18n.Tr "repo.pulls.compare_base"}}: {{$.BaseBranch}}</span>
+ <i class="dropdown icon"></i>
</div>
- <div class="menu">
- <div class="ui icon search input">
- <i class="filter icon"></i>
- <input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
- </div>
- <div class="scrolling menu">
- {{range .Branches}}
- <div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{.}}...{{$.SignedUser.Name}}:{{$.HeadBranch}}">{{.}}</div>
- {{end}}
- </div>
+ <div class="menu">
+ <div class="ui icon search input">
+ <i class="filter icon"></i>
+ <input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
+ </div>
+ <div class="scrolling menu">
+ {{range .Branches}}
+ <div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{.}}...{{$.SignedUser.Name}}:{{$.HeadBranch}}">{{.}}</div>
+ {{end}}
+ </div>
</div>
- </div>
- ...
+ </div>
+ ...
<div class="ui floating filter dropdown">
<div class="ui basic small button">
- <span class="text">{{.i18n.Tr "repo.pulls.compare_compare"}}: {{$.HeadBranch}}</span>
- <i class="dropdown icon"></i>
+ <span class="text">{{.i18n.Tr "repo.pulls.compare_compare"}}: {{$.HeadBranch}}</span>
+ <i class="dropdown icon"></i>
</div>
- <div class="menu">
- <div class="ui icon search input">
- <i class="filter icon"></i>
- <input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
- </div>
- <div class="scrolling menu">
- {{range .HeadBranches}}
- <div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{$.BaseBranch}}...{{$.SignedUser.Name}}:{{.}}">{{.}}</div>
- {{end}}
- </div>
+ <div class="menu">
+ <div class="ui icon search input">
+ <i class="filter icon"></i>
+ <input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
+ </div>
+ <div class="scrolling menu">
+ {{range .HeadBranches}}
+ <div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{$.BaseBranch}}...{{$.SignedUser.Name}}:{{.}}">{{.}}</div>
+ {{end}}
+ </div>
</div>
- </div>
+ </div>
</div>
{{if .IsNothingToCompare}}
- <div class="ui segment">
- {{.i18n.Tr "repo.pulls.nothing_to_compare"}}
- </div>
+ <div class="ui segment">
+ {{.i18n.Tr "repo.pulls.nothing_to_compare"}}
+ </div>
{{else if .HasPullRequest}}
- <div class="ui segment">
- {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
- </div>
+ <div class="ui segment">
+ {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
+ </div>
{{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}}
</div>
</div>
</div>
-{{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 @@
<div class="ui divider"></div>
{{template "repo/issue/view_title" .}}
{{template "repo/pulls/tab_menu" .}}
- <div class="ui bottom attached tab pull segment active">
+ <div class="ui bottom attached tab pull segment active">
{{template "repo/diff_box" .}}
- </div>
+ </div>
</div>
</div>
-{{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 @@
<div class="ui middle very relaxed page grid">
<div class="column">
<form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
+ {{.CsrfTokenHtml}}
<h3 class="ui top attached header">
- {{.i18n.Tr "new_fork"}}
+ {{.i18n.Tr "new_fork"}}
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
- <div class="inline required field {{if .Err_Owner}}error{{end}}">
- <label>{{.i18n.Tr "repo.owner"}}</label>
- <div class="ui selection owner dropdown">
- <input type="hidden" id="uid" name="uid" value="{{.ContextUser.Id}}" required>
- <span class="text">
- <img class="ui mini image" src="{{.ContextUser.AvatarLink}}">
- {{.ContextUser.ShortName 20}}
- </span>
- <i class="dropdown icon"></i>
- <div class="menu">
- <div class="item" data-value="{{.SignedUser.Id}}">
- <img class="ui mini image" src="{{.SignedUser.AvatarLink}}">
- {{.SignedUser.ShortName 20}}
- </div>
- {{range .Orgs}}
- {{if .IsOwnedBy $.SignedUser.Id}}
- <div class="item" data-value="{{.Id}}">
- <img class="ui mini image" src="{{.AvatarLink}}">
- {{.ShortName 20}}
- </div>
- {{end}}
- {{end}}
- </div>
- </div>
- </div>
+ <div class="inline required field {{if .Err_Owner}}error{{end}}">
+ <label>{{.i18n.Tr "repo.owner"}}</label>
+ <div class="ui selection owner dropdown">
+ <input type="hidden" id="uid" name="uid" value="{{.ContextUser.Id}}" required>
+ <span class="text">
+ <img class="ui mini image" src="{{.ContextUser.AvatarLink}}">
+ {{.ContextUser.ShortName 20}}
+ </span>
+ <i class="dropdown icon"></i>
+ <div class="menu">
+ <div class="item" data-value="{{.SignedUser.Id}}">
+ <img class="ui mini image" src="{{.SignedUser.AvatarLink}}">
+ {{.SignedUser.ShortName 20}}
+ </div>
+ {{range .Orgs}}
+ {{if .IsOwnedBy $.SignedUser.Id}}
+ <div class="item" data-value="{{.Id}}">
+ <img class="ui mini image" src="{{.AvatarLink}}">
+ {{.ShortName 20}}
+ </div>
+ {{end}}
+ {{end}}
+ </div>
+ </div>
+ </div>
- <div class="inline field">
- <label>{{.i18n.Tr "repo.fork_from"}}</label>
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.fork_from"}}</label>
<a href="{{AppSubUrl}}/{{.ForkFrom}}">{{.ForkFrom}}</a>
- </div>
- <div class="inline required field {{if .Err_RepoName}}error{{end}}">
- <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
- <input id="repo_name" name="repo_name" value="{{.repo_name}}" required>
- </div>
- <div class="inline field">
- <label>{{.i18n.Tr "repo.visibility"}}</label>
- <div class="ui read-only checkbox">
- <input type="checkbox" {{if .IsPrivate}}checked{{end}}>
- <label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
- </div>
- <span class="help">{{.i18n.Tr "repo.fork_visiblity_helper"}}</span>
- </div>
- <div class="inline field {{if .Err_Description}}error{{end}}">
- <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
- <textarea id="description" name="description">{{.description}}</textarea>
- </div>
+ </div>
+ <div class="inline required field {{if .Err_RepoName}}error{{end}}">
+ <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
+ <input id="repo_name" name="repo_name" value="{{.repo_name}}" required>
+ </div>
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.visibility"}}</label>
+ <div class="ui read-only checkbox">
+ <input type="checkbox" {{if .IsPrivate}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
+ </div>
+ <span class="help">{{.i18n.Tr "repo.fork_visiblity_helper"}}</span>
+ </div>
+ <div class="inline field {{if .Err_Description}}error{{end}}">
+ <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
+ <textarea id="description" name="description">{{.description}}</textarea>
+ </div>
- <div class="inline field">
- <label></label>
- <button class="ui green button">
- {{.i18n.Tr "repo.fork_repo"}}
- </button>
- <a class="ui button" href="{{AppSubUrl}}/{{.ForkFrom}}">{{.i18n.Tr "cancel"}}</a>
- </div>
- </div>
+ <div class="inline field">
+ <label></label>
+ <button class="ui green button">
+ {{.i18n.Tr "repo.fork_repo"}}
+ </button>
+ <a class="ui button" href="{{AppSubUrl}}/{{.ForkFrom}}">{{.i18n.Tr "cancel"}}</a>
+ </div>
+ </div>
</form>
</div>
</div>
</div>
-{{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 @@
<div class="ui top attached pull tabular menu">
- <a class="item {{if .PageIsPullConversation}}active{{end}}" href="{{.RepoLink}}/pulls/{{.Issue.Index}}">
- <span class="octicon octicon-comment-discussion"></span>
- {{$.i18n.Tr "repo.pulls.tab_conversation"}}
- <span class="ui label">{{.Issue.NumComments}}</span>
- </a>
- <a class="item {{if .PageIsPullCommits}}active{{end}}" {{if .NumCommits}}href="{{.RepoLink}}/pulls/{{.Issue.Index}}/commits"{{end}}>
- <span class="octicon octicon-git-commit"></span>
- {{$.i18n.Tr "repo.pulls.tab_commits"}}
- <span class="ui label">{{if .NumCommits}}{{.NumCommits}}{{else}}N/A{{end}}</span>
- </a>
- <a class="item {{if .PageIsPullFiles}}active{{end}}" {{if .NumFiles}}href="{{.RepoLink}}/pulls/{{.Issue.Index}}/files"{{end}}>
- <span class="octicon octicon-diff"></span>
- {{$.i18n.Tr "repo.pulls.tab_files"}}
- <span class="ui label">{{if .NumFiles}}{{.NumFiles}}{{else}}N/A{{end}}</span>
- </a>
-</div> \ No newline at end of file
+ <a class="item {{if .PageIsPullConversation}}active{{end}}" href="{{.RepoLink}}/pulls/{{.Issue.Index}}">
+ <span class="octicon octicon-comment-discussion"></span>
+ {{$.i18n.Tr "repo.pulls.tab_conversation"}}
+ <span class="ui label">{{.Issue.NumComments}}</span>
+ </a>
+ <a class="item {{if .PageIsPullCommits}}active{{end}}" {{if .NumCommits}}href="{{.RepoLink}}/pulls/{{.Issue.Index}}/commits"{{end}}>
+ <span class="octicon octicon-git-commit"></span>
+ {{$.i18n.Tr "repo.pulls.tab_commits"}}
+ <span class="ui label">{{if .NumCommits}}{{.NumCommits}}{{else}}N/A{{end}}</span>
+ </a>
+ <a class="item {{if .PageIsPullFiles}}active{{end}}" {{if .NumFiles}}href="{{.RepoLink}}/pulls/{{.Issue.Index}}/files"{{end}}>
+ <span class="octicon octicon-diff"></span>
+ {{$.i18n.Tr "repo.pulls.tab_files"}}
+ <span class="ui label">{{if .NumFiles}}{{.NumFiles}}{{else}}N/A{{end}}</span>
+ </a>
+</div>