Orbit/app/views/admin/page_parts/_module_widget.html.erb

53 lines
2.2 KiB
Plaintext
Raw Normal View History

2013-01-10 10:00:58 +00:00
<div>
2013-01-16 06:07:09 +00:00
<%= f.fields_for :title_translations do |f| %>
2013-01-10 10:00:58 +00:00
<% @site_valid_locales.each do |locale| %>
2013-01-16 06:07:09 +00:00
<div class="control-group">
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}",:class=>"control-label" %>
<div class="controls">
<%= f.text_field locale, :value => (@part.title_translations[locale] rescue nil),:size=>30 %>
</div>
</div>
2013-01-10 10:00:58 +00:00
<% end %>
2013-01-16 06:07:09 +00:00
<% end %>
2013-01-10 10:00:58 +00:00
</div>
2013-01-16 06:07:09 +00:00
<div id="module_app_list" class="control-group">
<label for="page_part[module_app]" class="control-label">
<%= t "default_widget.select_module_app" %>
</label>
<div class="controls">
<%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :module_name, :selected => (@module_app.id rescue nil)), {:include_blank => true }, {:rel => admin_page_parts_path,:id=>"page_module_app_id"} %>
2013-01-16 06:07:09 +00:00
</div>
</div>
2013-01-10 10:00:58 +00:00
2013-01-16 06:07:09 +00:00
<div id="widget_list" class="control-group">
<label for="page_part[widget_path]" class="control-label">
<%= t "default_widget.select_widget_path" %>
</label>
<div class="controls">
2013-02-18 07:13:31 +00:00
<%= f.select :widget_path, @module_app ? @module_app.widgets.collect{|k,v| [I18n.t(v["i18n"]),k]} : [], {}, { :selected => @part.widget_path, :rel => get_widget_field_rel } %>
2013-01-16 06:07:09 +00:00
</div>
</div>
2012-07-16 08:13:38 +00:00
2012-02-28 06:08:57 +00:00
2013-01-10 10:00:58 +00:00
<div id="widget_option">
2013-01-16 06:07:09 +00:00
<div id="widget_data_source_category" class="control-group">
2013-01-21 08:56:37 +00:00
<%= render :partial => 'widget_data_source_category' ,:locals=>{:object=>@part}%>
2013-01-10 10:00:58 +00:00
</div>
2013-01-16 06:07:09 +00:00
<div id="widget_data_source_tag" class="control-group">
2013-01-21 08:56:37 +00:00
<%= render :partial => 'widget_data_source_tag' ,:locals=>{:object=>@part} %>
2013-01-10 10:00:58 +00:00
</div>
2012-02-28 06:08:57 +00:00
2013-01-10 10:00:58 +00:00
</div>
2012-07-16 08:13:38 +00:00
2013-01-10 10:00:58 +00:00
<div id="widget_setting">
2013-01-21 08:56:37 +00:00
<%= render :partial => 'widget_setting' ,:locals=>{:f=>f,:object=>@part} %>
2013-01-10 10:00:58 +00:00
</div>
2013-02-23 10:29:50 +00:00
<div class="control-group" id='data_count'>
<%= render :partial=>'admin/pages/data_count_field',:locals=>{:field_name=>"page_part[widget_data_count]",:field_value=>@part.widget_data_count } %>
</div>
2013-02-23 10:29:50 +00:00