<%= render 'admin_panel/sidebar_nav' %>
<%= bootstrap_flash %> <% @posts.each do |post| %>
<% if post.image.mini.to_s != '' %> <%= image_tag post.image.mini.to_s %> <% else %> <% end %>

<%= link_to post.title, post_path(post) %>

<%= t "blog.by" %> <%= post.author.full_name %>, <%= time_ago_in_words(post.created_at) %> <%= t "blog.ago" %>

<%= post.description %>

<%= link_to ''.html_safe, post_path(post), :class => 'btn' %> <%= link_to ''.html_safe, edit_blog_post_path(post), :class => 'btn' %> <%= link_to ''.html_safe, post, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-danger', :id => ['delete_' + post.slug] %>
<% end %>