diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 1bb9d9fc7f..8d1f4986d6 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -429,7 +429,7 @@ func IssuesTree(ctx *context.Context) { return } ctx.Data["Title"] = ctx.Tr("repo.issues_tree") - ctx.Data["PageIsIssuesTree"] = true + ctx.Data["PageIsIssueList"] = true ctx.Data["NewIssueChooseTemplate"] = len(ctx.IssueTemplatesFromDefaultBranch()) > 0 } diff --git a/templates/repo/issue/issue_actions.tmpl b/templates/repo/issue/issue_actions.tmpl new file mode 100644 index 0000000000..4e1f6bc978 --- /dev/null +++ b/templates/repo/issue/issue_actions.tmpl @@ -0,0 +1,89 @@ +
+
+ {{template "repo/issue/openclose" .}} +
+ {{/* Ten wide does not cope well and makes the columns stack. + This seems to be related to jQuery's hide/show: in fact, switching + issue-actions and issue-filters and having this ten wide will show + this one correctly, but not the other one. */}} +
+ +
+
diff --git a/templates/repo/issue/issue_filters.tmpl b/templates/repo/issue/issue_filters.tmpl new file mode 100644 index 0000000000..a3296f2df5 --- /dev/null +++ b/templates/repo/issue/issue_filters.tmpl @@ -0,0 +1,90 @@ +
+
+ {{template "repo/issue/openclose" .}} +
+
+ +
+
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 63d746f570..9cf9c6f679 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -2,209 +2,11 @@
{{template "repo/header" .}}
-
-
- {{template "repo/issue/navbar" .}} -
-
- {{template "repo/issue/search" .}} -
- {{if not .Repository.IsArchived}} -
- {{if .PageIsIssueList}} - {{.i18n.Tr "repo.issues.new"}} - {{else}} - {{.i18n.Tr "repo.pulls.new"}} - {{end}} -
- {{else}} - {{if not .PageIsIssueList}} - - {{end}} - {{end}} -
+ {{template "repo/issue/nav_search_and_new" .}}
-
-
- {{template "repo/issue/openclose" .}} -
-
- -
-
-
-
- {{template "repo/issue/openclose" .}} -
- {{/* Ten wide does not cope well and makes the columns stack. - This seems to be related to jQuery's hide/show: in fact, switching - issue-actions and issue-filters and having this ten wide will show - this one correctly, but not the other one. */}} -
- -
-
{{template "shared/issuelist" mergeinto . "listType" "repo"}}
diff --git a/templates/repo/issue/nav_search_and_new.tmpl b/templates/repo/issue/nav_search_and_new.tmpl new file mode 100644 index 0000000000..92f433284d --- /dev/null +++ b/templates/repo/issue/nav_search_and_new.tmpl @@ -0,0 +1,23 @@ +
+
+ {{template "repo/issue/navbar" .}} +
+
+ {{template "repo/issue/search" .}} +
+ {{if not .Repository.IsArchived}} +
+ {{if .PageIsIssueList}} + {{.i18n.Tr "repo.issues.new"}} + {{else}} + {{.i18n.Tr "repo.pulls.new"}} + {{end}} +
+ {{else}} + {{if not .PageIsIssueList}} +
+ {{$.i18n.Tr "action.compare_commits_general"}} +
+ {{end}} + {{end}} +
diff --git a/templates/repo/issue/treant_config.tmpl b/templates/repo/issue/treant_config.tmpl new file mode 100644 index 0000000000..d6d3b04b55 --- /dev/null +++ b/templates/repo/issue/treant_config.tmpl @@ -0,0 +1,20 @@ + + + + + + diff --git a/templates/repo/issue/tree.tmpl b/templates/repo/issue/tree.tmpl index 8423795391..ef6f8d4a34 100644 --- a/templates/repo/issue/tree.tmpl +++ b/templates/repo/issue/tree.tmpl @@ -2,209 +2,11 @@
{{template "repo/header" .}}
-
-
- {{template "repo/issue/navbar" .}} -
-
- {{template "repo/issue/search" .}} -
- {{if not .Repository.IsArchived}} -
- {{if .PageIsIssuesTree}} - {{.i18n.Tr "repo.issues.new"}} - {{else}} - {{.i18n.Tr "repo.pulls.new"}} - {{end}} -
- {{else}} - {{if not .PageIsIssuesTree}} - - {{end}} - {{end}} -
+ {{template "repo/issue/nav_search_and_new" .}}
-
-
- {{template "repo/issue/openclose" .}} -
-
- -
-
-
-
- {{template "repo/issue/openclose" .}} -
- {{/* Ten wide does not cope well and makes the columns stack. - This seems to be related to jQuery's hide/show: in fact, switching - issue-actions and issue-filters and having this ten wide will show - this one correctly, but not the other one. */}} -
- -
-
+ {{template "repo/issue/issue_filters" .}} + {{template "repo/issue/issue_actions" .}} +