= form_for @page, html: {multipart: @page.multipart?} do |f| - if @page.errors.any? .row-fluid .alert.alert-error.fade.in.span12 = link_to '×', '#', class: 'close', 'data-dismiss' => 'alert' - @page.errors.full_messages.each do |m| = m This page show edit with template .form-horizontal .control-group = f.label :active, class: 'control-label' .controls= f.check_box :active, class: 'span6' .control-group = f.label :name, class: 'control-label' .controls= f.text_field :name, class: 'span4' .control-group.auto_url = f.label :auto_url, class: 'control-label' .controls = f.check_box :auto_url, class: 'span9' .control-group.url = f.label :url, class: 'control-label' .controls .full_url %span.path>= @page.parent.full_url if @page.parent \/ %span.address>= @page.url = f.text_field :url, class: 'span3' %i.address_icon.icon-pencil = render partial: 'field', collection: @page.fields .accordion .accordion-group .accordion-heading.text-center = link_to t(:settings), '#collapse', class: 'accordion-toggle', 'data-toggle' => 'collapse' .accordion-body.in.collapse#collapse .accordion-inner .control-group = f.label :parent_id, class: 'control-label' .controls = f.select :parent_id, options_for_select(for_select(@pages, true), selected: @parent_id), disabled: @page.self_and_descendants.map(&:id), include_blank: t(:no) .control-group = f.label :template_id, :class => 'control-label' .controls = f.select :template_id, options_for_select(templates, selected: @template_id) .control-group = f.label :link, class: 'control-label' .controls = f.text_field :link, class: 'span9' .control-group %label.control-label=t :display_in .controls %label.checkbox.inline.span2{for: 'in_menu'} = f.check_box :in_menu =t :menu %label.checkbox.inline.span2{for: 'in_map'} = f.check_box :in_map =t :sitemap %label.checkbox.inline.span2{for: 'in_nav'} = f.check_box :in_nav =t :breadcrumbs .accordion .accordion-group .accordion-heading.text-center = link_to t(:seo), '#collapse-three', class: 'accordion-toggle', 'data-toggle' => 'collapse' .accordion-body.in.collapse#collapse-three .accordion-inner .control-group = f.label :title, class: 'control-label' .controls = f.text_field :title, class: 'span9' .control-group = f.label :keywords, class: 'control-label' .controls = f.text_field :keywords, class: 'span9' .control-group = f.label :description, class: 'control-label' .controls = f.text_area :description, class: 'span9', rows: 8 .row-fluid .span12 .form-actions = f.submit class: 'btn btn-primary' = link_to t(:cancel), pages_url, class: 'btn' = link_to t(:delete_page), @page, method: :delete, data: {confirm: t(:are_you_sure?)}, class: 'btn btn-danger pull-right' unless @page.new_record?