-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an index page for collections. Fixes #58
- Loading branch information
Showing
12 changed files
with
151 additions
and
30 deletions.
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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
<%= paginate paginate_compact, page_entries_info: page_entries_info(paginate_compact), theme: :blacklight_compact, route_set: collections %> |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<% if show_pagination? and @response.total_pages > 1 %> | ||
<div class="row record-padding"> | ||
<div class="col-md-9"> | ||
<div class="pagination"> | ||
<%= paginate @response, :outer_window => 2, :theme => 'blacklight', route_set: collections %> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<h2 class="sr-only top-content-title"><%= t('blacklight.search.search_results_header') %></h2> | ||
|
||
<% @page_title = t('blacklight.search.title', :application_name => application_name) %> | ||
|
||
|
||
<% content_for(:head) do -%> | ||
<%= render_opensearch_response_metadata %> | ||
<% end -%> | ||
|
||
|
||
<%= render 'search_header' %> | ||
|
||
<h2 class="sr-only"><%= t('blacklight.search.search_results') %></h2> | ||
|
||
<%- if @response.empty? %> | ||
<%= render "zero_results" %> | ||
<%- elsif render_grouped_response? %> | ||
<%= render_grouped_document_index %> | ||
<%- else %> | ||
<%= render_document_index %> | ||
<%- end %> | ||
|
||
<%= render 'results_pagination' %> |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div id="sidebar" class="col-md-3 col-sm-4"> | ||
<%= render 'search_sidebar' %> | ||
</div> | ||
|
||
<div id="content" class="col-md-9 col-sm-8"> | ||
<h2>Collections</h2> | ||
<%= render 'search_results' %> | ||
</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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" class="no-js"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
|
||
<!-- Mobile viewport optimization h5bp.com/ad --> | ||
<meta name="HandheldFriendly" content="True"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||
|
||
<!-- Internet Explorer use the highest version available --> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
|
||
<!-- Mobile IE allows us to activate ClearType technology for smoothing fonts for easy reading --> | ||
<!--[if IEMobile]> | ||
<meta http-equiv="cleartype" content="on"> | ||
<![endif]--> | ||
|
||
<title><%= render_page_title %></title> | ||
<%= opensearch_description_tag application_name, opensearch_catalog_url(:format => 'xml') %> | ||
<%= favicon_link_tag 'favicon.ico' %> | ||
<%= stylesheet_link_tag "application", media: "all" %> | ||
<%= javascript_include_tag "application" %> | ||
<%= csrf_meta_tags %> | ||
<%= content_for(:head) %> | ||
|
||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> | ||
<!--[if lt IE 9]> | ||
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> | ||
<![endif]--> | ||
|
||
</head> | ||
<body class="<%= render_body_class %>"> | ||
<%= render :partial => 'shared/header_navbar' %> | ||
|
||
<%= render partial: 'shared/ajax_modal' %> | ||
|
||
<div id="main-container" class="container"> | ||
<%= render :partial=>'/flash_msg', layout: 'shared/flash_messages' %> | ||
|
||
<div class="row"> | ||
<%= yield %> | ||
</div> | ||
</div> | ||
|
||
<%= render :partial => 'shared/footer' %> | ||
</body> | ||
</html> |
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,3 +1,3 @@ | ||
Hydra::Collections::Engine.routes.draw do | ||
resources :collections, except: :index | ||
end | ||
Hydra::Collections::Engine.routes.draw do | ||
resources :collections | ||
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
gem 'kaminari', github: 'harai/kaminari', branch: 'route_prefix_prototype' |
11 changes: 3 additions & 8 deletions
11
spec/test_app_templates/app/views/catalog/_sort_and_per_page.html.erb
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,13 +1,8 @@ | ||
<div id="sortAndPerPage"> | ||
<div class="page_links"> | ||
<%= render :partial => "paginate_compact" %> | ||
</div> | ||
<%= render :partial => 'sort_widget' %> | ||
|
||
<%= render :partial => 'per_page_widget' %> | ||
|
||
<div id="sortAndPerPage" class="clearfix"> | ||
<%= render "paginate_compact", object: @response if show_pagination? %> | ||
<%= button_for_create_collection %> | ||
|
||
<%= render partial: 'collections/form_for_select_collection', locals: {user_collections: @user_collections} %> | ||
</div> | ||
|
||
</div> |