Sha256: e9de9973e6db1d9dff1238fc4155605c616bec9df135873a8d8efd8212e7f504

Contents?: true

Size: 986 Bytes

Versions: 122

Compression:

Stored size: 986 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 %>';">
        <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

122 entries across 122 versions & 1 rubygems

Version Path
caboose-cms-0.9.45 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.44 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.43 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.40 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.38 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.37 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.35 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.34 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.33 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.32 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.31 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.30 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.29 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.28 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.27 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.26 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.25 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.24 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.23 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.22 app/views/caboose/posts/admin_index.html.erb