diff options
Diffstat (limited to 'app/views/shared/issuable/form/_type_selector.html.haml')
-rw-r--r-- | app/views/shared/issuable/form/_type_selector.html.haml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/app/views/shared/issuable/form/_type_selector.html.haml b/app/views/shared/issuable/form/_type_selector.html.haml new file mode 100644 index 00000000000..7a8120d2d02 --- /dev/null +++ b/app/views/shared/issuable/form/_type_selector.html.haml @@ -0,0 +1,30 @@ +- return unless issuable.supports_issue_type? && can?(current_user, :admin_issue, @project) + +.form-group.row.gl-mb-0 + = form.label :type, 'Type', class: 'col-form-label col-sm-2' + .col-sm-10 + .issuable-form-select-holder.selectbox.form-group.gl-mb-0 + .dropdown.js-issuable-type-filter-dropdown-wrap + %button.dropdown-menu-toggle{ type: 'button', 'data-toggle' => 'dropdown' } + %span.dropdown-toggle-text.is-default + = issuable.issue_type.capitalize || _("Select type") + = icon('chevron-down') + .dropdown-menu.dropdown-menu-selectable.dropdown-select + .dropdown-title.gl-display-flex + %span.gl-ml-auto + = _("Select type") + %button.dropdown-title-button.dropdown-menu-close.gl-ml-auto{ "aria-label" => _('Close') } + = sprite_icon('close', size: 16, css_class: 'dropdown-menu-close-icon') + .dropdown-content + %ul + %li.js-filter-issuable-type + = link_to new_project_issue_path(@project), class: ("is-active" if issuable.issue?) do + = _("Issue") + %li.js-filter-issuable-type + = link_to new_project_issue_path(@project, { issuable_template: 'incident', issue: { issue_type: 'incident' } }), class: ("is-active" if issuable.incident?) do + = _("Incident") + - if issuable.incident? + %p.form-text.text-muted + - incident_docs_url = help_page_path('operations/incident_management/incidents.md', anchor: 'create-and-manage-incidents-in-gitlab') + - incident_docs_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: incident_docs_url } + = _('A %{incident_docs_start}modified issue%{incident_docs_end} to guide the resolution of incidents.').html_safe % { incident_docs_start: incident_docs_start, incident_docs_end: '</a>'.html_safe } |