This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/views/admin/page_parts/_module_widget.html.erb

52 lines
1.9 KiB
Plaintext
Raw Normal View History

<div>
2012-07-25 21:58:09 +00:00
<%= f.fields_for :title_translations do |f| %>
<% @site_valid_locales.each do |locale| %>
<p>
2012-09-12 11:12:50 +00:00
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}" %>
2012-07-25 21:58:09 +00:00
<%= 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, :title, :selected => @module_app.id), {}, {:rel => admin_page_parts_path} %>
</span>
<span id='widget_list'>
2012-07-26 08:39:29 +00:00
<%#= f.select :widget_path, @module_app.widgets.collect{|widget| [widget.humanize, widget]}, :selected => @part.widget_path %>
<%= f.select :widget_path, @module_app.widgets.collect{|k,v| [k.humanize, k]}, {}, { :selected => @part.widget_path, :rel => admin_page_parts_path } %>
2012-07-16 08:13:38 +00:00
</span>
<span id='widget_style_list'>
2012-08-20 09:14:13 +00:00
<%#= 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 ''%>
2012-02-28 06:08:57 +00:00
</span>
:
2012-02-28 06:08:57 +00:00
<span id="widget_category">
2012-02-28 14:00:05 +00:00
<%= render 'widget_categories' %>
</span>
2012-05-09 16:27:12 +00:00
<%= t :or_lower %>
<span id="widget_tag">
<%= render 'widget_tags' %>
2012-07-16 08:13:38 +00:00
</span>
2012-07-26 08:39:29 +00:00
<span id='widget_field'>
2012-08-09 07:25:30 +00:00
<%= render 'widget_fields' %>
<%#= f.label :widget_field %>
<%# @module_app.widget_fields.each_with_index do |widget_field, i| %>
<%#= i+1 %>
<%#= select_tag "page_part[widget_field][]", options_for_select(@module_app.widget_fields.collect{|widget_field| [widget_field.humanize, widget_field]}, (@part.widget_field ? @part.widget_field[i] : nil) ), :include_blank => true %> <br />
<%# end %>
2012-07-26 08:39:29 +00:00
<%#= select_tag "page_part[widget_field][]", options_for_select(@module_app.widget_fields.collect{|widget_field| [widget_field.humanize, widget_field]}, @part.widget_field.collect{|widget_field| widget_field}), {:multiple => :multiple, :size => 6} %>
</span>
2012-12-28 07:30:46 +00:00
<span id="widget_options">
<%= render 'widget_options' %>
</span>