crispgm/holy-images

View on GitHub
app/views/index/index.html.erb

Summary

Maintainability
Test Coverage
<%= render partial: "index/flash" %>

<% @images.each do |image| %>
  <%= render partial: "image/image", object: image %>
<% end %>

<div class="section">
  <div class="section-wrap info">
    <div class="section-item">
      <div class="section-title">
        <%= t(:index_total) %>: <%= @page[:total] %>,
        <%= t(:index_current) %>: <%= @page[:cur_page] %>,
        <% if @page[:cur_page] > 1 %>
          <%= link_to t(:index_prev), controller: "index", action: "index", p: @page[:cur_page] - 1 %>
        <% else %>
           <%= t(:index_prev) %>
        <% end %>|
        <% if @page[:cur_page] < @page[:total_page] %>
          <%= link_to t(:index_next), controller: "index", action: "index", p: @page[:cur_page] + 1 %>
        <% else %>
           <%= t(:index_next) %>
        <% end %>
      </div>
    </div>
  </div>
</div>