blacklight 5.19.2 → 6.0.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -3
- data/.hound.yml +2 -0
- data/.jshintrc +67 -0
- data/.rubocop_hound.yml +4 -0
- data/.travis.yml +11 -8
- data/Gemfile +11 -21
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/app/assets/javascripts/blacklight/blacklight.js +1 -0
- data/app/assets/javascripts/blacklight/core.js +5 -19
- data/app/assets/javascripts/blacklight/facet_load.js +23 -0
- data/app/assets/stylesheets/blacklight/_balanced_list.scss +18 -0
- data/app/assets/stylesheets/blacklight/_blacklight_base.scss +5 -1
- data/app/assets/stylesheets/blacklight/_bookmark.scss +14 -6
- data/app/assets/stylesheets/blacklight/_constraints.scss +52 -0
- data/app/assets/stylesheets/blacklight/_controls.scss +61 -0
- data/app/assets/stylesheets/blacklight/_facets.scss +31 -4
- data/app/assets/stylesheets/blacklight/_header.scss +17 -3
- data/app/assets/stylesheets/blacklight/_pagination.scss +21 -0
- data/app/assets/stylesheets/blacklight/_search_results.scss +28 -0
- data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +0 -3
- data/app/controllers/concerns/blacklight/bookmarks.rb +1 -1
- data/app/controllers/concerns/blacklight/catalog.rb +3 -45
- data/app/controllers/concerns/blacklight/controller.rb +29 -18
- data/app/controllers/concerns/blacklight/default_component_configuration.rb +4 -3
- data/app/controllers/concerns/blacklight/facet.rb +1 -0
- data/app/controllers/concerns/blacklight/request_builders.rb +4 -107
- data/app/controllers/concerns/blacklight/search_fields.rb +1 -1
- data/app/controllers/concerns/blacklight/search_helper.rb +8 -160
- data/app/controllers/saved_searches_controller.rb +1 -1
- data/app/controllers/search_history_controller.rb +18 -1
- data/app/helpers/blacklight/blacklight_helper_behavior.rb +17 -85
- data/app/helpers/blacklight/catalog_helper_behavior.rb +4 -48
- data/app/helpers/blacklight/component_helper_behavior.rb +9 -2
- data/app/helpers/blacklight/configuration_helper_behavior.rb +3 -43
- data/app/helpers/blacklight/facets_helper_behavior.rb +10 -6
- data/app/helpers/blacklight/layout_helper_behavior.rb +0 -8
- data/app/helpers/blacklight/render_constraints_helper_behavior.rb +9 -10
- data/app/helpers/blacklight/render_partials_helper.rb +1 -3
- data/app/helpers/blacklight/url_helper_behavior.rb +15 -187
- data/{lib → app/models}/blacklight/abstract_repository.rb +0 -15
- data/{lib → app/models}/blacklight/configuration.rb +22 -59
- data/app/models/blacklight/configuration/context.rb +47 -0
- data/{lib → app/models}/blacklight/configuration/facet_field.rb +1 -0
- data/{lib → app/models}/blacklight/configuration/field.rb +0 -0
- data/{lib → app/models}/blacklight/configuration/fields.rb +2 -6
- data/{lib → app/models}/blacklight/configuration/search_field.rb +0 -0
- data/{lib → app/models}/blacklight/configuration/solr_field.rb +0 -0
- data/{lib → app/models}/blacklight/configuration/sort_field.rb +0 -0
- data/{lib → app/models}/blacklight/configuration/tool_config.rb +0 -0
- data/app/models/blacklight/configuration/view_config.rb +9 -0
- data/app/models/blacklight/facet_paginator.rb +14 -28
- data/{lib → app/models}/blacklight/search_builder.rb +16 -24
- data/app/models/blacklight/solr/facet_paginator.rb +6 -2
- data/{lib → app/models}/blacklight/solr/repository.rb +0 -21
- data/{lib → app/models}/blacklight/solr/request.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response.rb +9 -8
- data/{lib → app/models}/blacklight/solr/response/facets.rb +37 -29
- data/{lib → app/models}/blacklight/solr/response/group.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response/group_response.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response/more_like_this.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response/pagination_methods.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response/response.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response/spelling.rb +2 -1
- data/{lib → app/models}/blacklight/solr/search_builder.rb +0 -0
- data/app/models/concerns/blacklight/document.rb +11 -27
- data/app/models/concerns/blacklight/document/active_model_shim.rb +8 -0
- data/app/models/concerns/blacklight/solr/document.rb +8 -3
- data/{lib → app/models/concerns}/blacklight/solr/search_builder_behavior.rb +21 -33
- data/app/models/concerns/blacklight/user.rb +0 -9
- data/app/models/record_mailer.rb +0 -1
- data/app/presenters/blacklight/document_presenter.rb +23 -13
- data/app/views/blacklight/nav/_saved_searches.html.erb +1 -1
- data/app/views/blacklight/nav/_search_history.html.erb +1 -1
- data/app/views/bookmarks/_tools.html.erb +1 -2
- data/app/views/bookmarks/index.html.erb +2 -2
- data/app/views/catalog/_document_default.atom.builder +4 -2
- data/app/views/catalog/_facet_index_navigation.html.erb +9 -0
- data/app/views/catalog/_facet_layout.html.erb +2 -3
- data/app/views/catalog/_facet_pagination.html.erb +19 -21
- data/app/views/catalog/_facets.html.erb +2 -3
- data/app/views/catalog/_home_text.html.erb +2 -3
- data/app/views/catalog/_index_header_default.html.erb +2 -2
- data/app/views/catalog/_per_page_widget.html.erb +1 -1
- data/app/views/catalog/_search_form.html.erb +21 -18
- data/app/views/catalog/_sort_widget.html.erb +1 -1
- data/app/views/catalog/_zero_results.html.erb +2 -2
- data/app/views/catalog/facet.html.erb +3 -0
- data/app/views/catalog/index.atom.builder +1 -1
- data/app/views/layouts/blacklight.html.erb +2 -2
- data/app/views/saved_searches/index.html.erb +6 -7
- data/app/views/search_history/index.html.erb +5 -5
- data/app/views/shared/_header_navbar.html.erb +2 -2
- data/blacklight.gemspec +5 -5
- data/config/locales/blacklight.de.yml +1 -4
- data/config/locales/blacklight.en.yml +2 -7
- data/config/locales/blacklight.es.yml +1 -4
- data/config/locales/blacklight.fr.yml +1 -4
- data/config/locales/blacklight.it.yml +1 -4
- data/config/locales/blacklight.pt-BR.yml +1 -4
- data/config/routes.rb +9 -0
- data/db/migrate/20140202020201_create_searches.rb +1 -1
- data/db/migrate/20140202020202_create_bookmarks.rb +1 -1
- data/lib/blacklight.rb +5 -82
- data/lib/blacklight/engine.rb +0 -5
- data/lib/blacklight/parameters.rb +13 -0
- data/lib/blacklight/path.rb +143 -0
- data/lib/blacklight/routes.rb +3 -134
- data/lib/blacklight/routes/exportable.rb +25 -0
- data/lib/blacklight/routes/searchable.rb +20 -0
- data/lib/blacklight/solr.rb +1 -9
- data/lib/blacklight/utils.rb +2 -44
- data/lib/generators/blacklight/controller_generator.rb +7 -4
- data/lib/generators/blacklight/install_generator.rb +16 -9
- data/lib/generators/blacklight/models_generator.rb +18 -0
- data/lib/generators/blacklight/templates/catalog_controller.rb +85 -91
- data/lib/generators/blacklight/test_support_generator.rb +22 -15
- data/solr/conf/_rest_managed.json +3 -0
- data/solr/conf/admin-extra.html +31 -0
- data/solr/conf/elevate.xml +36 -0
- data/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/solr/conf/protwords.txt +21 -0
- data/solr/conf/schema.xml +621 -0
- data/solr/conf/scripts.conf +24 -0
- data/solr/conf/solrconfig.xml +391 -0
- data/solr/conf/spellings.txt +2 -0
- data/solr/conf/stopwords.txt +58 -0
- data/solr/conf/stopwords_en.txt +58 -0
- data/solr/conf/synonyms.txt +31 -0
- data/solr/conf/xslt/example.xsl +132 -0
- data/solr/conf/xslt/example_atom.xsl +67 -0
- data/solr/conf/xslt/example_rss.xsl +66 -0
- data/solr/conf/xslt/luke.xsl +337 -0
- data/solr/sample_solr_documents.yml +1 -0
- data/spec/controllers/blacklight/base_spec.rb +17 -0
- data/spec/controllers/blacklight/search_helper_spec.rb +25 -297
- data/spec/controllers/catalog_controller_spec.rb +7 -6
- data/spec/controllers/saved_searches_controller_spec.rb +1 -0
- data/spec/controllers/search_history_controller_spec.rb +1 -0
- data/spec/features/alternate_controller_spec.rb +10 -10
- data/spec/features/bookmarks_spec.rb +8 -22
- data/spec/features/facets_spec.rb +27 -7
- data/spec/features/record_view_spec.rb +4 -13
- data/spec/features/search_formats_spec.rb +1 -26
- data/spec/features/sitelinks_search_box.rb +1 -1
- data/spec/helpers/blacklight_helper_spec.rb +8 -38
- data/spec/helpers/catalog_helper_spec.rb +0 -8
- data/spec/helpers/configuration_helper_spec.rb +0 -25
- data/spec/helpers/facets_helper_spec.rb +12 -11
- data/spec/helpers/hash_as_hidden_fields_spec.rb +7 -7
- data/spec/helpers/layout_helper_spec.rb +0 -7
- data/spec/helpers/render_constraints_helper_spec.rb +4 -2
- data/spec/helpers/url_helper_spec.rb +13 -254
- data/spec/lib/blacklight/parameters_spec.rb +22 -0
- data/spec/lib/blacklight/path_spec.rb +254 -0
- data/spec/lib/blacklight_spec.rb +6 -2
- data/spec/models/blacklight/configuration/context_spec.rb +33 -0
- data/spec/models/blacklight/document/active_model_shim_spec.rb +33 -0
- data/spec/models/blacklight/document_spec.rb +29 -1
- data/spec/models/blacklight/facet_paginator_spec.rb +14 -13
- data/spec/models/blacklight/search_builder_spec.rb +17 -23
- data/spec/models/blacklight/solr/facet_paginator_spec.rb +11 -1
- data/spec/models/blacklight/solr/response/facets_spec.rb +19 -25
- data/spec/models/blacklight/solr/response/group_response_spec.rb +5 -5
- data/spec/models/blacklight/solr/response_spec.rb +0 -11
- data/spec/models/blacklight/solr/search_builder_spec.rb +49 -57
- data/spec/presenters/document_presenter_spec.rb +15 -42
- data/spec/routing/catalog_routing_spec.rb +7 -11
- data/spec/spec_helper.rb +4 -42
- data/spec/support/controller_level_helpers.rb +17 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -2
- data/spec/views/_user_util_links.html.erb_spec.rb +1 -1
- data/spec/views/catalog/_facet_index_navigation.html.erb_spec.rb +40 -0
- data/spec/views/catalog/_facet_layout.html.erb_spec.rb +1 -1
- data/spec/views/catalog/_facets.html.erb_spec.rb +2 -2
- data/spec/views/catalog/_paginate_compact.html.erb_spec.rb +1 -1
- data/spec/views/catalog/_show_tools.html.erb_spec.rb +8 -8
- data/spec/views/catalog/_sort_and_per_page.html.erb_spec.rb +2 -2
- data/tasks/blacklight.rake +25 -30
- metadata +93 -71
- data/app/assets/stylesheets/blacklight/_catalog.scss +0 -229
- data/app/controllers/concerns/blacklight/search_history.rb +0 -31
- data/app/views/catalog/_refworks_form.html.erb +0 -6
- data/lib/blacklight/configuration/view_config.rb +0 -71
- data/lib/blacklight/rails/routes.rb +0 -29
- data/lib/blacklight/solr_helper.rb +0 -9
- data/lib/generators/blacklight/templates/config/initializers/blacklight_initializer.rb +0 -9
- data/spec/helpers/component_helper_spec.rb +0 -19
- data/spec/lib/blacklight/routes_spec.rb +0 -25
- data/spec/lib/blacklight/solr_helper_spec.rb +0 -12
- data/spec/routing/routes_spec.rb +0 -20
- data/spec/views/catalog/_document_action.html.erb_spec.rb +0 -21
@@ -1 +1 @@
|
|
1
|
-
<%= link_to t('blacklight.header_links.saved_searches'), saved_searches_path %>
|
1
|
+
<%= link_to t('blacklight.header_links.saved_searches'), blacklight.saved_searches_path %>
|
@@ -1 +1 @@
|
|
1
|
-
<%= link_to t('blacklight.header_links.search_history'), search_history_path %>
|
1
|
+
<%= link_to t('blacklight.header_links.search_history'), blacklight.search_history_path %>
|
@@ -1,8 +1,7 @@
|
|
1
1
|
<ul class="<%= controller_name %>Tools nav nav-pills">
|
2
|
-
<%= render_show_doc_actions document_list, document: nil, document_list: @document_list, url_opts:
|
2
|
+
<%= render_show_doc_actions document_list, document: nil, document_list: @document_list, url_opts: Blacklight::Parameters.sanitize(params) do |config, inner| %>
|
3
3
|
<li>
|
4
4
|
<%= inner %>
|
5
5
|
</li>
|
6
6
|
<% end %>
|
7
|
-
<%= render_marc_tools %>
|
8
7
|
</ul>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<% @page_title = t('blacklight.bookmarks.page_title', :application_name => application_name) %>
|
2
2
|
|
3
3
|
<div id="content" class="col-md-12">
|
4
|
-
<
|
4
|
+
<h2 class='page-heading'><%= t('blacklight.bookmarks.title') %></h2>
|
5
5
|
|
6
6
|
<%- if current_or_guest_user.blank? -%>
|
7
7
|
|
8
|
-
<
|
8
|
+
<h3 class='section-heading'><%= t('blacklight.bookmarks.need_login') %></h3>
|
9
9
|
|
10
10
|
<%- elsif @document_list.blank? -%>
|
11
11
|
|
@@ -3,7 +3,7 @@ xml.entry do
|
|
3
3
|
xml.title presenter(document).render_document_index_label(document_show_link_field(document))
|
4
4
|
|
5
5
|
# updated is required, for now we'll just set it to now, sorry
|
6
|
-
xml.updated Time.
|
6
|
+
xml.updated Time.now.strftime("%Y-%m-%dT%H:%M:%SZ")
|
7
7
|
|
8
8
|
xml.link "rel" => "alternate", "type" => "text/html", "href" => polymorphic_url(url_for_document(document))
|
9
9
|
# add other doc-specific formats, atom only lets us have one per
|
@@ -50,4 +50,6 @@ xml.entry do
|
|
50
50
|
end
|
51
51
|
|
52
52
|
end
|
53
|
-
|
53
|
+
|
54
|
+
|
55
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<nav class="alpha-filter">
|
2
|
+
<%= link_to t('blacklight.search.facets.clear'), @pagination.params_for_resort_url('index', params.except(@pagination.request_keys[:prefix])), data: { ajax_modal: "preserve" }, class: ['btn btn-default btn-xs', ('disabled' unless @pagination.prefix.present?)].join(' ') %>
|
3
|
+
|
4
|
+
<ol class="pagination pagination-xs">
|
5
|
+
<% @facet.index_range.each do |letter| %>
|
6
|
+
<li class="<%= 'active' if @pagination.prefix == letter %>"><%= link_to(letter, @pagination.params_for_resort_url('index', params.merge(@pagination.request_keys[:prefix] => letter)), data: { ajax_modal: "preserve" }) %></li>
|
7
|
+
<% end %>
|
8
|
+
</ol>
|
9
|
+
</nav>
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<div class="panel panel-default facet_limit blacklight-<%= facet_field.key.parameterize %> <%= 'facet_limit-active' if facet_field_in_params?(facet_field.key) %>">
|
2
2
|
<div class="<%= "collapsed" if should_collapse_facet?(facet_field) %> collapse-toggle panel-heading" data-toggle="collapse" data-target="#<%= facet_field_id(facet_field) %>">
|
3
|
-
<
|
4
|
-
|
3
|
+
<h3 class="panel-title facet-field-heading">
|
5
4
|
<%= link_to facet_field_label(facet_field.key), "#", :"data-no-turbolink" => true %>
|
6
|
-
</
|
5
|
+
</h3>
|
7
6
|
</div>
|
8
7
|
<div id="<%= facet_field_id(facet_field) %>" class="panel-collapse facet-content <%= should_collapse_facet?(facet_field) ? 'collapse' : 'in' %>">
|
9
8
|
<div class="panel-body">
|
@@ -1,21 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
<% end -%>
|
21
|
-
</div>
|
1
|
+
<div class="prev_next_links btn-group pull-left">
|
2
|
+
<%= link_to_previous_page @pagination, raw(t('views.pagination.previous')), params: params, param_name: blacklight_config.facet_paginator_class.request_keys[:page], class: 'btn btn-link', data: { ajax_modal: "preserve" } do %>
|
3
|
+
<span class="disabled btn btn-disabled"><%= raw(t('views.pagination.previous')) %></span>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<%= link_to_next_page @pagination, raw(t('views.pagination.next')), params: params, param_name: blacklight_config.facet_paginator_class.request_keys[:page], class: 'btn btn-link', data: { ajax_modal: "preserve" } do %>
|
7
|
+
<span class="disabled btn btn-disabled"><%= raw(t('views.pagination.next')) %></span>
|
8
|
+
<% end %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="sort_options btn-group pull-right">
|
12
|
+
<% if @pagination.sort == 'index' -%>
|
13
|
+
<span class="active az btn btn-default"><%= t('blacklight.search.facets.sort.index') %></span>
|
14
|
+
<%= link_to_unless(@pagination.sort == 'count', t('blacklight.search.facets.sort.count'), @pagination.params_for_resort_url('count', params), class: "sort_change numeric btn btn-default", data: {ajax_modal: "preserve"}) %>
|
15
|
+
<% elsif @pagination.sort == 'count' -%>
|
16
|
+
<%= link_to(t('blacklight.search.facets.sort.index'), @pagination.params_for_resort_url('index', params), class: "sort_change az btn btn-default", data: { ajax_modal: "preserve" }) %>
|
17
|
+
<span class="active numeric btn btn-default"><%= t('blacklight.search.facets.sort.count') %></span>
|
18
|
+
<% end -%>
|
19
|
+
</div>
|
@@ -10,10 +10,9 @@
|
|
10
10
|
<span class="icon-bar"></span>
|
11
11
|
</button>
|
12
12
|
|
13
|
-
<
|
14
|
-
|
13
|
+
<h2 class='facets-heading'>
|
15
14
|
<%= t('blacklight.search.facets.title') %>
|
16
|
-
</
|
15
|
+
</h2>
|
17
16
|
</div>
|
18
17
|
|
19
18
|
<div id="facet-panel-collapse" class="collapse panel-group">
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="page-header row">
|
2
|
-
<
|
2
|
+
<h2 class="col-md-8 page-heading"><%= t('blacklight.welcome') %></h2>
|
3
3
|
|
4
4
|
<ul class="nav nav-pills col-md-4">
|
5
5
|
<li><a href="https://github.com/projectblacklight/blacklight/">Github</a></li>
|
@@ -7,11 +7,10 @@
|
|
7
7
|
<li><a href="https://github.com/projectblacklight/blacklight/releases/tag/v<%= Blacklight::VERSION %>">Release Notes</a></li>
|
8
8
|
</ul>
|
9
9
|
|
10
|
-
|
11
10
|
</div>
|
12
11
|
|
13
12
|
<div id="getting-started">
|
14
|
-
<
|
13
|
+
<h3 class='section-heading'>Here’s how to get started:</h3>
|
15
14
|
|
16
15
|
<ol>
|
17
16
|
<li>To modify this text, you need to <a href="http://guides.rubyonrails.org/engines.html#improving-engine-functionality">override the Blacklight-provided view</a>.
|
@@ -9,14 +9,14 @@
|
|
9
9
|
<%= render_index_doc_actions document, wrapping_class: "index-document-functions col-sm-3 col-lg-2" %>
|
10
10
|
<% end %>
|
11
11
|
|
12
|
-
<
|
12
|
+
<h3 class="index_title document-title-heading <%= document_actions.present? ? "col-sm-9 col-lg-10" : "col-md-12" %>">
|
13
13
|
<% if counter = document_counter_with_offset(document_counter) %>
|
14
14
|
<span class="document-counter">
|
15
15
|
<%= t('blacklight.search.documents.counter', counter: counter) %>
|
16
16
|
</span>
|
17
17
|
<% end %>
|
18
18
|
<%= link_to_document document, document_show_link_field(document), counter: counter %>
|
19
|
-
</
|
19
|
+
</h3>
|
20
20
|
|
21
21
|
<%= document_actions %>
|
22
22
|
</div>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
</button>
|
8
8
|
<ul class="dropdown-menu" role="menu">
|
9
9
|
<%- per_page_options_for_select.each do |(label, count)| %>
|
10
|
-
<li><%= link_to(label, url_for(params_for_search(:
|
10
|
+
<li><%= link_to(label, url_for(blacklight_path.params_for_search(per_page: count))) %></li>
|
11
11
|
<%- end -%>
|
12
12
|
</ul>
|
13
13
|
</div>
|
@@ -1,20 +1,23 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<%
|
5
|
-
<
|
6
|
-
|
7
|
-
|
1
|
+
<%= form_tag search_action_url, method: :get, class: 'search-query-form clearfix navbar-form', role: 'search' do %>
|
2
|
+
<%= render_hash_as_hidden_fields(blacklight_path.params_for_search.except(:q, :search_field, :qt, :page, :utf8)) %>
|
3
|
+
<div class="input-group">
|
4
|
+
<% if search_fields.length > 1 %>
|
5
|
+
<span class="input-group-addon for-search-field">
|
6
|
+
<label for="search_field" class="sr-only"><%= t('blacklight.search.form.search_field.label') %></label>
|
7
|
+
<%= select_tag(:search_field, options_for_select(search_fields, h(params[:search_field])), title: t('blacklight.search.form.search_field.title'), id: "search_field", class: "search_field") %>
|
8
|
+
</span>
|
9
|
+
<% elsif search_fields.length == 1 %>
|
10
|
+
<%= hidden_field_tag :search_field, search_fields.first.last %>
|
8
11
|
<% end %>
|
9
|
-
<div class="input-group search-input-group">
|
10
|
-
<label for="q" class="sr-only"><%= t('blacklight.search.form.search.label') %></label>
|
11
|
-
<%= text_field_tag :q, params[:q], :placeholder => t('blacklight.search.form.search.placeholder'), :class => "search_q q form-control", :id => "q", :autofocus => should_autofocus_on_search_box? %>
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
13
|
+
<label for="q" class="sr-only"><%= t('blacklight.search.form.search.label') %></label>
|
14
|
+
<%= text_field_tag :q, params[:q], placeholder: t('blacklight.search.form.search.placeholder'), class: "search_q q form-control", id: "q", autofocus: should_autofocus_on_search_box? %>
|
15
|
+
|
16
|
+
<span class="input-group-btn">
|
17
|
+
<button type="submit" class="btn btn-primary search-btn" id="search">
|
18
|
+
<span class="submit-search-text"><%= t('blacklight.search.form.submit') %></span>
|
19
|
+
<span class="glyphicon glyphicon-search"></span>
|
20
|
+
</button>
|
21
|
+
</span>
|
22
|
+
</div>
|
23
|
+
<% end %>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
<ul class="dropdown-menu" role="menu">
|
8
8
|
<%- active_sort_fields.each do |sort_key, field_config| %>
|
9
|
-
<li><%= link_to(field_config.label, url_for(params_for_search(:
|
9
|
+
<li><%= link_to(field_config.label, url_for(blacklight_path.params_for_search(sort: sort_key))) %></li>
|
10
10
|
<%- end -%>
|
11
11
|
</ul>
|
12
12
|
</div>
|
@@ -6,9 +6,9 @@
|
|
6
6
|
|
7
7
|
<%- if params[:q] and params[:search_field] and params[:search_field] != blacklight_config.default_search_field.try(:key) -%>
|
8
8
|
<li><%= t 'blacklight.search.zero_results.search_fields', :search_fields => search_field_label(params) %> -
|
9
|
-
<%= link_to t('blacklight.search.zero_results.search_everything', field: blacklight_config.default_search_field.label), url_for(params_for_search(:
|
9
|
+
<%= link_to t('blacklight.search.zero_results.search_everything', field: blacklight_config.default_search_field.label), url_for(blacklight_path.params_for_search(search_field: blacklight_config.default_search_field.key)) %>
|
10
10
|
</li>
|
11
11
|
<%- end %>
|
12
12
|
|
13
13
|
</ul>
|
14
|
-
</div>
|
14
|
+
</div>
|
@@ -4,7 +4,10 @@
|
|
4
4
|
|
5
5
|
<div class="modal-header">
|
6
6
|
<button type="button" class="ajax-modal-close close" data-dismiss="modal" aria-hidden="true">×</button>
|
7
|
+
|
7
8
|
<h3 class="modal-title"><%= facet_field_label(@facet.key) %></h3>
|
9
|
+
<%= render partial: 'facet_index_navigation' if @facet.index_range && @display_facet.index? %>
|
10
|
+
|
8
11
|
</div>
|
9
12
|
<div class="modal-body">
|
10
13
|
<div class="facet_extended_list">
|
@@ -43,7 +43,7 @@ xml.feed("xmlns" => "http://www.w3.org/2005/Atom",
|
|
43
43
|
|
44
44
|
|
45
45
|
# updated is required, for now we'll just set it to now, sorry
|
46
|
-
xml.updated Time.
|
46
|
+
xml.updated Time.now.strftime("%Y-%m-%dT%H:%M:%SZ")
|
47
47
|
|
48
48
|
@document_list.each_with_index do |document, document_counter|
|
49
49
|
xml << Nokogiri::XML.fragment(render_document_partials(document, blacklight_config.view_config(:atom).partials, document_counter: document_counter))
|
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
<title><%= render_page_title %></title>
|
20
20
|
<%= opensearch_description_tag application_name, opensearch_catalog_url(:format => 'xml') %>
|
21
|
-
<%= favicon_link_tag %>
|
21
|
+
<%= favicon_link_tag 'favicon.ico' %>
|
22
22
|
<%= stylesheet_link_tag "application", media: "all" %>
|
23
23
|
<%= javascript_include_tag "application" %>
|
24
24
|
<%= csrf_meta_tags %>
|
@@ -35,7 +35,7 @@
|
|
35
35
|
|
36
36
|
<%= render partial: 'shared/ajax_modal' %>
|
37
37
|
|
38
|
-
<div id="main-container" class="
|
38
|
+
<div id="main-container" class="container">
|
39
39
|
<%= content_tag :h1, application_name, class: 'sr-only application-heading' %>
|
40
40
|
|
41
41
|
<%= render :partial=>'/flash_msg', layout: 'shared/flash_messages' %>
|
@@ -2,28 +2,27 @@
|
|
2
2
|
|
3
3
|
<div id="content" class="col-md-9">
|
4
4
|
|
5
|
-
<
|
5
|
+
<h2 class='page-heading'><%= t('blacklight.saved_searches.title') %></h2>
|
6
6
|
|
7
7
|
<%- if current_or_guest_user.blank? -%>
|
8
8
|
|
9
|
-
<
|
9
|
+
<h3 class='section-heading'><%= t('blacklight.saved_searches.need_login') %></h3>
|
10
10
|
|
11
11
|
<%- elsif @searches.blank? -%>
|
12
12
|
|
13
|
-
<
|
13
|
+
<h3 class='section-heading'><%= t('blacklight.saved_searches.no_searches') %></h3>
|
14
14
|
|
15
15
|
<%- else -%>
|
16
16
|
<p>
|
17
|
-
<%= link_to t('blacklight.saved_searches.clear.action_title'), clear_saved_searches_path, :method => :delete, :data => { :confirm => t('blacklight.saved_searches.clear.action_confirm') } %>
|
17
|
+
<%= link_to t('blacklight.saved_searches.clear.action_title'), blacklight.clear_saved_searches_path, :method => :delete, :data => { :confirm => t('blacklight.saved_searches.clear.action_confirm') } %>
|
18
18
|
</p>
|
19
19
|
|
20
|
-
<
|
21
|
-
|
20
|
+
<h3 class='section-heading'><%= t('blacklight.saved_searches.list_title') %></h3>
|
22
21
|
<table class="table table-striped">
|
23
22
|
<%- @searches.each do |search| -%>
|
24
23
|
<tr>
|
25
24
|
<td><%= link_to_previous_search(search.query_params) %></td>
|
26
|
-
<td><%= button_to t('blacklight.saved_searches.delete'), forget_search_path(search.id) %></td>
|
25
|
+
<td><%= button_to t('blacklight.saved_searches.delete'), blacklight.forget_search_path(search.id) %></td>
|
27
26
|
</tr>
|
28
27
|
<%- end -%>
|
29
28
|
</table>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<% @page_title = t('blacklight.search_history.page_title', :application_name => application_name) %>
|
2
2
|
|
3
3
|
<div id="content" class="col-md-12">
|
4
|
-
<
|
4
|
+
<h2 class='page-heading'><%=t('blacklight.search_history.title')%></h2>
|
5
5
|
<%- if @searches.blank? -%>
|
6
|
-
<
|
6
|
+
<h3 class='section-heading'><%=t('blacklight.search_history.no_history')%></h3>
|
7
7
|
<%- else -%>
|
8
|
-
<%= link_to t('blacklight.search_history.clear.action_title'), clear_search_history_path, :method => :delete, :data => { :confirm => t('blacklight.search_history.clear.action_confirm') }, :class => 'btn btn-danger pull-right' %>
|
8
|
+
<%= link_to t('blacklight.search_history.clear.action_title'), blacklight.clear_search_history_path, :method => :delete, :data => { :confirm => t('blacklight.search_history.clear.action_confirm') }, :class => 'btn btn-danger pull-right' %>
|
9
9
|
<h3 class='section-heading'><%=t('blacklight.search_history.recent')%></h3>
|
10
10
|
<table class="table table-striped search_history">
|
11
11
|
<%- @searches.each_with_index do |search,index| -%>
|
@@ -14,9 +14,9 @@
|
|
14
14
|
<%- if has_user_authentication_provider? -%>
|
15
15
|
<td class="actions">
|
16
16
|
<%- if current_or_guest_user && search.saved? -%>
|
17
|
-
<%= button_to t('blacklight.search_history.forget'), forget_search_path(search.id), :class => 'btn btn-default' %>
|
17
|
+
<%= button_to t('blacklight.search_history.forget'), blacklight.forget_search_path(search.id), :class => 'btn btn-default' %>
|
18
18
|
<%- else -%>
|
19
|
-
<%= button_to t('blacklight.search_history.save'), save_search_path(search.id), :method => :put, :class => 'btn btn-default' %>
|
19
|
+
<%= button_to t('blacklight.search_history.save'), blacklight.save_search_path(search.id), :method => :put, :class => 'btn btn-default' %>
|
20
20
|
<%- end -%>
|
21
21
|
</td>
|
22
22
|
<%- end -%>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="header-navbar" class="navbar navbar-inverse navbar-static-top" role="navigation">
|
2
|
-
<div class="
|
2
|
+
<div class="container">
|
3
3
|
<div class="navbar-header">
|
4
4
|
<button type="button" class="navbar-toggle btn collapsed" data-toggle="collapse" data-target="#user-util-collapse">
|
5
5
|
<span class="sr-only">Toggle navigation</span>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
</div>
|
18
18
|
|
19
19
|
<div id="search-navbar" class="navbar navbar-default navbar-static-top" role="navigation">
|
20
|
-
<div class="
|
20
|
+
<div class="container">
|
21
21
|
<%= render_search_bar %>
|
22
22
|
</div>
|
23
23
|
</div>
|
data/blacklight.gemspec
CHANGED
@@ -17,20 +17,20 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
18
|
s.require_paths = ["lib"]
|
19
19
|
|
20
|
-
s.add_dependency "rails", ">=
|
20
|
+
s.add_dependency "rails", ">= 4.1", "< 5"
|
21
|
+
s.add_dependency "globalid"
|
21
22
|
s.add_dependency "nokogiri", "~>1.6" # XML Parser
|
22
23
|
s.add_dependency "kaminari", ">= 0.15" # the pagination (page 1,2,3, etc..) of our search results
|
23
|
-
s.add_dependency "rsolr",
|
24
|
+
s.add_dependency "rsolr", "~> 1.0.11" # Library for interacting with rSolr.
|
24
25
|
s.add_dependency "bootstrap-sass", "~> 3.2"
|
25
26
|
s.add_dependency "deprecation"
|
26
27
|
|
27
|
-
s.add_development_dependency "
|
28
|
-
s.add_development_dependency "blacklight-marc", "~> 5.0"
|
28
|
+
s.add_development_dependency "solr_wrapper"
|
29
29
|
s.add_development_dependency "rspec-rails", "~> 3.0"
|
30
30
|
s.add_development_dependency "rspec-its"
|
31
31
|
s.add_development_dependency "rspec-collection_matchers", ">= 1.0"
|
32
32
|
s.add_development_dependency "capybara"
|
33
33
|
s.add_development_dependency "poltergeist"
|
34
|
-
s.add_development_dependency 'engine_cart', '~>
|
34
|
+
s.add_development_dependency 'engine_cart', '~> 0.8.0'
|
35
35
|
s.add_development_dependency "equivalent-xml"
|
36
36
|
end
|
@@ -166,8 +166,6 @@ de:
|
|
166
166
|
label: 'Suchen in'
|
167
167
|
title: 'gezeilte Suchoptionen'
|
168
168
|
post_label: 'für'
|
169
|
-
# i18n key 'q' is deprecated and will be removed in Blacklight 6.0, use 'search.label' and 'search.placeholder'
|
170
|
-
q: 'Suchen...'
|
171
169
|
search:
|
172
170
|
label: 'suchen nach'
|
173
171
|
placeholder: 'Suchen...'
|
@@ -187,12 +185,11 @@ de:
|
|
187
185
|
counter: '%{counter}. '
|
188
186
|
facets:
|
189
187
|
title: 'Beschränken dein Suche'
|
188
|
+
clear: 'Löschen'
|
190
189
|
sort:
|
191
190
|
count: 'Numerisch ordnen'
|
192
191
|
index: 'A-Z Ordnen'
|
193
192
|
count: '%{number}'
|
194
|
-
# i18n key 'more' is deprecated and will be removed in Blacklight 6.0
|
195
|
-
more: 'mehr »'
|
196
193
|
more_html: 'mehr <span class="sr-only">%{field_name}</span> »'
|
197
194
|
selected:
|
198
195
|
remove: '[entfernen]'
|
@@ -84,8 +84,6 @@ en:
|
|
84
84
|
tools:
|
85
85
|
title: 'Tools'
|
86
86
|
citation: 'Cite'
|
87
|
-
endnote: 'Export to EndNote'
|
88
|
-
refworks: 'Export to Refworks'
|
89
87
|
email: 'Email'
|
90
88
|
sms: 'SMS This'
|
91
89
|
clear: 'Clear'
|
@@ -148,7 +146,7 @@ en:
|
|
148
146
|
title: '%{constraints} - %{application_name} Search Results'
|
149
147
|
constraint: '%{label}: %{value}'
|
150
148
|
many_constraint_values: '%{values} selected'
|
151
|
-
search_results_header: 'Search'
|
149
|
+
search_results_header: 'Search Constraints'
|
152
150
|
search_results: 'Search Results'
|
153
151
|
errors:
|
154
152
|
request_error: "Sorry, I don't understand your search."
|
@@ -166,8 +164,6 @@ en:
|
|
166
164
|
label: 'Search in'
|
167
165
|
title: 'Targeted search options'
|
168
166
|
post_label: 'for'
|
169
|
-
# i18n key 'q' is deprecated and will be removed in Blacklight 6.0, use 'search.label' and 'search.placeholder'
|
170
|
-
q: 'Search...'
|
171
167
|
search:
|
172
168
|
label: 'search for'
|
173
169
|
placeholder: 'Search...'
|
@@ -187,12 +183,11 @@ en:
|
|
187
183
|
counter: '%{counter}. '
|
188
184
|
facets:
|
189
185
|
title: 'Limit your search'
|
186
|
+
clear: 'Clear Filter'
|
190
187
|
sort:
|
191
188
|
count: 'Numerical Sort'
|
192
189
|
index: 'A-Z Sort'
|
193
190
|
count: '%{number}'
|
194
|
-
# i18n key 'more' is deprecated and will be removed in Blacklight 6.0
|
195
|
-
more: 'more »'
|
196
191
|
more_html: 'more <span class="sr-only">%{field_name}</span> »'
|
197
192
|
selected:
|
198
193
|
remove: '[remove]'
|