<%= f.error_messages %> <%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %> <div class="control-group"> <%= f.label :name, t('admin.name'), :class => 'control-label' %> <div class="controls"> <%= f.text_field :name, :class => 'text input-xlarge' %> <!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> --> </div> </div> <%= f.fields_for :i18n_variable, (@item.new_record? ? @item.build_i18n_variable : @item.i18n_variable) do |f| %> <% @site_valid_locales.each do |locale| %> <div class="control-group"> <%= f.label :locale, "#{t('admin.title')} #{I18nVariable.from_locale(locale)}", :class => 'control-label' %> <div class="controls"> <%= f.text_field locale, :class => 'text input-xlarge' %> <!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> --> </div> </div> <% end %> <% end %> <div class="control-group"> <%= f.label :name, t('admin.design_name'), :class => 'control-label' %> <div class="controls"> <%= f.collection_select :design, @designs, :id, :title, {:selected => @design.id}, {:rel => admin_pages_path} %> <!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> --> </div> </div> <div class="control-group"> <%= f.label :name, t('admin.theme'), :class => 'control-label' %> <div class="controls"> <%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %> <!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> --> </div> </div> <div class="control-group"> <%= f.label :name, t('admin.module_app'), :class => 'control-label' %> <div class="controls"> <%= render :partial => "app_selector", :locals => { :f => f } %> <span id="app_page_url"> <%= select('page','app_frontend_url', @app_frontend_urls, :selected => @item.app_frontend_url ) rescue ''%> </span> <span id="app_page_category"> <%= select('page','category', @categories.collect{|category| [category.i18n_variable[I18n.locale], category.id]}, :selected => @item[:category], :include_blank => true ) rescue ''%> </span> <span id="app_page_tag"> <%= select('page','tag', @tags.collect{|tag| [tag[I18n.locale], tag.id]}, :selected => @item[:tag], :include_blank => true ) rescue ''%> </span> <!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> --> </div> </div> <div class="control-group"> <%= f.label :is_published, "#{t('admin.is_published')} ?", :class => 'control-label' %> <div class="controls"> <label class="radio"> <%= f.radio_button :is_published, true %> Yes </label> <label class="radio"> <%= f.radio_button :is_published, false %> No </label> <!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> --> </div> </div> <div class="control-group"> <%= f.label :menu_enabled_for, "#{t('admin.menu_enabled_for')}:", :class => 'control-label' %> <div class="controls"> <% @site_valid_locales.each do |valid_locale| %> <label class="checkbox"> <%= check_box_tag 'page[menu_enabled_for][]', valid_locale, (@item.menu_enabled_for.nil? ? true : @item.menu_enabled_for.include?(valid_locale)) %> <%= I18nVariable.from_locale(valid_locale) %> </label> <% end %> <%= hidden_field_tag 'page[menu_enabled_for][]', '' %> <!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> --> </div> </div> <div class="control-group"> <%= f.label :enabled_for, "#{t('admin.enabled_for')}:", :class => 'control-label' %> <div class="controls"> <% @site_valid_locales.each do |valid_locale| %> <label class="checkbox"> <%= check_box_tag 'page[enabled_for][]', valid_locale, (@item.enabled_for.nil? ? true : @item.enabled_for.include?(valid_locale)) %> <%= I18nVariable.from_locale(valid_locale) %> </label> <% end %> <%= hidden_field_tag 'page[enabled_for][]', '' %> <!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> --> </div> </div>