<%= render Spina::Forms::GroupComponent.new(label: Spina::Admin::Conferences::Blog::Category.human_attribute_name(:category)) do %> <%= render Spina::Forms::LabelComponent.new(f, :category) %> <%= f.select :category_id, Spina::Admin::Conferences::Blog::Category.all.collect{|u| [u.name, u.id]}, {prompt: true}, class: 'form-select', data: {controller: "select-placeholder", action: "select-placeholder#update"} %> <% end %>
<%= render Spina::Forms::GroupComponent.new(label: Spina::Admin::Conferences::Blog::Category.human_attribute_name(:draft), description: Spina::Admin::Conferences::Blog::Post.human_attribute_name(:draft_description)) do %> <%= render Spina::Forms::LabelComponent.new(f, :draft) %> <%= render Spina::Forms::SwitchComponent.new(f, :draft) %> <% end %>
<%= render Spina::Forms::GroupComponent.new(label: Spina::Admin::Conferences::Blog::Category.human_attribute_name(:featured), description: Spina::Admin::Conferences::Blog::Post.human_attribute_name(:featured_description)) do %> <%= render Spina::Forms::LabelComponent.new(f, :featured) %> <%= render Spina::Forms::SwitchComponent.new(f, :featured) %> <% end %>
<%= render Spina::Forms::GroupComponent.new(label: Spina::Admin::Conferences::Blog::Category.human_attribute_name(:slug), description: Spina::Admin::Conferences::Blog::Category.human_attribute_name(:slug_description)) do %> <%= render Spina::Forms::LabelComponent.new(f, :slug) %> <%= render Spina::Forms::TextFieldComponent.new(f, :slug) %> <% if @post.slug %>
Current permalink: /blog/posts/<%= @post.slug %>
<% end %> <% end %>
<%= render Spina::Forms::GroupComponent.new(label: Spina::Admin::Conferences::Blog::Category.human_attribute_name(:published_at)) do %> <%= render Spina::Forms::LabelComponent.new(f, :published_at) %> <%= render Spina::Forms::TextFieldComponent.new(f, :published_at) %> <% end %>
<%= render Spina::Forms::GroupComponent.new(label: Spina::Admin::Conferences::Blog::Category.human_attribute_name(:spina_user)) do %> <%= render Spina::Forms::LabelComponent.new(f, :spina_user) %> <%= f.select :user_id, Spina::User.all.collect{|u| [u.name, u.id]}, {prompt: true}, class: 'form-select', data: {controller: "select-placeholder", action: "select-placeholder#update"} %> <% end %>