diff options
author | Phil Hughes <me@iamphill.com> | 2016-03-07 15:41:05 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-03-10 13:54:54 +0000 |
commit | cae03f8b2bc13c4bba3a7905776a04580efe300d (patch) | |
tree | 08d17a9ddbcdb0e3153f8f6c034e894e579d8536 | |
parent | 4407532911c2fb4841cc51f9779ef51ccb6de099 (diff) | |
download | gitlab-ce-cae03f8b2bc13c4bba3a7905776a04580efe300d.tar.gz |
Custom ID & toggle class on dropdown
-rw-r--r-- | app/helpers/dropdowns_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/dropdowns_helper.rb b/app/helpers/dropdowns_helper.rb index c96b6eeebd5..a5728968ae1 100644 --- a/app/helpers/dropdowns_helper.rb +++ b/app/helpers/dropdowns_helper.rb @@ -1,8 +1,8 @@ module DropdownsHelper - def dropdown_tag(toggle_text, title: false, filter: false, placeholder: "", &block) + def dropdown_tag(toggle_text, id: nil, toggle_class: nil, title: false, filter: false, placeholder: "", &block) content_tag :div, class: "dropdown" do dropdown_output = "" - dropdown_output += content_tag :button, class: "dropdown-menu-toggle", type: "button", data: {toggle: "dropdown"} do + dropdown_output += content_tag :button, class: "dropdown-menu-toggle #{toggle_class}", id: id, type: "button", data: {toggle: "dropdown"} do output = toggle_text output << icon('chevron-down') output.html_safe |