Skip to content

Commit b2cf24e

Browse files
committed
WIP re-class prev/next widget buttons for legibility in searchPag
1 parent 538f142 commit b2cf24e

13 files changed

+20
-24
lines changed

app/assets/stylesheets/stylesheets/_base_layout.scss

-4
Original file line numberDiff line numberDiff line change
@@ -1157,10 +1157,6 @@ h2[itemprop="name"] {
11571157
padding-bottom: 1em;
11581158
margin-bottom: 0 !important;
11591159
border-bottom: 0 !important;
1160-
a.previous, a.next {
1161-
@extend .btn;
1162-
@extend .btn-outline-secondary;
1163-
}
11641160
}
11651161

11661162
#child-viewer {

app/components/dcv/search_bar/catalog_component.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<%= form_tag @url, method: :get, class: ['d-flex','flex-md-row-reverse','flex-sm-column','w-100'] do %>
1+
<%= form_tag @url, method: :get, class: ['bg-light','d-flex','flex-md-row-reverse','flex-sm-column','w-100'] do %>
22
<%= render_hash_as_hidden_fields(@params.except(:q, :search_field, :qt, :page, :utf8, :format)) %>
33

44
<div class="input-group flex-sm-row flex-md-fill">

app/components/dcv/search_bar/default_component.html.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<%= form_tag @url, method: :get, class: ['d-flex','flex-md-row-reverse','flex-sm-column','w-100'] do %>
1+
<%= form_tag @url, method: :get, class: ['bg-light','d-flex','flex-md-row-reverse','flex-sm-column','w-100'] do %>
22
<%= render_hash_as_hidden_fields(@params.except(:q, :search_field, :qt, :page, :utf8, :format, :slug, :site_slug)) %>
33
<%= render_hash_as_hidden_fields(search_action_params) %>
44
<div class="input-group flex-sm-row flex-md-fill">
@@ -22,7 +22,7 @@
2222
<label for="q" class="sr-only"><%= t('blacklight.search.form.q') %></label>
2323
<%= text_field_tag :q, params[:q], :placeholder => search_placeholder_text, :class => "search_q q flex-fill", :id => "q" %>
2424
<div class="input-group-append">
25-
<%= link_to '<i class="fa fa-remove"></i>'.html_safe, start_over_path, :title => 'Start Over', :class => 'btn btn-outline-secondary reset-btn' if query_has_constraints? %>
25+
<%= link_to '<i class="fa fa-remove"></i>'.html_safe, start_over_path, :title => 'Start Over', :class => 'btn btn-outline-info reset-btn' if query_has_constraints? %>
2626
<button class="btn btn-primary search-btn" type="submit" aria-label="Submit">
2727
<span class="hidden-xs"><%= (current_page?(root_url)? t('blacklight.search.form.submit') : '') %></span>
2828
<span class="fa fa-search"></span>

app/components/dcv/search_bar/durst_component.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<%= form_tag @url, method: :get, class: ['d-flex','flex-md-row-reverse','flex-sm-column','w-100'] do %>
1+
<%= form_tag @url, method: :get, class: ['bg-light','d-flex','flex-md-row-reverse','flex-sm-column','w-100'] do %>
22
<% params_for_new_search = @params.except(:q, :search_field, :qt, :page, :utf8, :format)
33
params_for_new_search[:f] = params_for_new_search[:f].except(:lib_format_sim) if params_for_new_search.has_key?(:f)
44
%>

app/components/dcv/search_bar/repositories_component.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<%= form_tag @url, :method => :get, :class => ['clearfix', 'flex-fill'] do %>
1+
<%= form_tag @url, :method => :get, :class => ['bg-light', 'clearfix', 'flex-fill'] do %>
22
<%= render_hash_as_hidden_fields(@params.except(:q, :search_field, :repository_id, :qt, :page, :utf8, :format).tap { |p| p[:'f[content_availability][]'] = @content_availability if @content_availability }) %>
33

