Sha256: 472dae04ffc933113d7ac2a7f5c1d4c4d6ecd7025900ca94d12d27216acf1ac9
Contents?: true
Size: 1.65 KB
Versions: 1
Compression:
Stored size: 1.65 KB
Contents
<h1><%= @title %></h1> <table> <thead> <tr> <% if @things.blank? %> <%= "There are no #{@human_model.downcase.pluralize} in the database." %> <% else %> <% @things.first.each_key do |heading| %> <th> <%= heading %> </th> <% end %> <% end %> </tr> </thead> <tbody> <% @things.each do |thing| %> <tr> <% thing.each do |heading, value| %> <td label="<%= heading %>: "> <%= value %> </td> <div class="actions"> <td><%= link_to("Edit #{@title}", edit_thing_path(@model_name, thing)) %></td> <td><%= link_to("Show #{@title}", thing_path(@model_name, thing)) %></td> </div> <% end %> </tr> <% end %> </tbody> </table> <nav class="navigation" role="navigation"> <ul> <% unless @page == 1 %> <!-- First Page --> <li> <%= link_to('1', thing_page_path(@model_name, @page - 1)) %> </li> <% end %> <% if @page > 1 %> <!-- Previous Page --> <li> <%= link_to("#{page - 1}", thing_page_path(@model_name, @page - 1)) %> </li> <% end %> <% unless @total_page == 1 %> <!-- Current Page --> <li> <a><%= @page %></a> </li> <% end %> <% if @page < @total_pages %> <!-- Next Page --> <li> <%= link_to("#{@page + 1}", thing_page_path(@model_name, @page + 1)) %> </li> <% end %> <% unless @page == @total_pages %> <!-- Last Page --> <li> <%= link_to("#{@total_pages}", thing_page_path(@model_name, @total_pages)) %> </li> <% end %> </ul> </nav>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ceo-0.1.1 | app/views/admin/index.html.erb |