23 lines
777 B
Plaintext
23 lines
777 B
Plaintext
|
%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 = {})
|