Sha256: 918307c66b3f10bf179eee77d80b88fe7e872c80b6f526053bfebf963c8a85f7

Contents?: true

Size: 1.29 KB

Versions: 6

Compression:

Stored size: 1.29 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/#{params[:id]}/posts", 'slug', params) -%></th>
      <th style="width: 20%;"><%= sort_link("admin/blogs/#{params[:id]}/posts", 'title', params) -%></th>
      <th style="width: 10%;"><%= sort_link("admin/blogs/#{params[:id]}/posts", 'state', params) -%></th>
      <th style="width: 10%;"><%= sort_link("admin/blogs/#{params[: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"><%= crud_links_for_actions_and_paths :show => admin_blog_post_path(@blog, post), :edit => edit_admin_blog_post_path(@blog, post), :destroy => admin_blog_post_path(@blog, post) -%></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

6 entries across 6 versions & 1 rubygems

Version Path
blog_logic-1.2.4 app/views/admin/posts/index.html.erb
blog_logic-1.2.3 app/views/admin/posts/index.html.erb
blog_logic-1.2.2 app/views/admin/posts/index.html.erb
blog_logic-1.2.1 app/views/admin/posts/index.html.erb
blog_logic-1.2.0 app/views/admin/posts/index.html.erb
blog_logic-1.1.9 app/views/admin/posts/index.html.erb