2011-06-01 02:24:14 +00:00
|
|
|
<%= f.error_messages %>
|
2012-02-19 19:22:53 +00:00
|
|
|
<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
|
2010-01-14 10:30:53 +00:00
|
|
|
|
2009-05-22 06:43:52 +00:00
|
|
|
<p>
|
2011-04-13 10:19:51 +00:00
|
|
|
<%= f.label :name, t('admin.name') %>
|
2011-05-09 10:49:57 +00:00
|
|
|
<%= f.text_field :name, :class => 'text' %>
|
2010-01-08 10:36:36 +00:00
|
|
|
</p>
|
|
|
|
|
2012-02-17 06:54:11 +00:00
|
|
|
<%= f.fields_for :i18n_variable, (@item.new_record? ? @item.build_i18n_variable : @item.i18n_variable) do |f| %>
|
|
|
|
<% @site_valid_locales.each do |locale| %>
|
|
|
|
<p>
|
|
|
|
<%= f.label :locale, "#{t('admin.title')} #{I18nVariable.from_locale(locale)}" %>
|
|
|
|
<%= f.text_field locale %>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
2011-04-13 10:19:51 +00:00
|
|
|
<% end %>
|
2010-01-08 10:36:36 +00:00
|
|
|
|
2009-05-22 06:43:52 +00:00
|
|
|
<p>
|
2011-08-23 18:06:27 +00:00
|
|
|
<%= t('admin.design_name') %>
|
2012-02-17 06:54:11 +00:00
|
|
|
<%= f.collection_select :design, @designs, :id, :title, {:selected => @design.id}, {:rel => admin_pages_path} %>
|
2011-08-23 18:06:27 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<%= t('admin.theme') %>
|
2012-02-17 06:54:11 +00:00
|
|
|
<%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %>
|
2009-05-22 06:43:52 +00:00
|
|
|
</p>
|
2011-12-20 08:47:17 +00:00
|
|
|
<p>
|
|
|
|
<%= t('admin.module_app') %>
|
2012-03-30 07:51:29 +00:00
|
|
|
<%= render :partial => "app_selector", :locals => { :f => f } %>
|
2012-02-28 06:08:57 +00:00
|
|
|
<span id="app_page_url"><%= select('page','app_frontend_url', @app_frontend_urls, :selected => @item.app_frontend_url ) rescue ''%> </span>
|
2012-04-29 22:27:38 +00:00
|
|
|
<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>
|
2011-12-20 08:47:17 +00:00
|
|
|
</p>
|
2009-05-22 06:43:52 +00:00
|
|
|
<p>
|
2012-05-05 16:35:13 +00:00
|
|
|
<%= f.label :is_published, "#{t('admin.is_published')} ?" %>
|
|
|
|
<%= f.radio_button :is_published, true %>Yes <%= f.radio_button :is_published, false %> No
|
|
|
|
</p>
|
2012-05-07 07:47:14 +00:00
|
|
|
<p>
|
|
|
|
<%= f.label :menu_enabled_for, "#{t('admin.menu_enabled_for')}:" %>
|
|
|
|
<% @site_valid_locales.each do |valid_locale| %>
|
|
|
|
<%= 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) %>
|
|
|
|
<% end %>
|
|
|
|
<%= hidden_field_tag 'page[menu_enabled_for][]', '' %>
|
|
|
|
</p>
|
2012-05-05 16:35:13 +00:00
|
|
|
<p>
|
2012-05-05 19:36:01 +00:00
|
|
|
<%= f.label :enabled_for, "#{t('admin.enabled_for')}:" %>
|
2012-05-05 16:35:13 +00:00
|
|
|
<% @site_valid_locales.each do |valid_locale| %>
|
|
|
|
<%= check_box_tag 'page[enabled_for][]', valid_locale, (@item.enabled_for.nil? ? true : @item.enabled_for.include?(valid_locale)) %>
|
|
|
|
<%= I18nVariable.from_locale(valid_locale) %>
|
|
|
|
<% end %>
|
|
|
|
<%= hidden_field_tag 'page[enabled_for][]', '' %>
|
2009-05-22 06:51:32 +00:00
|
|
|
</p>
|
2011-12-20 08:47:17 +00:00
|
|
|
|