diff options
Diffstat (limited to 'app/views/protected_branches/shared/_dropdown.html.haml')
-rw-r--r-- | app/views/protected_branches/shared/_dropdown.html.haml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/views/protected_branches/shared/_dropdown.html.haml b/app/views/protected_branches/shared/_dropdown.html.haml new file mode 100644 index 00000000000..c5dbf8991cd --- /dev/null +++ b/app/views/protected_branches/shared/_dropdown.html.haml @@ -0,0 +1,21 @@ +- toggle_classes = local_assigns.fetch(:toggle_classes, '') + += f.hidden_field(:name) + += dropdown_tag(_('Select branch or create wildcard'), + options: { toggle_class: "js-protected-branch-select js-filter-submit wide monospace #{toggle_classes}", + filter: true, + dropdown_class: "dropdown-menu-selectable git-revision-dropdown", + dropdown_qa_selector: "protected_branch_dropdown_content", + placeholder: _("Search protected branches"), + footer_content: true, + data: { show_no: true, show_any: true, show_upcoming: true, + selected: params[:protected_branch_name], + project_id: @project.try(:id), + qa_selector: "protected_branch_dropdown" } }) do + + %ul.dropdown-footer-list + %li + %button{ class: "dropdown-create-new-item-button js-dropdown-create-new-item", title: _("New Protected Branch") } + = _('Create wildcard') + %code |