Skip to content

Commit

Permalink
Merge pull request #220 from Det-Kongelige-Bibliotek/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
siglun authored Jun 16, 2020
2 parents c9bd78f + c6e1fdd commit a197558
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions app/views/catalog/_facet_pagination.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<div class="prev_next_links btn-group">
<%= link_to_previous_page @pagination, raw(t('views.pagination.previous')), params: search_state.to_h, param_name: blacklight_config.facet_paginator_class.request_keys[:page], class: 'btn btn-link', data: { blacklight_modal: "preserve" } do %>
<%= content_tag :span, raw(t('views.pagination.previous')), class: 'disabled btn btn-disabled' %>
<% end %>

<%= link_to_next_page @pagination, raw(t('views.pagination.next')), params: search_state.to_h, param_name: blacklight_config.facet_paginator_class.request_keys[:page], class: 'btn btn-link', data: { blacklight_modal: "preserve" } do %>
<%= content_tag :span, raw(t('views.pagination.next')), class: 'disabled btn btn-disabled' %>
<% end %>
</div>

<div class="sort-options btn-group">
<% if @pagination.sort == 'index' -%>
<span class="active az btn btn-outline-secondary"><%= t('blacklight.search.facets.sort.index') %></span>
<%= link_to(t('blacklight.search.facets.sort.count'), @pagination.params_for_resort_url('count', search_state.to_h), class: "sort_change numeric btn btn-outline-secondary", data: { blacklight_modal: "preserve" }) %>
<% elsif @pagination.sort == 'count' -%>
<%= link_to(t('blacklight.search.facets.sort.index'), @pagination.params_for_resort_url('index', search_state.to_h), class: "sort_change az btn btn-outline-secondary", data: { blacklight_modal: "preserve" }) %>
<span class="active numeric btn btn-outline-secondary"><%= t('blacklight.search.facets.sort.count') %></span>
<% end -%>
</div>

0 comments on commit a197558

Please sign in to comment.