summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2016-07-01 01:40:43 +0100
committerLuke "Jared" Bennett <lbennett@gitlab.com>2016-07-01 01:40:43 +0100
commitd8fba111b20898348e9200612b7f4889f67bd42b (patch)
treead8629f5366843dd5b1b8a98dce83ed0375e4ad8
parent3041c43380ba6e5d8bbc029a9dcfecfdcf7bcf47 (diff)
downloadgitlab-ce-multiple-issue-templates-ui.tar.gz
Started on issue templates UImultiple-issue-templates-ui
-rw-r--r--app/views/shared/issuable/_form.html.haml19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml
index c30bdb0ae91..09fe4379f1e 100644
--- a/app/views/shared/issuable/_form.html.haml
+++ b/app/views/shared/issuable/_form.html.haml
@@ -23,6 +23,25 @@
to prevent a
%strong Work In Progress
merge request from being merged before it's ready.
+
+- if issuable.is_a?(Issue)
+ .form-group
+ = f.label :template, 'Template', class: 'control-label'
+ .col-sm-10
+
+ -# START render 'projects/issues/templates_dropdown' START
+
+ = hidden_field_tag(:template_name, params[:template_name])
+ -# 'data-templates' will be a method in issuables_helper that returns endpoint to get templates 'issue_templates_filter_dropdown_path'
+ = dropdown_tag(h(params[:template_name] || 'Template'), options: { title: 'Filter by template name', toggle_class: 'js-template-select js-filter-submit', filter: true, dropdown_class: 'dropdown-menu-selectable',
+ placeholder: 'Search templates', footer_content: true, data: { field_name: :template_name, selected: params[:template_name], project_id: @project.try(:id), templates: '/namespace/project/issues/templates', default_label: 'Template' } }) do
+ %ul.dropdown-footer-list
+ %li
+ %a.reset-template
+ Reset
+
+ -# END render 'projects/issues/templates_dropdown' END
+
.form-group.detail-page-description
= f.label :description, 'Description', class: 'control-label'
.col-sm-10