Revision 9d060de2
Added by Amos Benari almost 12 years ago
- ID 9d060de2bdc6864ac6b5cc2c0a5820c6b518bba1
app/helpers/application_helper.rb | ||
---|---|---|
end
|
||
|
||
def action_buttons(*args)
|
||
content_tag(:div, :class => "btn-toolbar btn-toolbar-condensed") do
|
||
toolbar_action_buttons args
|
||
end
|
||
end
|
||
|
||
def toolbar_action_buttons(*args)
|
||
# the no-buttons code is needed for users with less permissions
|
||
return unless args
|
||
args = args.flatten.map{|arg| arg unless arg.blank?}.compact
|
||
... | ... | |
|
||
#multiple buttons
|
||
primary = args.delete_at(0)
|
||
|
||
content_tag(:div,:class => "btn-group") do
|
||
primary + link_to(content_tag(:span, '', :class=>'caret'),'#', :class=>'btn dropdown-toggle', :'data-toggle'=>'dropdown') +
|
||
content_tag(:ul,:class=>"dropdown-menu") do
|
Also available in: Unified diff
fixed dropdown location for action button and bookmark.