Sha256: c20ca16dc44196e6b3305454d490c452dba88e126625146f587c77cb3efec285

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

<div id="settings-dashboard">
  <% cache @settings do %>
    <span id="notice-success" class="notice success"><%= I18n.t("sail.updated") %></span>
    <span id="notice-alert" class="notice alert"><%= I18n.t("sail.failed") %></span>
    <%= render(partial: "search") %>

    <div id="settings-container">
      <% if @number_of_pages > 0 %>
        <%= render(partial: "setting", collection: @settings) %>
      <% else %>
        <h1><%= I18n.t("sail.no_settings") %></h1>
      <% end %>

      <div class="clearfix"></div>
    </div>

    <div id="pagination">
      <div class="clearfix"></div>

      <div class="page-links">
        <%= link_to("", settings_path(page: [params[:page].to_i - 1, 0].max), method: :get, id: "angle-left-link") %>

        <% (0...@number_of_pages).each do |page| %>
          <%= link_to(page + 1, settings_path(page: page), method: :get, class: params[:page].to_i == page || params[:page].blank? && page.zero? ? "active" : "") %>
        <% end %>

        <%= link_to("", settings_path(page: [params[:page].to_i + 1, @number_of_pages - 1].min), method: :get, id: "angle-right-link") %>
      </div>
    </div>
  <% end %>
</div>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sail-2.1.1 app/views/sail/settings/index.html.erb
sail-2.1.0 app/views/sail/settings/index.html.erb