2013-01-21 08:56:37 +00:00
|
|
|
<% case object%>
|
|
|
|
<% when PagePart %>
|
|
|
|
<% object_name = 'page_part' %>
|
|
|
|
<% field_name = 'widget_field' %>
|
2013-03-28 10:29:24 +00:00
|
|
|
<% reload_rel = reload_after_widget_field_changed_admin_page_part_path %>
|
2013-01-21 08:56:37 +00:00
|
|
|
<% when Page %>
|
|
|
|
<% object_name = 'page' %>
|
|
|
|
<% field_name = 'frontend_field' %>
|
2013-03-28 10:29:24 +00:00
|
|
|
<% reload_rel = reload_after_widget_field_changed_admin_pages_path %>
|
2013-01-21 08:56:37 +00:00
|
|
|
<% end %>
|
|
|
|
|
2013-01-16 06:07:09 +00:00
|
|
|
<div class="style_switch control-group">
|
|
|
|
<label class="control-label">
|
2013-01-21 08:56:37 +00:00
|
|
|
<%= t("default_widget.fields_") %>
|
2013-01-16 06:07:09 +00:00
|
|
|
</label>
|
2013-07-02 08:46:44 +00:00
|
|
|
<div id="widget_field" class="clear controls">
|
2013-01-10 10:00:58 +00:00
|
|
|
|
|
|
|
|
2013-01-14 10:49:23 +00:00
|
|
|
<div class="rows clear">
|
|
|
|
<span class="span4">
|
|
|
|
<label for="widget_field"><%= t "default_widget.fields_order" %></label>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="span3">
|
|
|
|
<label for="widget_field"><%= t "default_widget.fields_style" %></label>
|
|
|
|
</span>
|
|
|
|
<span class="span5"></span>
|
|
|
|
</div>
|
2013-01-10 10:00:58 +00:00
|
|
|
|
2013-04-01 09:06:10 +00:00
|
|
|
<% @selected[:module_app].widget_fields.each_with_index do |widget_field, i| %>
|
2013-01-14 10:49:23 +00:00
|
|
|
<div class="rows clear">
|
|
|
|
<span class="span4">
|
|
|
|
<%= i+1 %>
|
2013-03-28 10:29:24 +00:00
|
|
|
<%= select_tag "#{object_name}[#{field_name}][][field_name]", widget_field_options(i), :include_blank => true ,:class=>'widget_field_select',:field_seri => i ,:id=>"#{object_name}_#{field_name}_#{i}",:rel=>reload_rel%>
|
2013-01-14 10:49:23 +00:00
|
|
|
</span>
|
|
|
|
<span class="span3">
|
2013-04-01 09:06:10 +00:00
|
|
|
<%= select_tag "#{object_name}[#{field_name}][][class]", widget_field_class_options(i), :include_blank => true %> <br />
|
2013-01-14 10:49:23 +00:00
|
|
|
</span>
|
2013-02-18 07:13:31 +00:00
|
|
|
<span class="span5 link_switch_holder">
|
2013-02-23 07:19:51 +00:00
|
|
|
<%= link_to_field_switch(i,object_name,field_name) %>
|
2013-02-18 07:13:31 +00:00
|
|
|
</span>
|
|
|
|
</div><br/>
|
2013-01-10 10:00:58 +00:00
|
|
|
<% end %>
|
2013-01-14 10:49:23 +00:00
|
|
|
</div>
|
2013-01-16 06:07:09 +00:00
|
|
|
</div>
|