orbit-basic/app/views/admin/page_parts/_widget_options.html.erb

17 lines
895 B
Plaintext

<% if (@module_app && @module_app.widget_options) %>
<%= label_tag('widget_options') %>
<% if @module_app.key.eql?('gallery') %>
<%= t('gallery.gallery') %>
<%= select_tag "page_part[widget_options][album_id]", options_from_collection_for_select(@albums, :id, :name, :selected => (@part.widget_options[key] rescue nil)) %>
<% end %>
<% if @module_app.widget_options.has_key? @part.widget_path%>
<% @module_app.widget_options[@part.widget_path].each do |key,options| %>
<%= label_tag(t(@module_app.widget_options_fields_i18n[@part.widget_path][key]))%>
<%= select_tag "page_part[widget_options][#{key}]", options_for_select(options,(@part.widget_options[key] rescue nil)) %>
<!-- (@part[:widget_field][i][0] if (@part && !@part[:widget_field].blank? && !@part[:widget_field][i].blank?)) ) -->
<% end %>
<% end %>
<% end %>