Sha256: a14f6e6e4595f4b5dc26433f131042fc3125d1f6c2f4fe1bf62f687d29d3dabc

Contents?: true

Size: 1.02 KB

Versions: 371

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 Caboose.teaser_text(p.body, 100) %></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

371 entries across 371 versions & 1 rubygems

Version Path
caboose-cms-0.7.79 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.78 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.77 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.76 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.75 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.74 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.73 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.72 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.71 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.70 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.69 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.68 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.67 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.66 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.65 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.64 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.63 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.62 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.61 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.7.60 app/views/caboose/posts/admin_index.html.erb