From 6def6d1b49e43a9008de76620c83112096125067 Mon Sep 17 00:00:00 2001 From: Gitea Date: Mon, 27 Jun 2022 23:17:57 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=20?= =?UTF-8?q?=D1=81=20=D0=B7=D0=B0=D0=BA=D1=80=D1=8B=D1=82=D1=8B=D0=BC=D0=B8?= =?UTF-8?q?=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B0=D0=BC=D0=B8=201.=20?= =?UTF-8?q?=D0=9F=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0=20=D0=BD=D0=B0?= =?UTF-8?q?=20=D1=82=D0=BE=20=D1=87=D1=82=D0=BE=20=D0=B7=D0=B0=D0=B4=D0=B0?= =?UTF-8?q?=D1=87=D0=B0=20=D0=BF=D1=80=D0=B8=D1=81=D1=83=D1=82=D1=81=D1=82?= =?UTF-8?q?=D0=B2=D1=83=D0=B5=D1=82=20=D0=B2=20=D0=B4=D0=B5=D1=80=D0=B5?= =?UTF-8?q?=D0=B2=D0=B5=20=D0=B8=D0=BB=D0=B8=20=D0=B2=D0=BE=D0=BE=D0=B1?= =?UTF-8?q?=D1=89=D0=B5=20=D0=B8=D0=B7=20=D1=8D=D1=82=D0=BE=D0=B3=D0=BE=20?= =?UTF-8?q?=D1=80=D0=B5=D0=BF=D0=BE=D0=B7=D0=B8=D1=82=D0=BE=D1=80=D0=B8?= =?UTF-8?q?=D1=8F=20#30=202.=20=D0=A3=D0=B1=D1=80=D0=B0=D0=BD=D1=8B=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B2=D1=82=D0=BE=D1=80=D1=8B=20=D0=BA=D0=BE=D0=B4?= =?UTF-8?q?=D0=B0=20=D0=B2=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD=D0=B0?= =?UTF-8?q?=D1=85=20#24?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/web/repo/issue.go | 2 +- templates/repo/issue/issue_actions.tmpl | 89 ++++++++++ templates/repo/issue/issue_filters.tmpl | 90 ++++++++++ templates/repo/issue/list.tmpl | 204 +--------------------- templates/repo/issue/nav_search_and_new.tmpl | 23 +++ templates/repo/issue/treant_config.tmpl | 20 +++ templates/repo/issue/tree.tmpl | 243 ++------------------------- 7 files changed, 243 insertions(+), 428 deletions(-) create mode 100644 templates/repo/issue/issue_actions.tmpl create mode 100644 templates/repo/issue/issue_filters.tmpl create mode 100644 templates/repo/issue/nav_search_and_new.tmpl create mode 100644 templates/repo/issue/treant_config.tmpl 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}} + + {{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" .}} +