44
<div class="input-group flex-fill">
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<div class="input-group-prepend">
2-
<button class="btn btn-info" type="button" data-toggle="collapse" data-target=".collapseSearch" aria-expanded="true" aria-controls="collapsePrevNext" aria-pressed="true"><i class="previous fa fa-exchange-alt" title="Navigate search results" data-toggle="tooltip" data-original-title="Navigate search results"></i></button>
2+
<button class="btn btn-outline-info" type="button" data-toggle="collapse" data-target=".collapseSearch" aria-expanded="true" aria-controls="collapsePrevNext" aria-pressed="true"><i class="previous fa fa-exchange-alt" title="Navigate search results" data-toggle="tooltip" data-original-title="Navigate search results"></i></button>
33
</div>
44
<div class="p-0 collapse show input-group-prepend collapseSearch" id="collapsePrevNext">
55
<% if params[:return_to_filesystem].present? %>
6-
<%= link_to('<i class="fa fa-reply-all"></i>'.html_safe, params[:return_to_filesystem], class: 'btn btn-outline-secondary rounded-0', :"data-toggle" => 'tooltip', "aria-label": t('views.pagination.return_to_filesystem'), title: t('views.pagination.return_to_filesystem')) %>
6+
<%= link_to('<i class="fa fa-reply-all"></i>'.html_safe, params[:return_to_filesystem], class: 'btn btn-outline-info rounded-0', :"data-toggle" => 'tooltip', "aria-label": t('views.pagination.return_to_filesystem'), title: t('views.pagination.return_to_filesystem')) %>
77
<% else %>
8-
<%= helpers.link_back_to_catalog(label: '<i class="fa fa-reply-all"></i> '.html_safe, class: 'btn btn-outline-secondary rounded-0', :"data-toggle" => 'tooltip', "aria-label": t('views.pagination.return_to_search'), title: t('views.pagination.return_to_search') ) %>
8+
<%= helpers.link_back_to_catalog(label: '<i class="fa fa-reply-all"></i> '.html_safe, class: 'btn btn-outline-info rounded-0', :"data-toggle" => 'tooltip', "aria-label": t('views.pagination.return_to_search'), title: t('views.pagination.return_to_search') ) %>
99
<% if @search_context[:prev] || @search_context[:next] %>
10-
<span class="btn btn-outline-secondary rounded-0" style="pointer-events:none;"><%= item_page_entry_info %></span>
11-
<%= link_to_previous_document @search_context[:prev], "btn btn-outline-secondary btn-sm rounded-0" %>
12-
<%= link_to_next_document @search_context[:next], "btn btn-outline-secondary btn-sm rounded-0" %>
10+
<span class="btn btn-outline-info rounded-0" style="pointer-events:none;"><%= item_page_entry_info %></span>
11+
<%= link_to_previous_document @search_context[:prev], "btn btn-outline-info rounded-0" %>
12+
<%= link_to_next_document @search_context[:next], "btn btn-outline-info rounded-0" %>
1313
<% end %>
1414
<% end %>
1515
</div>

app/views/kaminari/dcv_collapsible/_first_page.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
per_page: number of items to fetch per page
77
remote: data-remote
88
-%>
9-
<% tag_class = "page-link btn btn-outline-secondary rounded-0 #{'disabled' if current_page.first?}" -%>
9+
<% tag_class = "page-link btn btn-outline-info rounded-0 #{'disabled' if current_page.first?}" -%>
1010
<%= link_to '<i class="fa fa-fast-backward"></i>'.html_safe, url, :remote => remote, :"data-toggle" => 'tooltip', "aria-label": raw(t 'views.pagination.first'), title: raw(t 'views.pagination.first'), class: tag_class %>

app/views/kaminari/dcv_collapsible/_gap.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
per_page: number of items to fetch per page
66
remote: data-remote
77
-%>
8-
<%= link_to raw(t 'views.pagination.truncate'), "", class: 'page-link btn btn-secondary disabled rounded-0' %>
8+
<%= link_to raw(t 'views.pagination.truncate'), "", class: 'page-link btn btn-info disabled rounded-0' %>

