Sha256: 1a3c3c2b320282ad4d99882e37182dd8141e06398d774bb2289b9cfbb98cd587

Contents?: true

Size: 1.03 KB

Versions: 1

Compression:

Stored size: 1.03 KB

Contents

<%
  block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12 posts__edit-categories')
  form = cell(:inputs, :form).new(url: lato_blog.posts_update_categories_path, method: :post, remote: true)
  table = cell(:elements, :table, :container).new
  table_body = cell(:elements, :table, :body).new
%>

<%=raw block.open %>

  <%=raw cell(:elements, :title).new(label: LANGUAGES[:lato_blog][:mixed][:change_categories], size: 6) %>

  <%=raw form.open %>

    <input type="hidden" name="id" value="<%= @post.id %>">

    <%=raw table.open %>

      <%=raw table_body.open %>
        
        <% @categories.each do |category| %>

          <% checkbox = cell(:inputs, :checkbox).new(name: "categories[#{category.id}]", value: @post.categories.include?(category)) %>
          <%=raw cell(:elements, :table, :row).new(labels: [
            {type: 'component', value: checkbox},
            category.title
          ]) %>
          
        <% end %>

      <%=raw table_body.close %>

    <%=raw table.close %>

  <%=raw form.close %>
 
<%=raw block.close %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lato_blog-2.1 app/views/lato_blog/back/posts/shared/edit/_edit_categories.html.erb