Orbit/app/views/admin/pages/_form.html.erb

96 lines
4.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) %>
2012-05-13 12:13:26 +00:00
<div class="control-group">
2012-09-12 11:12:50 +00:00
<%= f.label :name, t(:name), :class => 'control-label' %>
2012-05-13 12:13:26 +00:00
<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>
2010-01-08 10:36:36 +00:00
2012-07-25 21:58:09 +00:00
<%= f.fields_for :title_translations do |f| %>
2012-05-13 12:13:26 +00:00
<% @site_valid_locales.each do |locale| %>
<div class="control-group">
2012-09-12 11:12:50 +00:00
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
2012-05-13 12:13:26 +00:00
<div class="controls">
2012-07-25 21:58:09 +00:00
<%= f.text_field locale, :class => 'text input-xlarge', :value => (@item.title_translations[locale] rescue nil) %>
2012-05-13 12:13:26 +00:00
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
</div>
</div>
<% end %>
<% end %>
2010-01-08 10:36:36 +00:00
2012-05-13 12:13:26 +00:00
<div class="control-group">
2012-09-12 11:12:50 +00:00
<%= f.label :name, t(:template_name), :class => 'control-label' %>
2012-05-13 12:13:26 +00:00
<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">
2012-09-12 11:12:50 +00:00
<%= f.label :name, t(:theme), :class => 'control-label' %>
2012-05-13 12:13:26 +00:00
<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">
2012-09-12 11:12:50 +00:00
<%= f.label :name, t(:module), :class => 'control-label' %>
2012-05-13 12:13:26 +00:00
<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">
2012-07-25 21:58:09 +00:00
<%= select('page','category', @categories.collect{|category| [category.title, category.id]}, :selected => @item[:category], :include_blank => true ) rescue ''%>
2012-05-13 12:13:26 +00:00
</span>
2012-05-13 16:33:52 +00:00
<span id="app_page_tag">
<%= select('page','tag', @tags.collect{|tag| [tag[I18n.locale], tag.id]}, :selected => @item[:tag], :include_blank => true ) rescue ''%>
</span>
2012-05-13 12:13:26 +00:00
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
</div>
</div>
<div class="control-group">
2012-09-12 11:12:50 +00:00
<%= f.label :is_published, "#{t(:is_published)} ?", :class => 'control-label' %>
2012-05-13 12:13:26 +00:00
<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">
2012-09-12 11:12:50 +00:00
<%= f.label :menu_enabled_for, "#{t(:menu_enabled_for)}:", :class => 'control-label' %>
2012-05-13 12:13:26 +00:00
<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">
2012-09-12 11:12:50 +00:00
<%= f.label :enabled_for, "#{t(:enabled_for)}:", :class => 'control-label' %>
2012-05-13 12:13:26 +00:00
<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>
2011-12-20 08:47:17 +00:00