From 37e0cee8770fc4f14857e16eabe83ab7e93a0646 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 2 Sep 2015 04:08:05 -0400 Subject: finish PR UI --- templates/repo/issue/view.tmpl | 18 +---------------- templates/repo/issue/view_content.tmpl | 37 ++++++++++++++++++++++++++++++++++ templates/repo/pulls/commits.tmpl | 19 +++++++++++++++++ templates/repo/pulls/compare.tmpl | 10 ++++----- templates/repo/pulls/files.tmpl | 19 +++++++++++++++++ templates/repo/pulls/tab_menu.tmpl | 17 ++++++++++++++++ 6 files changed, 98 insertions(+), 22 deletions(-) create mode 100644 templates/repo/pulls/commits.tmpl create mode 100644 templates/repo/pulls/files.tmpl create mode 100644 templates/repo/pulls/tab_menu.tmpl (limited to 'templates') diff --git a/templates/repo/issue/view.tmpl b/templates/repo/issue/view.tmpl index fe735ae1..dff8910b 100644 --- a/templates/repo/issue/view.tmpl +++ b/templates/repo/issue/view.tmpl @@ -11,23 +11,7 @@
{{if .Issue.IsPull}} {{template "repo/issue/view_title" .}} - + {{template "repo/pulls/tab_menu" .}}
{{template "repo/issue/view_content" .}}
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 4ed7240d..25811522 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -129,6 +129,43 @@ {{end}} + {{end}} + + {{if .Issue.IsPull}} +
+ + + +
+
+ {{if .Issue.IsClosed}} +
+ {{$.i18n.Tr "repo.pulls.reopen_to_merge"}} +
+ {{else if .Issue.PullRepo.CanAutoMerge}} +
+ + {{$.i18n.Tr "repo.pulls.can_auto_merge_desc"}} +
+
+
+ +
+ {{else}} +
+ + {{$.i18n.Tr "repo.pulls.cannot_auto_merge_desc"}} +
+
+ + {{$.i18n.Tr "repo.pulls.cannot_auto_merge_helper"}} +
+ {{end}} +
+
+
{{end}} {{if .IsSigned}} diff --git a/templates/repo/pulls/commits.tmpl b/templates/repo/pulls/commits.tmpl new file mode 100644 index 00000000..85188038 --- /dev/null +++ b/templates/repo/pulls/commits.tmpl @@ -0,0 +1,19 @@ +{{template "base/head" .}} +
+ {{template "repo/header" .}} +
+ +
+ {{template "repo/issue/view_title" .}} + {{template "repo/pulls/tab_menu" .}} +
+ {{template "repo/commits_table" .}} +
+
+
+{{template "base/footer" .}} \ No newline at end of file diff --git a/templates/repo/pulls/compare.tmpl b/templates/repo/pulls/compare.tmpl index 219fe3a4..79f15730 100644 --- a/templates/repo/pulls/compare.tmpl +++ b/templates/repo/pulls/compare.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "repo/header" .}}
@@ -11,13 +11,13 @@