Merge branch 'new_widget_setting_interface'
This commit is contained in:
commit
91afad23ba
|
@ -6,7 +6,6 @@
|
||||||
<%= f.radio_button :kind, kind, :class => 'part_kind' %>
|
<%= f.radio_button :kind, kind, :class => 'part_kind' %>
|
||||||
<%= t(kind, :scope => 'page_part_kinds') %>
|
<%= t(kind, :scope => 'page_part_kinds') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% LIST[:page_part_kinds].each do |kind| %>
|
<% LIST[:page_part_kinds].each do |kind| %>
|
||||||
<div id='<%= "part_#{kind}" %>' class='part_kind_partial' style="display:<%= kind.eql?(@part.kind) ? 'block' : 'none' %>">
|
<div id='<%= "part_#{kind}" %>' class='part_kind_partial' style="display:<%= kind.eql?(@part.kind) ? 'block' : 'none' %>">
|
||||||
<%= render :partial => kind, :locals => {:f => f} %>
|
<%= render :partial => kind, :locals => {:f => f} %>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
<div style="display:block" class="part_kind_partial" id="part_module_widget">
|
|
||||||
<div>
|
<div>
|
||||||
<%= f.fields_for :title_translations do |f| %>
|
<%= f.fields_for :title_translations do |f| %>
|
||||||
<% @site_valid_locales.each do |locale| %>
|
<% @site_valid_locales.each do |locale| %>
|
||||||
|
@ -38,4 +37,3 @@
|
||||||
|
|
||||||
</span> -->
|
</span> -->
|
||||||
|
|
||||||
</div>
|
|
|
@ -1,13 +0,0 @@
|
||||||
<% if (@module_app && @module_app.widget_fields) %>
|
|
||||||
|
|
||||||
<%= label_tag('widget_field') %>
|
|
||||||
|
|
||||||
<% @module_app.widget_fields.each_with_index do |widget_field, i| %>
|
|
||||||
<%= i+1 %>
|
|
||||||
<%= select_tag "page_part[widget_field][]", widget_field_options(i), :include_blank => true %>
|
|
||||||
<%= select_tag "page_part[widget_field_type][]", widget_fiield_type_options(i), :include_blank => true %> <br />
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= label_tag :widget_data_count %>
|
|
||||||
<%= text_field_tag :widget_data_count,@part.widget_data_count %>
|
|
||||||
<% end %>
|
|
|
@ -1,17 +0,0 @@
|
||||||
<% 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 %>
|
|
|
@ -1,8 +1,7 @@
|
||||||
<% if !@part.widget_path.blank? %>
|
|
||||||
<% if show_default_widget_setting_panel %>
|
<% if show_default_widget_setting_panel %>
|
||||||
$('#widget_setting').html("<%= j render :partial => 'default_widget_style_panel' %>");
|
$('#widget_setting').html("<%= j render :partial => 'default_widget_style_panel' %>");
|
||||||
$('#widget_setting').append("<%= j render :partial => 'default_widget_setting' %>");
|
$('#widget_setting').append("<%= j render :partial => 'default_widget_setting' %>");
|
||||||
<% elsif show_custom_widget_setting_panel %>
|
<% elsif show_custom_widget_setting_panel %>
|
||||||
$('#widget_setting').html("<%= j render :partial => 'custom_widget_setting' %>");
|
$('#widget_setting').html("<%= j render :partial => 'custom_widget_setting' %>");
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
|
|
|
@ -35,4 +35,5 @@ zh_tw:
|
||||||
no_description: 沒有描述
|
no_description: 沒有描述
|
||||||
widget_option:
|
widget_option:
|
||||||
horizontal: 水平圖片數量
|
horizontal: 水平圖片數量
|
||||||
vertical: 垂直圖片數量
|
vertical: 垂直圖片數量
|
||||||
|
album: 相簿
|
Loading…
Reference in New Issue