<%= form_for @post, url: {action: @post.new_record? ? :create : :update}, html: {class: 'form-post row', id: 'form-post'} do |f| %> <%= f.hidden_field :draft_id, value: @post.draft? ? @post.id : '' %>

<% if !@post.new_record? %> <%= "#{t('admin.page_title.edit')} #{@post_type.the_title}: #{@post_decorate.the_title}" %> <%= raw @post_decorate.the_status.html_safe %> <% end %> <%#= raw(t('admin.page_title.edit') + " " + @post_type.the_title.to_s + ": " + @post_decorate.the_title + " #{@post_decorate.the_status}") if !@post.new_record? %> <%= link_to raw("#{t('admin.button.view_draft')}"), {action: :edit, id: @post.drafts.pluck('id')}, id: "view_draft", class: "label label-warning label-form", title: "#{t('admin.button.view_draft')}", target: '_blank' if @post.drafts.present? %> <%= t('admin.page_title.create') + " " + @post_type.the_title.to_s if @post.new_record? %>

<%= render partial: 'layouts/admin/form_error', locals: {data: @post} %> <%= hidden_field :meta, :slug %>
<%= f.label t('admin.table.title') %> *
<%= f.text_field :title, :class => "form-control required translatable title-post" %>
<% if @post.manage_content?(@post_type) %>
<%= f.label t('admin.sidebar.content') %> *
<%= f.text_area :content, :class => "form-control tinymce_textarea required translatable", :height => '520px', :style => "width: 100%" %>
<% end %> <% if @post.manage_summary?(@post_type) %>

<% end %> <% if @post.manage_keywords?(@post_type) %>

"/>
<% end %>
<%= render partial: "admin/settings/custom_fields/render", locals: {record: @post, field_groups: @post.get_field_groups({kind: "Post", include_parent: true})} %> <% unless @post.draft? || @post.new_record? %> <% if @post.manage_comments?(@post_type) %> <% end %> <% end %>
<%= render "sidebar", f: f %> <% end %> <% add_asset_library('tinymce', 'post') %>