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