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.
orbit-4-1/app/views/admin/page_parts/_module_widget.html.erb

54 lines
2.2 KiB
Plaintext

<div>
<%= f.fields_for :title_translations do |f| %>
<% @site_valid_locales.each do |locale| %>
<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>
<% end %>
<% end %>
</div>
<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 => (@selected[:module_app].id rescue nil)), {:include_blank => true }, {:rel => reload_after_module_changed_admin_page_part_path,:id=>"page_module_app_id"} %>
</div>
</div>
<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">
<%#= @module_app ? @module_app.widgets.collect{|k,v| [I18n.t(v["i18n"]),k]} %>
<%= f.select :widget_path, @app_frontend_urls , {}, { :selected => @selected[:app_frontend_url], :rel => get_widget_field_rel } %>
</div>
</div>
<div id="widget_option">
<div id="widget_data_source_category" class="control-group">
<%= render :partial => 'widget_data_source_category' ,:locals=>{:object=>@part}%>
</div>
<div id="widget_data_source_tag" class="control-group">
<%= render :partial => 'widget_data_source_tag' ,:locals=>{:object=>@part} %>
</div>
</div>
<div id="widget_setting">
<%= render :partial => 'widget_setting' ,:locals=>{:f=>f,:object=>@part} %>
</div>
<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>