orbit-basic/app/views/admin/items/_form_page.html.erb

93 lines
4.0 KiB
Plaintext
Raw Normal View History

2013-10-23 07:51:49 +00:00
<div id="page" class="hide">
<%= form_for :page, url: admin_pages_path, remote: true do |f| %>
<fieldset>
<div id="page_error"></div>
<%= f.hidden_field :parent, class: "parent" %>
<%= f.label :name, content_tag(:i, nil, :class => "icons-star") + t(:name) %>
<%= f.text_field :name, class: 'input-xlarge', placeholder: t(:name), id: 'name' %>
<span class="help-block"><%= t("front_page.name_field_helper") %></span>
<%= f.fields_for :title_translations do |f| %>
<% @site_in_use_locales.each do |locale| %>
2013-10-23 07:51:49 +00:00
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}" %>
<%= f.text_field locale, class: 'input-xlarge', placeholder: "#{t(:title)} #{I18nVariable.from_locale(locale)}", id: locale %>
<% end %>
<% end %>
<%= f.label :design, t(:template_name) %>
<%= select_tag "page[design]", nil, class: "input-xlarge change" %>
<%= f.label :theme, t(:theme) %>
<%= select_tag "page[theme_id]", nil, class: "input-xlarge", include_blank: true %>
2013-10-23 07:51:49 +00:00
<%= f.label :module_app_id, t(:module) %>
<%= select_tag "page[module_app_id]", nil, class: "input-xlarge change", include_blank: true %>
2013-10-23 07:51:49 +00:00
<div id="front_url" class="hide">
<%= f.label :app_frontend_url, t('front_page.display_mode') %>
<%= select_tag "page[app_frontend_url]", nil, class: "input-xlarge change" %>
</div>
2013-11-07 11:14:53 +00:00
<div class="checkbox-groups hide" id="page-category-groups" data-for="category">
2013-10-23 07:51:49 +00:00
<%= f.label :categories, t(:categories) %>
<%= content_tag :label, class: "checkbox" do %>
<%= check_box_tag nil, nil, true, class: "select_all" %> <%= t(:all) %>
2013-10-23 07:51:49 +00:00
<% end %>
<div class="groups" id="page-category"></div>
2013-11-07 11:14:53 +00:00
<input type="hidden">
2013-10-23 07:51:49 +00:00
</div>
2013-11-07 11:14:53 +00:00
<div class="checkbox-groups hide" id="page-tags-groups" data-for="tag">
2013-10-23 07:51:49 +00:00
<%= f.label :tags, t(:tags) %>
<%= content_tag :label, class: "checkbox" do %>
<%= check_box_tag nil, nil, true, class: "select_all" %> <%= t(:all) %>
2013-10-23 07:51:49 +00:00
<% end %>
<div class="groups" id="page-tags"></div>
2013-11-07 11:14:53 +00:00
<input type="hidden">
2013-10-23 07:51:49 +00:00
</div>
<div class="display-mode"></div>
2013-12-12 04:49:20 +00:00
<div id="front_count" class="front_count hide">
2013-10-23 07:51:49 +00:00
<%= f.label :frontend_data_count, t(:frontend_data_count) %>
<%= select_tag "page[frontend_data_count]", nil, class: "input-mini", id: "page_count" %>
2013-10-23 07:51:49 +00:00
</div>
<div class="checkbox-groups" id="page-is-published">
<%= f.label :is_published, t(:is_published) %>
<p>
<label class="radio inline">
<%= f.radio_button :is_published, true %> <%= t(:yes_) %>
</label>
<label class="radio inline">
<%= f.radio_button :is_published, false, checked: "checked" %> <%= t(:no_) %>
</label>
</p>
</div>
2013-10-23 10:28:09 +00:00
<div class="link-options checkbox-groups hide">
2013-10-23 07:51:49 +00:00
<label><%= t(:activation_link) %></label>
<% @site_in_use_locales.each do |valid_locale| %>
2013-10-23 07:51:49 +00:00
<div class="active-link <%= valid_locale %>">
<label class="checkbox">
<%= check_box_tag 'page[enabled_for][]', valid_locale, false, class: "lang-enable" %> <%= I18nVariable.from_locale(valid_locale) %>
</label>
<div class="active-mune">
<span><%= t(:menu_enable) %></span>
<label class="radio inline">
<%= radio_button_tag "page[menu_enabled_for][#{valid_locale}]", false, true %> <%= t(:no_) %>
</label>
<label class="radio inline">
<%= radio_button_tag "page[menu_enabled_for][#{valid_locale}]", true, false %> <%= t(:yes_) %>
</label>
</div>
</div>
<% end %>
</div>
<div class="form-actions">
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
<%= f.submit t(:submit), class: 'btn btn-primary btn-small' %>
</div>
</fieldset>
<% end %>
</div>