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.
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>
|
|
|
|
|
|
|
|
<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" %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% } %>
|
|
|
|
<% } %>
|
2013-10-28 03:37:56 +00:00
|
|
|
</div>
|