Sha256: acb1da303d87a1646ddd49e28160041ea0572bb23d09356dba9342e8ccd54d2e

Contents?: true

Size: 1.48 KB

Versions: 5

Compression:

Stored size: 1.48 KB

Contents

<%- set_title 'Blog Posts' -%>

<%- if @posts.empty? -%>
  <p><em>No posts have been written yet.</em></p>
<%- else -%>
  <table class="standard">
    <tr>
      <th style="width: 20%;"><%= sort_link("admin/blogs/#{@blog.id}/posts", 'slug', params) -%></th>
      <th style="width: 20%;"><%= sort_link("admin/blogs/#{@blog.id}/posts", 'title', params) -%></th>
      <th style="width: 10%;"><%= sort_link("admin/blogs/#{@blog.id}/posts", 'state', params) -%></th>
      <th style="width: 10%;"><%= sort_link("admin/blogs/#{@blog.id}/posts", 'publication_date', params) -%></th>
      <th style="width: 5%;"></th>
  </tr>

  <%- @posts.each do |post| -%>
    <tr class="<%= cycle('odd', 'even') -%>">
      <td><%= link_to post.full_path, admin_blog_post_path(@blog, post) -%></td>
      <td><%= post.title -%></td>
      <td><%= post.status -%></td>
      <td><%= post.publication_date.try(:to_s, :concise) -%></td>
      <td class="crud_links">
        <%= link_to image_tag('/images/icons/view.png'), admin_blog_post_path(@blog, post) -%>
        <%= link_to image_tag('/images/icons/edit.png'), edit_admin_blog_post_path(@blog, post) -%>
        <%= link_to image_tag('/images/icons/delete.png'), admin_blog_post_path(@blog, post), :method => :delete, :confirm => 'Are you sure? This action cannot be undone.' -%>
      </td>
    </tr>
  <%- end -%>
  </table>
<%- end -%>

<div class="link_block attached table">
  <%= link_to "New Post...", new_admin_blog_post_path(@blog), :class => 'link_button' -%>
</div>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
blog_logic-1.1.7 app/views/admin/posts/index.html.erb
blog_logic-1.1.6 app/views/admin/posts/index.html.erb
blog_logic-1.1.5 app/views/admin/posts/index.html.erb
blog_logic-1.1.4 app/views/admin/posts/index.html.erb
blog_logic-1.1.3 app/views/admin/posts/index.html.erb