56 lines
1.9 KiB
Plaintext
56 lines
1.9 KiB
Plaintext
<% case object%>
|
|
<% when PagePart %>
|
|
<% object_name = 'page_part' %>
|
|
<% field_name = 'widget_field' %>
|
|
<% data_count = 'widget_data_count' %>
|
|
<% when Page %>
|
|
<% object_name = 'page' %>
|
|
<% field_name = 'frontend_field' %>
|
|
<% data_count = 'frontend_data_count' %>
|
|
<% end %>
|
|
|
|
<div class="style_switch control-group">
|
|
<label class="control-label">
|
|
<%= t("default_widget.fields_") %>
|
|
</label>
|
|
<div id="widget_field" class="well clear controls">
|
|
|
|
|
|
<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>
|
|
|
|
<% @module_app.widget_fields.each_with_index do |widget_field, i| %>
|
|
<div class="rows clear">
|
|
<span class="span4">
|
|
<%= i+1 %>
|
|
<%= select_tag "#{object_name}[#{field_name}][]", widget_field_options(i), :include_blank => true ,:class=>'widget_field_select',:field_seri => i ,:id=>"#{object_name}_#{field_name}_#{i}"%>
|
|
</span>
|
|
<span class="span3">
|
|
<%= select_tag "#{object_name}[#{field_name}_type][]", widget_fiield_type_options(i), :include_blank => true %> <br />
|
|
</span>
|
|
<span class="span5 link_switch_holder">
|
|
<%= field_link_switch(i,object_name,field_name) %>
|
|
</span>
|
|
</div><br/>
|
|
<% end %>
|
|
<br/>
|
|
<div class="rows clear">
|
|
<span class="span4">
|
|
<%= label_tag t("default_widget.widget_data_count") %>
|
|
</span>
|
|
</div>
|
|
<div class="rows clear">
|
|
<span class="span4">
|
|
<%= text_field_tag "#{object_name}[#{data_count}]",object.send(data_count) %>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div> |