= fields.hidden_field :lock_version = fields.hidden_field :parent_id = fields.hidden_field :class_name = render_region :form_top, :locals => {:f => fields} - render_region :form, :locals => {:f => fields} do |form| - form.edit_title do %p.title %label{:for=>'page_title'}= t('page_title') = fields.text_field :title, :class => 'textbox', :required => true, :size => 100 - form.edit_extended_metadata do .drawer .drawer_contents#attributes %table.fieldset = render :partial => 'meta_row', :collection => @meta, :locals => {:f => fields} = render :partial => 'admin/page_fields/page_field', :collection => @page.fields = render_region :extended_metadata, :locals => {:f => fields} .drawer_handle %a.toggle{:href=>'#attributes', :rel=>'toggle[attributes]', :class=>"#{(meta_errors? ? 'less' : 'more')}"} = meta_label %i.fas.fa-angle-down - form.edit_page_parts do #tab_control #tabs.tabs #tab_toolbar %a.popup{:href=> '#add_part_popup', :title=>t('add_part')} %i.fas.fa-plus-circle #pages.pages = render :partial => 'admin/page_parts/page_part', :collection => @page.parts = render_region :parts_bottom, :locals => {:f => fields} .set - render_region :layout, :locals => {:f => fields} do |layout| - layout.edit_layout do .layout = fields.label :layout_id, t('layout') = fields.select :layout_id, [[t('select.inherit') , '']] + Layout.all.map { |s| [s.name, s.id] } - layout.edit_type do .page-type = fields.label :class_name, t('page_type') = fields.select :class_name, [[t('select.normal'), '']] + Page.descendants.map { |p| [p.display_name, p.name] }.sort_by { |p| p.first } - layout.edit_status do - if current_user.admin? || current_user.editor? .status = fields.label :status_id, t('status') = fields.select :status_id, Status.selectable.map { |s| [s.name, s.id] } - layout.edit_published_at do .published-date #published_at{:class => (@page.published? ? '' : 'hidden')} = fields.label :published_at, t('publish_datetime') = fields.text_field :published_at, class: 'datetime', type: 'datetime-local', value: (@page.published_at? ? @page.published_at.strftime('%Y-%m-%dT%H:%M') : nil) = render_region :layout_row, :locals => {:f => fields} .error.hidden %span#published-at-error - render_region :form_bottom, :locals => {:f => fields} do |form_bottom| - form_bottom.edit_buttons do - @buttons_partials.each do |partial| = render :partial => partial, :locals => {:f => fields} .page-actions = save_model_button(@page) = save_model_and_continue_editing_button(@page) = submit_tag(t('preview', :default => 'Preview'), :class => 'button', :id => 'show-preview') = t('or') = link_to t('cancel'), admin_pages_url, class: 'alt' #preview_panel.fullcover.grey_out{:style => 'display: none;'} %iframe{:id => 'page-preview', :class => 'fullcover', :name => 'page-preview', :src => ActionController::Base.relative_url_root.to_s + '/loading-iframe.html', :frameborder => 0, :scrolling => 'auto'} .preview_tools =link_to(t('edit_page'), {}, :class => 'button cancel') - form_bottom.edit_timestamp do = updated_stamp @page