Sha256: 0cc000bcfdccd5bdd4d31cb969baa14c366cdcbc3b8debc313b8bd9e35804c4b
Contents?: true
Size: 1.49 KB
Versions: 10
Compression:
Stored size: 1.49 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", 'humanize_path', 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
10 entries across 10 versions & 1 rubygems