2013-10-28 03:37:56 +00:00
|
|
|
<div class="control-group input-content">
|
|
|
|
<label class="control-label muted"><%= t("default_widget.select_widget_style") %></label>
|
|
|
|
<div class="controls">
|
|
|
|
<%= select 'page_part', 'widget_style', @frontend_styles, {:selected => (@part && @part[:widget_style])}, class: "input-xlarge" %>
|
|
|
|
</div>
|
2013-11-07 02:59:00 +00:00
|
|
|
</div>
|
2013-11-15 07:08:59 +00:00
|
|
|
<div class="control-group input-content">
|
|
|
|
<label class="control-label muted">More Link</label>
|
|
|
|
<div class="controls">
|
|
|
|
<%= select 'page_part', 'more_link_page_id', options_for_select(@pages.collect{|page|[page.title,page.id]},(@part.more_link_page_id rescue nil)), class: "input-xlarge" %>
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-11-07 02:59:00 +00:00
|
|
|
|
|
|
|
<div class="control-group input-content">
|
|
|
|
<% @module_app.widget_options.tap { |widget|%>
|
|
|
|
<% widget.each { |w|%>
|
|
|
|
<% w.get_options.each do |key, settings| %>
|
|
|
|
<% options = settings[:opts] %>
|
|
|
|
<%= label_tag(t(settings[:label_i18n], :class=>"control-label muted"))%>
|
|
|
|
<% case options%>
|
|
|
|
<% when Hash%>
|
|
|
|
<div class="controls">
|
|
|
|
<%= select_tag "page_part[widget_options][#{key}]", options_from_collection_for_select(eval(options["query"]), options["value"], options["label"].to_s, :selected => (@part.widget_options[key] rescue nil)), class: "input-xlarge" %>
|
|
|
|
</div>
|
|
|
|
<% else%>
|
|
|
|
<div class="controls">
|
|
|
|
<%= select_tag "page_part[widget_options][#{key}]", options_for_select(options,(@part.widget_options[key] rescue nil)), class: "input-xlarge" %>
|
2013-11-15 07:08:59 +00:00
|
|
|
</div>
|
2013-11-07 02:59:00 +00:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% } %>
|
|
|
|
<% } %>
|
2013-10-28 03:37:56 +00:00
|
|
|
</div>
|