summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-02 04:08:05 -0400
committerUnknwon <u@gogs.io>2015-09-02 04:08:05 -0400
commit37e0cee8770fc4f14857e16eabe83ab7e93a0646 (patch)
tree2eacd8816cb783f208b2afd061d6162cfeafca0e /templates/repo/issue
parent65e73c4ac63b4d8cb5cd1ec6077fa6085e46895c (diff)
downloadgitea-37e0cee8770fc4f14857e16eabe83ab7e93a0646.tar.gz
gitea-37e0cee8770fc4f14857e16eabe83ab7e93a0646.zip
finish PR UI
Diffstat (limited to 'templates/repo/issue')
-rw-r--r--templates/repo/issue/view.tmpl18
-rw-r--r--templates/repo/issue/view_content.tmpl37
2 files changed, 38 insertions, 17 deletions
diff --git a/templates/repo/issue/view.tmpl b/templates/repo/issue/view.tmpl
index fe735ae106..dff8910b88 100644
--- a/templates/repo/issue/view.tmpl
+++ b/templates/repo/issue/view.tmpl
@@ -11,23 +11,7 @@
<div class="ui divider"></div>
{{if .Issue.IsPull}}
{{template "repo/issue/view_title" .}}
- <div class="ui top attached pull tabular menu">
- <a class="item active" 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" href="{{.RepoLink}}/pulls/{{.Issue.Index}}/commits">
- <span class="octicon octicon-git-commit"></span>
- {{$.i18n.Tr "repo.pulls.tab_commits"}}
- <span class="ui label">{{.NumCommits}}</span>
- </a>
- <a class="item" href="{{.RepoLink}}/pulls/{{.Issue.Index}}/files">
- <span class="octicon octicon-diff"></span>
- {{$.i18n.Tr "repo.pulls.tab_files"}}
- <span class="ui label">{{.NumFiles}}</span>
- </a>
- </div>
+ {{template "repo/pulls/tab_menu" .}}
<div class="ui bottom attached tab pull segment active" data-tab="request-{{.ID}}">
{{template "repo/issue/view_content" .}}
</div>
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl
index 4ed7240d36..25811522b4 100644
--- a/templates/repo/issue/view_content.tmpl
+++ b/templates/repo/issue/view_content.tmpl
@@ -131,6 +131,43 @@
{{end}}
+ {{if .Issue.IsPull}}
+ <div class="comment merge box">
+ <a class="avatar text {{if .Issue.IsClosed}}grey{{else if .Issue.PullRepo.CanAutoMerge}}green{{else}}red{{end}}">
+ <span class="mega-octicon octicon-git-merge"></span>
+ </a>
+ <div class="content">
+ <div class="ui merge segment">
+ {{if .Issue.IsClosed}}
+ <div class="item text grey">
+ {{$.i18n.Tr "repo.pulls.reopen_to_merge"}}
+ </div>
+ {{else if .Issue.PullRepo.CanAutoMerge}}
+ <div class="item text green">
+ <span class="octicon octicon-check"></span>
+ {{$.i18n.Tr "repo.pulls.can_auto_merge_desc"}}
+ </div>
+ <div class="ui divider"></div>
+ <div>
+ <button class="ui green button">
+ <span class="octicon octicon-git-merge"></span> {{$.i18n.Tr "repo.pulls.merge_pull_request"}}
+ </button>
+ </div>
+ {{else}}
+ <div class="item text red">
+ <span class="octicon octicon-x"></span>
+ {{$.i18n.Tr "repo.pulls.cannot_auto_merge_desc"}}
+ </div>
+ <div class="item text grey">
+ <span class="octicon octicon-info"></span>
+ {{$.i18n.Tr "repo.pulls.cannot_auto_merge_helper"}}
+ </div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+ {{end}}
+
{{if .IsSigned}}
<div class="comment form">
<a class="avatar" href="{{.SignedUser.HomeLink}}">