Sha256: fa85ff4557bef1892403e23e49f36a54681a54d772a337580d4d9a472a5bca84

Contents?: true

Size: 1.02 KB

Versions: 253

Compression:

Stored size: 1.02 KB

Contents

<h1>Posts</h1>
<p><input type='button' value='New Post' onclick="window.location='/admin/posts/new';" /></p>

<% if @posts && @posts.count > 0 %>
  <table class='data'>
    <tr>
      <%= raw @gen.sortable_table_headings({
  				'id'         => 'ID #',
          'published'  => 'Published',
  				'title'	     => 'Title',
  				'body'       => 'Body',
  				'created_at' => 'Date Created'
  			})
  		%>
    </tr>
    <% @posts.each do |p| %>
      <tr onclick="window.location='/admin/posts/<%= p.id %>/edit';">
        <td><%= raw p.id %></td>
        <td><%= p.published ? "Yes" : "No" %></td>
        <td><%= raw p.title %></td>
        <td><%= raw truncate(p.body, :length => 80) %></td>
        <td><%= p.created_at.strftime("%m/%d/%Y") %></td>    
      </tr>
    <% end %>
  </table>
  <p><%= raw @gen.generate %></p>
<% else %>
  <p>There are no posts right now.</p>
<% end %>

<% content_for :caboose_js do %>
<script type='text/javascript'>
$(document).ready(function() { 
  var modal = new CabooseModal(800);
});
</script>
<% end %>

Version data entries

253 entries across 253 versions & 1 rubygems

Version Path
caboose-cms-0.4.126 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.125 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.124 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.123 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.122 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.121 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.120 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.119 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.118 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.117 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.116 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.115 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.114 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.113 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.112 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.111 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.110 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.109 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.108 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.4.106 app/views/caboose/posts/admin_index.html.erb