app/views/kaminari/dcv_collapsible/_last_page.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
per_page: number of items to fetch per page
77
remote: data-remote
88
-%>
9-
<% tag_class = "page-link btn btn-outline-secondary rounded-0 #{'disabled' if current_page.last?}" -%>
9+
<% tag_class = "page-link btn btn-outline-info rounded-0 #{'disabled' if current_page.last?}" -%>
1010
<%= link_to, '<i class="fa fa-fast-forward"></i>'.html_safe, url, remote: remote, "aria-label": raw(t 'views.pagination.last'), title: raw(t 'views.pagination.last'), class: tag_class %>

app/views/kaminari/dcv_collapsible/_next_page.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
per_page: number of items to fetch per page
77
remote: data-remote
88
-%>
9-
<% tag_class = "btn btn-outline-secondary rounded-0 #{'disabled' if current_page.last?}" -%>
9+
<% tag_class = "btn btn-outline-info rounded-0 #{'disabled' if current_page.last?}" -%>
1010
<%= link_to '<i class="fa fa-arrow-right"></i>'.html_safe, url, rel: 'next', remote: remote, :"data-toggle" => 'tooltip', "aria-label": raw(t 'views.pagination.next'), title: raw(t 'views.pagination.next'), class: tag_class %>

app/views/kaminari/dcv_collapsible/_page.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
per_page: number of items to fetch per page
88
remote: data-remote
99
-%>
10-
<% tag_class = "page-item btn btn-outline-secondary rounded-0#{' active' if page.current? }" -%>
10+
<% tag_class = "page-item btn btn-outline-info rounded-0#{' active' if page.current? }" -%>
1111
<%= link_to number_with_delimiter(page.to_s), url, {class: tag_class, remote: remote, rel: (page.next? ? 'next' : page.prev? ? 'prev' : nil)} %>

app/views/kaminari/dcv_collapsible/_paginator.html.erb

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
As of Kaminari 0.15, this paginator doesn't have access to the original collection/scope, so it can't render the page entries info directly.
1616
-%>
1717
<div class="input-group-prepend">
18-
<button class="btn btn-info btn-left" type="button" data-toggle="collapse" data-target=".collapseSearch" aria-expanded="false" aria-controls="collapseQuery" aria-pressed="false">
18+
<button class="btn btn-secondary btn-left" type="button" data-toggle="collapse" data-target=".collapseSearch" aria-expanded="false" aria-controls="collapseQuery" aria-pressed="false">
1919
<i class="previous fa fa-exchange-alt toggle-unpressed" title="Navigate search results" data-toggle="tooltip" data-original-title="Navigate search results"></i>
2020
<i class="previous fa fa-search toggle-pressed" title="Start a quick search" data-toggle="tooltip" data-original-title="Start a quick search"></i>
2121
</button>
@@ -26,11 +26,11 @@
2626
in here .. -%>
2727
<%= paginator.render do -%>
2828
<%= first_page_tag %>
29-
<span class="btn btn-outline-secondary rounded-0" style="pointer-events:none;"><%= page_entries_info %></span>
29+
<span class="btn btn-outline-info rounded-0" style="pointer-events:none;"><%= page_entries_info %></span>
3030
<%= prev_page_tag %>
3131
<%= next_page_tag %>
3232
<% end -%>
3333
<% else -%>
34-
<span class="btn btn-outline-secondary rounded-0" style="pointer-events:none;"><%= page_entries_info %></span>
34+
<span class="btn btn-outline-info rounded-0" style="pointer-events:none;"><%= page_entries_info %></span>
3535
<% end -%>
3636
</div>

app/views/kaminari/dcv_collapsible/_prev_page.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
per_page: number of items to fetch per page
77
remote: data-remote
88
-%>
9-
<% tag_class="btn btn-outline-secondary rounded-0 #{'disabled' if current_page.first?}" -%>
9+
<% tag_class="btn btn-outline-info rounded-0 #{'disabled' if current_page.first?}" -%>
1010
<%= link_to '<i class="fa fa-arrow-left"></i>'.html_safe, url, :rel => 'next', :remote => remote, :"data-toggle" => 'tooltip', "aria-label": raw(t 'views.pagination.previous'), title: raw(t 'views.pagination.previous'), class: tag_class %>

0 commit comments

Comments
 (0)