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

45 lines
1.3 KiB
Plaintext

<div>
<%= f.fields_for :title_translations do |f| %>
<% @site_valid_locales.each do |locale| %>
<p>
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}" %>
<%= f.text_field locale, :value => (@part.title_translations[locale] rescue nil) %>
</p>
<% end %>
<% end %>
</div>
<span id='module_app_list'>
<%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :label, :selected => @module_app.id), {}, {:rel => admin_page_parts_path} %>
</span>
<span id='widget_list'>
<%#= f.select :widget_path, @module_app.widgets.collect{|widget| [widget.humanize, widget]}, :selected => @part.widget_path %>
<%= f.select :widget_path, @module_app.get_widget_for_select, {}, { :selected => @part.widget_path, :rel => admin_page_parts_path } %>
</span>
<span id='widget_style_list'>
<%#= f.select :widget_style, @widget_style, :selected => @part.widget_style %>
<%= select('page_part','widget_style', @widget_style, :selected => @part[:widget_style], :include_blank => true ) rescue ''%>
</span>
:
<span id="widget_category">
<%= render 'widget_categories' %>
</span>
<%= t :or_lower %>
<span id="widget_tag">
<%= render 'widget_tags' %>
</span>
<span id='widget_field'>
<%= render 'widget_fields' %>
</span>
<div id="widget_data_count">
<%= f.label :widget_data_count %>
<%= f.text_field :widget_data_count %>
</div>