From 43c136200a181858cf36a0a876cb6609aa804120 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 12 Mar 2023 21:39:56 +0100 Subject: [PATCH] Deduplicate template code for label selection menu (#23431) --- .../issue/labels/labels_selector_field.tmpl | 43 ++++++++++++++++++ templates/repo/issue/new_form.tmpl | 45 +------------------ .../repo/issue/view_content/sidebar.tmpl | 44 +----------------- 3 files changed, 45 insertions(+), 87 deletions(-) create mode 100644 templates/repo/issue/labels/labels_selector_field.tmpl diff --git a/templates/repo/issue/labels/labels_selector_field.tmpl b/templates/repo/issue/labels/labels_selector_field.tmpl new file mode 100644 index 0000000000..00d852bba9 --- /dev/null +++ b/templates/repo/issue/labels/labels_selector_field.tmpl @@ -0,0 +1,43 @@ + diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl index 9fd6c99a5b..a99ceb0451 100644 --- a/templates/repo/issue/new_form.tmpl +++ b/templates/repo/issue/new_form.tmpl @@ -36,50 +36,7 @@ {{template "repo/issue/branch_selector_field" .}} - + {{template "repo/issue/labels/labels_selector_field" .}} {{template "repo/issue/labels/labels_sidebar" dict "root" $}}
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index 29bfac7c27..e58f94aff3 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -106,49 +106,7 @@
{{end}} - + {{template "repo/issue/labels/labels_selector_field" .}} {{template "repo/issue/labels/labels_sidebar" dict "root" $}}