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/pages/_form.html.erb

53 lines
2.1 KiB
Plaintext
Raw Normal View History

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) %>
2009-05-22 06:43:52 +00:00
<p>
<%= f.label :name, t('admin.name') %>
<%= 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 %>
<% end %>
2010-01-08 10:36:36 +00:00
2009-05-22 06:43:52 +00:00
<p>
<%= 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} %>
</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>
<%= f.label :is_published, "#{t('admin.is_published')} ?" %>
<%= f.radio_button :is_published, true %>Yes <%= f.radio_button :is_published, false %> No
</p>
<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>
<p>
<%= f.label :enabled_for, "#{t('admin.enabled_for')}:" %>
<% @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