mailr/app/views/common/_multiselect.html.haml
Wojciech Todryk 0daf487816 dev cont
2012-03-24 13:23:34 +01:00

23 lines
777 B
Plaintext
Executable file

%select{:multiple=>"multiple",:class=>"#{style}",:id=>"#{id}",:name=>"#{name}"}
- objects.each do |o|
- option_value = escape_once(o.send(value))
- option_text = [option_value]
- unless text.nil?
- option_text = []
- text.each do |t|
- option_text << o.send(t)
- option_text = option_text.join(joiner)
- option_text.gsub!(/^\./,'')
- if selected_objects.include?(o)
%option{:value=>"#{option_value}",:selected=>"selected"}
= option_text
- else
%option{:value=>"#{option_value}"}
= option_text
-#<%= raw multi_select("", 'folders_to_show[]', @folders, @folders_shown,t(:shown,:scope=>:folder),:id,"",{:text => [:parent,:delim,:name]}) %>
-#def multi_select(id, name, objects, selected_objects, label, value,joiner,content = {})