Sha256: 806dca487c33bd2a4c7567a88bf026278f23d3fe0ed7758a00d1d1866a5481df

Contents?: true

Size: 991 Bytes

Versions: 11

Compression:

Stored size: 991 Bytes

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><%= 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

11 entries across 11 versions & 1 rubygems

Version Path
caboose-cms-0.8.5 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.8.4 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.8.3 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.8.2 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.8.1 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.85 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.84 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.83 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.82 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.81 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.80 app/views/caboose/posts/admin_index.html.erb