-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dashboard modals, rspec versions and screen reader #487
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
app/views/collections/_button_for_creating_empty_collection.html.erb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
<% if @response.response[:numFound] <= spell_check_max and @response.spelling.words.size > 0 %> | ||
<% if should_show_spellcheck_suggestions? @response %> | ||
<div id="spell"> | ||
<h4 class="suggest"><i>Did you mean to type | ||
<% @response.spelling.words.each_with_index do |word,index| -%> | ||
<% if index > 0 -%>, or <% end -%> | ||
<%= link_to_query(word) -%> | ||
<% end -%> | ||
?</i></h4> | ||
<h4 class="suggest"><em><%= t('blacklight.did_you_mean', options: safe_join(@response.spelling.words.map { |word| link_to_query(word) }, " #{t('blacklight.or')} ")).html_safe %></em></h4> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<% # container for all documents in index view -%> | ||
<div id="documents" class="clear"> | ||
<div id="documents"> | ||
<%= render partial: 'my/_index_partials/default_group', locals: {docs: @response.docs.map { |x| SolrDocument.new(x) }, facet_value: nil} %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
<li class="expandable_new grey"> | ||
<% id = facet_field.label.gsub(" ","_")+"_db" %> | ||
|
||
<a class="accordion-toggle grey" data-toggle="collapse" data-parent="#facet_group" data-target="#collapse_<%= id%>"> | ||
<%= facet_field.label %> <i class="glyphicon glyphicon-chevron-right grey"></i> | ||
</a> | ||
|
||
<div id="collapse_<%= id%>" class="accordion-body collapse"> | ||
<div class="panel panel-default facet_limit blacklight-<%= facet_field.field.parameterize %> <%= 'facet_limit-active' if facet_field_in_params?(facet_field.field) %>"> | ||
<div class="<%= "collapsed" if should_collapse_facet?(facet_field) %> collapse-toggle panel-heading" data-toggle="collapse" data-target="#<%= facet_field_id(facet_field) %>"> | ||
<h5 class="panel-title"> | ||
<%= link_to facet_field_label(facet_field.field), "#", :"data-no-turbolink" => true %> | ||
</h5> | ||
</div> | ||
<div id="<%= facet_field_id(facet_field) %>" class="panel-collapse facet-content <%= should_collapse_facet?(facet_field) ? 'collapse' : 'in' %>"> | ||
<div class="panel-body"> | ||
<%= yield %> | ||
</div> | ||
</div> | ||
</li> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<% paginator = Blacklight::Solr::FacetPaginator.new(display_facet.items, | ||
limit: facet_limit_for(solr_field)) %> | ||
<ul class="slide-list"> | ||
<ul class="facet-values list-unstyled"> | ||
<% paginator = facet_paginator(facet_field, display_facet) %> | ||
<% paginator.items.each do |item| -%> | ||
<li> | ||
<% if facet_in_params?( solr_field, item.value ) %> | ||
<%= render_selected_facet_value(solr_field, item) %> | ||
<% else %> | ||
<%= render_facet_value(solr_field, item) %> | ||
<li> | ||
<% if facet_in_params?(solr_field, item.value) %> | ||
<%= render_selected_facet_value(solr_field, item) %> | ||
<% else %> | ||
<%= render_facet_value(solr_field, item) %> | ||
<% end -%> | ||
</li> | ||
<% end %> | ||
|
||
<% if(paginator.has_next?) %> | ||
<li class="more_facets_link"><%= link_to 'more ' + facet_field.label.pluralize + '»', sufia.url_for(params.merge(id: solr_field, action: "facet", path_only: true)), class: "more_facets_link" %></li> | ||
<% end %> | ||
</ul> <!-- /slide-list --> | ||
|
||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
<!-- This was copied from https://github.com/projectblacklight/blacklight/blob/master/app/views/catalog/_facet_pagination.html.erb | ||
It implements the facets in the same manner as blacklight does for the main catalog for the individual's dashbord | ||
--> | ||
<div class="prev_next_links btn-group pull-left"> | ||
<%= link_to_previous_page @pagination, raw(t('views.pagination.previous')), route_set: sufia, params: params, param_name: Blacklight::Solr::FacetPaginator.request_keys[:page], class: 'btn' do %> | ||
<span class="disabled btn"><%= raw(t('views.pagination.previous')) %></span> | ||
<%= link_to_previous_page @pagination, raw(t('views.pagination.previous')), route_set: sufia, params: params, param_name: Blacklight::Solr::FacetPaginator.request_keys[:page], class: 'btn btn-link', data: {ajax_modal: "preserve"} do %> | ||
<span class="disabled btn btn-disabled"><%= raw(t('views.pagination.previous')) %></span> | ||
<% end %> | ||
<%= link_to_next_page @pagination, raw(t('views.pagination.next')), route_set: sufia, params: params, param_name: Blacklight::Solr::FacetPaginator.request_keys[:page], class: 'btn' do %> | ||
|
||
<span class="disabled btn"><%= raw(t('views.pagination.next')) %></span> | ||
<%= link_to_next_page @pagination, raw(t('views.pagination.next')), route_set: sufia, params: params, param_name: Blacklight::Solr::FacetPaginator.request_keys[:page], class: 'btn btn-link', data: {ajax_modal: "preserve"} do %> | ||
<span class="disabled btn btn-disabled"><%= raw(t('views.pagination.next')) %></span> | ||
<% end %> | ||
|
||
</div> | ||
|
||
<div class="sort_options btn-group pull-right"> | ||
<% if @pagination.sort == 'index' -%> | ||
<span class="active az btn"><%= t('blacklight.search.facets.sort.index') %></span><%= link_to_unless(@pagination.sort == 'count', t('blacklight.search.facets.sort.count'), | ||
Sufia::Engine.routes.url_for(@pagination.params_for_resort_url('count', params).symbolize_keys.merge(only_path: true)), | ||
class: "sort_change numeric btn") %> | ||
<span class="active az btn btn-default"><%= t('blacklight.search.facets.sort.index') %></span><%= link_to_unless(@pagination.sort == 'count', t('blacklight.search.facets.sort.count'), | ||
Sufia::Engine.routes.url_for(@pagination.params_for_resort_url('count', params).symbolize_keys.merge(only_path: true)), | ||
class: "sort_change numeric btn btn-default", | ||
data: {ajax_modal: "preserve"}) %> | ||
<% elsif @pagination.sort == 'count' -%> | ||
<%= link_to(t('blacklight.search.facets.sort.index'), | ||
Sufia::Engine.routes.url_for(@pagination.params_for_resort_url('index', params).symbolize_keys.merge(only_path: true)), | ||
class: "sort_change az btn") %><span class="active numeric btn"><%= t('blacklight.search.facets.sort.count') %></span> | ||
<% end -%> | ||
<%= link_to(t('blacklight.search.facets.sort.index'), Sufia::Engine.routes.url_for(@pagination.params_for_resort_url('index', params).symbolize_keys.merge(only_path: true)), | ||
class: "sort_change az btn btn-default", data: {ajax_modal: "preserve"}) %><span class="active numeric btn btn-default"><%= t('blacklight.search.facets.sort.count') %></span> | ||
<% end -%> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
<% # main container for facets/limits menu -%> | ||
<div> | ||
<%= render partial: 'collections/button_for_creating_empty_collection', locals: {label: 'Create Collection'} %> | ||
<div class="row"> </div> | ||
<h2>Browse By</h2> | ||
<ul class="nav nav-list" id="facets"> | ||
<%= render_facet_partials %> | ||
</ul> | ||
<% if has_facet_values? %> | ||
<div id="facets" class="facets sidenav"> | ||
<div class="top-panel-heading panel-heading"> | ||
<button type="button" class="facets-toggle" data-toggle="collapse" data-target="#facet-panel-collapse"> | ||
<span class="sr-only">Toggle facets</span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</button> | ||
<h4> | ||
<%= t('blacklight.search.facets.title') %> | ||
</h4> | ||
</div> | ||
<div id="facet-panel-collapse" class="collapse panel-group"> | ||
<%= render_facet_partials %> | ||
</div> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
<% if @response.total_pages > 1 %> | ||
<div class="pager"> | ||
<%= paginate @response, outer_window: 2, theme: 'blacklight', route_set: sufia %> | ||
<div class="clearfix"></div> | ||
</div><!-- /pager --> | ||
<div class="row record-padding"> | ||
<div class="col-md-9"> | ||
<div class="pagination"> | ||
<%= paginate @response, outer_window: 2, theme: 'blacklight', route_set: sufia %> | ||
</div> | ||
</div> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious why this method is protected now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an override from Blacklight::Catalog, in which it is also protected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, OK!