blacklight 5.0.0.pre3 → 5.0.0.pre4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +9 -16
- data/Gemfile +4 -0
- data/README.md +15 -1
- data/VERSION +1 -1
- data/app/assets/stylesheets/blacklight/_bookmark.css.scss +1 -1
- data/app/assets/stylesheets/blacklight/_catalog.css.scss +2 -12
- data/app/assets/stylesheets/blacklight/_facets.css.scss +1 -1
- data/app/assets/stylesheets/blacklight/_header.css.scss +1 -0
- data/app/assets/stylesheets/blacklight/_modal.css.scss +4 -2
- data/app/assets/stylesheets/blacklight/blacklight_defaults.css.scss +0 -5
- data/app/controllers/bookmarks_controller.rb +4 -0
- data/app/helpers/blacklight/blacklight_helper_behavior.rb +26 -187
- data/app/helpers/blacklight/catalog_helper_behavior.rb +20 -8
- data/app/helpers/blacklight/facets_helper_behavior.rb +0 -83
- data/app/helpers/blacklight/hash_as_hidden_fields_helper_behavior.rb +1 -1
- data/app/helpers/blacklight/url_helper_behavior.rb +201 -0
- data/app/helpers/blacklight_url_helper.rb +3 -0
- data/app/views/bookmarks/_tools.html.erb +4 -7
- data/app/views/catalog/_citation.html.erb +1 -1
- data/app/views/catalog/_did_you_mean.html.erb +1 -1
- data/app/views/catalog/_document.html.erb +1 -1
- data/app/views/catalog/_search_form.html.erb +1 -1
- data/app/views/catalog/_show_more_like_this.html.erb +1 -1
- data/app/views/catalog/_view_type_group.html.erb +4 -4
- data/app/views/catalog/email.html.erb +2 -2
- data/app/views/catalog/facet.html.erb +1 -1
- data/app/views/catalog/show.html.erb +1 -1
- data/app/views/catalog/sms.html.erb +1 -1
- data/blacklight.gemspec +2 -2
- data/config/jetty.yml +4 -1
- data/config/locales/blacklight.en.yml +3 -0
- data/config/locales/blacklight.fr.yml +3 -0
- data/{lib/generators/blacklight/templates/migrations/create_searches.rb → db/migrate/20140202020201_create_searches.rb} +2 -0
- data/{lib/generators/blacklight/templates/migrations/create_bookmarks.rb → db/migrate/20140202020202_create_bookmarks.rb} +1 -2
- data/gemfiles/rails3.gemfile +2 -0
- data/gemfiles/rails4.gemfile +2 -0
- data/lib/blacklight.rb +1 -40
- data/lib/blacklight/base.rb +3 -9
- data/lib/blacklight/catalog.rb +3 -16
- data/lib/blacklight/catalog/search_context.rb +8 -1
- data/lib/blacklight/configurable.rb +1 -2
- data/lib/blacklight/configuration.rb +13 -3
- data/lib/blacklight/configuration/view_config.rb +71 -0
- data/lib/blacklight/engine.rb +1 -0
- data/lib/blacklight/routes.rb +0 -1
- data/lib/blacklight/solr/document.rb +0 -4
- data/lib/blacklight/solr_helper.rb +8 -2
- data/lib/blacklight/user.rb +1 -16
- data/lib/blacklight/utils.rb +72 -1
- data/lib/generators/blacklight/install_generator.rb +92 -0
- data/lib/generators/blacklight/models_generator.rb +1 -25
- data/lib/generators/blacklight/templates/catalog_controller.rb +28 -32
- data/spec/helpers/blacklight_helper_spec.rb +24 -417
- data/spec/helpers/catalog_helper_spec.rb +13 -13
- data/spec/helpers/facets_helper_spec.rb +0 -127
- data/spec/helpers/hash_as_hidden_fields_spec.rb +1 -1
- data/spec/helpers/url_helper_spec.rb +360 -0
- data/spec/lib/blacklight/configuration_spec.rb +2 -3
- data/spec/lib/blacklight/solr_helper_spec.rb +11 -17
- data/spec/lib/blacklight/user_spec.rb +0 -41
- data/spec/lib/blacklight_spec.rb +0 -22
- data/spec/lib/utils_spec.rb +35 -4
- data/spec/spec_helper.rb +4 -3
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +2 -2
- data/spec/views/catalog/_constraints.html.erb_spec.rb +4 -2
- data/spec/views/catalog/_index_default.erb_spec.rb +1 -1
- data/spec/views/catalog/_paginate_compact.html.erb_spec.rb +1 -5
- data/spec/views/catalog/_show_default.erb_spec.rb +1 -1
- data/spec/views/catalog/_view_type_group.html.erb_spec.rb +11 -3
- data/tasks/blacklight.rake +1 -5
- metadata +14 -16
- data/.gitmodules +0 -0
- data/app/views/catalog/endnote.endnote.erb +0 -1
- data/app/views/catalog/show.endnote.erb +0 -1
- data/lib/generators/blacklight/blacklight_generator.rb +0 -97
- data/lib/generators/blacklight/templates/migrations/add_user_types_to_bookmarks_searches.rb +0 -16
- data/lib/generators/blacklight/templates/migrations/remove_editable_fields_from_bookmarks.rb +0 -12
- data/lib/railties/all_tests.rake +0 -39
- data/lib/railties/blacklight_rspec.rake +0 -128
@@ -75,7 +75,7 @@ module Blacklight::CatalogHelperBehavior
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def render_document_class(document = @document)
|
78
|
-
|
78
|
+
'blacklight-' + document.get(blacklight_config.view_config(document_index_view_type_field).display_type_field).parameterize rescue nil
|
79
79
|
end
|
80
80
|
|
81
81
|
def render_document_sidebar_partial(document = @document)
|
@@ -98,14 +98,14 @@ module Blacklight::CatalogHelperBehavior
|
|
98
98
|
end
|
99
99
|
|
100
100
|
def has_thumbnail? document
|
101
|
-
blacklight_config.
|
102
|
-
blacklight_config.
|
101
|
+
blacklight_config.view_config(document_index_view_type).thumbnail_method or
|
102
|
+
blacklight_config.view_config(document_index_view_type).thumbnail_field && document.has?(blacklight_config.view_config(document_index_view_type).thumbnail_field)
|
103
103
|
end
|
104
104
|
|
105
105
|
def render_thumbnail_tag document, image_options = {}, url_options = {}
|
106
|
-
value = if blacklight_config.
|
107
|
-
send(blacklight_config.
|
108
|
-
elsif blacklight_config.
|
106
|
+
value = if blacklight_config.view_config(document_index_view_type).thumbnail_method
|
107
|
+
send(blacklight_config.view_config(document_index_view_type).thumbnail_method, document, image_options)
|
108
|
+
elsif blacklight_config.view_config(document_index_view_type).thumbnail_field
|
109
109
|
image_tag thumbnail_url(document), image_options
|
110
110
|
end
|
111
111
|
|
@@ -115,12 +115,24 @@ module Blacklight::CatalogHelperBehavior
|
|
115
115
|
end
|
116
116
|
|
117
117
|
def thumbnail_url document
|
118
|
-
if document.has? blacklight_config.
|
119
|
-
document.first(blacklight_config.
|
118
|
+
if document.has? blacklight_config.view_config(document_index_view_type).thumbnail_field
|
119
|
+
document.first(blacklight_config.view_config(document_index_view_type).thumbnail_field)
|
120
120
|
end
|
121
121
|
end
|
122
122
|
|
123
123
|
def add_group_facet_params_and_redirect group
|
124
124
|
add_facet_params_and_redirect(group.field, group.key)
|
125
125
|
end
|
126
|
+
|
127
|
+
def has_alternative_views?
|
128
|
+
blacklight_config.view.keys.length > 1
|
129
|
+
end
|
130
|
+
|
131
|
+
def render_view_type_group_icon view
|
132
|
+
content_tag :span, '', class: "glyphicon #{blacklight_config.view[view].icon_class || default_view_type_group_icon_classes(view) }"
|
133
|
+
end
|
134
|
+
|
135
|
+
def default_view_type_group_icon_classes view
|
136
|
+
"glyphicon-#{view.to_s.parameterize } view-icon-#{view.to_s.parameterize}"
|
137
|
+
end
|
126
138
|
end
|
@@ -117,89 +117,6 @@ module Blacklight::FacetsHelperBehavior
|
|
117
117
|
content_tag("span", t('blacklight.search.facets.count', :number => num), :class => classes)
|
118
118
|
end
|
119
119
|
|
120
|
-
# adds the value and/or field to params[:f]
|
121
|
-
# Does NOT remove request keys and otherwise ensure that the hash
|
122
|
-
# is suitable for a redirect. See
|
123
|
-
# add_facet_params_and_redirect
|
124
|
-
def add_facet_params(field, item, source_params = params)
|
125
|
-
|
126
|
-
if item.respond_to? :field
|
127
|
-
field = item.field
|
128
|
-
end
|
129
|
-
|
130
|
-
facet_config = facet_configuration_for_field(field)
|
131
|
-
|
132
|
-
value = facet_value_for_facet_item(item)
|
133
|
-
|
134
|
-
p = source_params.dup
|
135
|
-
p[:f] = (p[:f] || {}).dup # the command above is not deep in rails3, !@#$!@#$
|
136
|
-
p[:f][field] = (p[:f][field] || []).dup
|
137
|
-
|
138
|
-
if facet_config.single and not p[:f][field].empty?
|
139
|
-
p[:f][field] = []
|
140
|
-
end
|
141
|
-
|
142
|
-
p[:f][field].push(value)
|
143
|
-
|
144
|
-
if item and item.respond_to?(:fq) and item.fq
|
145
|
-
item.fq.each do |f,v|
|
146
|
-
p = add_facet_params(f, v, p)
|
147
|
-
end
|
148
|
-
end
|
149
|
-
|
150
|
-
p
|
151
|
-
end
|
152
|
-
|
153
|
-
# Used in catalog/facet action, facets.rb view, for a click
|
154
|
-
# on a facet value. Add on the facet params to existing
|
155
|
-
# search constraints. Remove any paginator-specific request
|
156
|
-
# params, or other request params that should be removed
|
157
|
-
# for a 'fresh' display.
|
158
|
-
# Change the action to 'index' to send them back to
|
159
|
-
# catalog/index with their new facet choice.
|
160
|
-
def add_facet_params_and_redirect(field, item)
|
161
|
-
new_params = add_facet_params(field, item)
|
162
|
-
|
163
|
-
# Delete page, if needed.
|
164
|
-
new_params.delete(:page)
|
165
|
-
|
166
|
-
# Delete any request params from facet-specific action, needed
|
167
|
-
# to redir to index action properly.
|
168
|
-
Blacklight::Solr::FacetPaginator.request_keys.values.each do |paginator_key|
|
169
|
-
new_params.delete(paginator_key)
|
170
|
-
end
|
171
|
-
new_params.delete(:id)
|
172
|
-
|
173
|
-
# Force action to be index.
|
174
|
-
new_params[:action] = "index"
|
175
|
-
new_params
|
176
|
-
end
|
177
|
-
# copies the current params (or whatever is passed in as the 3rd arg)
|
178
|
-
# removes the field value from params[:f]
|
179
|
-
# removes the field if there are no more values in params[:f][field]
|
180
|
-
# removes additional params (page, id, etc..)
|
181
|
-
def remove_facet_params(field, item, source_params=params)
|
182
|
-
if item.respond_to? :field
|
183
|
-
field = item.field
|
184
|
-
end
|
185
|
-
|
186
|
-
value = facet_value_for_facet_item(item)
|
187
|
-
|
188
|
-
p = source_params.dup
|
189
|
-
# need to dup the facet values too,
|
190
|
-
# if the values aren't dup'd, then the values
|
191
|
-
# from the session will get remove in the show view...
|
192
|
-
p[:f] = (p[:f] || {}).dup
|
193
|
-
p[:f][field] = (p[:f][field] || []).dup
|
194
|
-
p.delete :page
|
195
|
-
p.delete :id
|
196
|
-
p.delete :counter
|
197
|
-
p.delete :commit
|
198
|
-
p[:f][field] = p[:f][field] - [value]
|
199
|
-
p[:f].delete(field) if p[:f][field].size == 0
|
200
|
-
p
|
201
|
-
end
|
202
|
-
|
203
120
|
def facet_field_in_params? field
|
204
121
|
params[:f] and params[:f][field]
|
205
122
|
end
|
@@ -14,7 +14,7 @@ module Blacklight::HashAsHiddenFieldsHelperBehavior
|
|
14
14
|
# Writes out zero or more <input type="hidden"> elements, completely
|
15
15
|
# representing a hash passed in using Rails-style request parameters
|
16
16
|
# for hashes nested with arrays and other hashes.
|
17
|
-
def
|
17
|
+
def render_hash_as_hidden_fields(hash)
|
18
18
|
|
19
19
|
hidden_fields = []
|
20
20
|
flatten_hash(hash).each do |name, value|
|
@@ -0,0 +1,201 @@
|
|
1
|
+
module Blacklight::UrlHelperBehavior
|
2
|
+
|
3
|
+
# link_to_document(doc, :label=>'VIEW', :counter => 3)
|
4
|
+
# Use the catalog_path RESTful route to create a link to the show page for a specific item.
|
5
|
+
# catalog_path accepts a HashWithIndifferentAccess object. The solr query params are stored in the session,
|
6
|
+
# so we only need the +counter+ param here. We also need to know if we are viewing to document as part of search results.
|
7
|
+
def link_to_document(doc, opts={:label=>nil, :counter => nil})
|
8
|
+
opts[:label] ||= document_show_link_field(doc)
|
9
|
+
label = render_document_index_label doc, opts
|
10
|
+
link_to label, doc, search_session_params(opts[:counter]).merge(opts.reject { |k,v| [:label, :counter].include? k })
|
11
|
+
end
|
12
|
+
|
13
|
+
def link_to_previous_document(previous_document)
|
14
|
+
link_to_unless previous_document.nil?, raw(t('views.pagination.previous')), previous_document, search_session_params(search_session[:counter].to_i - 1).merge(:class => "previous", :rel => 'prev') do
|
15
|
+
content_tag :span, raw(t('views.pagination.previous')), :class => 'previous'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def link_to_next_document(next_document)
|
20
|
+
link_to_unless next_document.nil?, raw(t('views.pagination.next')), next_document, search_session_params(search_session[:counter].to_i + 1).merge(:class => "next", :rel => 'next') do
|
21
|
+
content_tag :span, raw(t('views.pagination.next')), :class => 'next'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def search_session_params counter
|
26
|
+
{ :'data-counter' => counter, :'data-search_id' => current_search_session.try(:id) }
|
27
|
+
end
|
28
|
+
|
29
|
+
#
|
30
|
+
# link based helpers ->
|
31
|
+
#
|
32
|
+
|
33
|
+
# create link to query (e.g. spelling suggestion)
|
34
|
+
def link_to_query(query)
|
35
|
+
p = params.except(:page, :action)
|
36
|
+
p[:q]=query
|
37
|
+
link_url = catalog_index_path(p)
|
38
|
+
link_to(query, link_url)
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# Get the path to the search action with any parameters (e.g. view type)
|
43
|
+
# that should be persisted across search sessions.
|
44
|
+
def start_over_path query_params = params
|
45
|
+
h = { }
|
46
|
+
current_index_view_type = document_index_view_type(query_params)
|
47
|
+
h[:view] = current_index_view_type unless current_index_view_type == default_document_index_view_type
|
48
|
+
|
49
|
+
search_action_url(h)
|
50
|
+
end
|
51
|
+
|
52
|
+
# Create a link back to the index screen, keeping the user's facet, query and paging choices intact by using session.
|
53
|
+
# @example
|
54
|
+
# link_back_to_catalog(label: 'Back to Search')
|
55
|
+
# link_back_to_catalog(label: 'Back to Search', route_set: my_engine)
|
56
|
+
def link_back_to_catalog(opts={:label=>nil})
|
57
|
+
scope = opts.delete(:route_set) || self
|
58
|
+
query_params = current_search_session.try(:query_params) || {}
|
59
|
+
link_url = scope.url_for(query_params)
|
60
|
+
label = opts.delete(:label)
|
61
|
+
|
62
|
+
if link_url =~ /bookmarks/
|
63
|
+
label ||= t('blacklight.back_to_bookmarks')
|
64
|
+
end
|
65
|
+
|
66
|
+
label ||= t('blacklight.back_to_search')
|
67
|
+
|
68
|
+
link_to label, link_url, opts
|
69
|
+
end
|
70
|
+
|
71
|
+
# Search History and Saved Searches display
|
72
|
+
def link_to_previous_search(params)
|
73
|
+
link_to(render_search_to_s(params), catalog_index_path(params))
|
74
|
+
end
|
75
|
+
|
76
|
+
# @overload params_for_search(source_params, params_to_merge)
|
77
|
+
# Merge the source params with the params_to_merge hash
|
78
|
+
# @param [Hash] Hash
|
79
|
+
# @param [Hash] Hash to merge into above
|
80
|
+
# @overload params_for_search(params_to_merge)
|
81
|
+
# Merge the current search parameters with the
|
82
|
+
# parameters provided.
|
83
|
+
# @param [Hash] Hash to merge into the parameters
|
84
|
+
# @overload params_for_search
|
85
|
+
# Returns the current search parameters after being sanitized by #sanitize_search_params
|
86
|
+
# @yield [params] The merged parameters hash before being sanitized
|
87
|
+
def params_for_search(*args, &block)
|
88
|
+
|
89
|
+
source_params, params_to_merge = case args.length
|
90
|
+
when 0
|
91
|
+
[params, {}]
|
92
|
+
when 1
|
93
|
+
[params, args.first]
|
94
|
+
when 2
|
95
|
+
[args.first, args.last]
|
96
|
+
else
|
97
|
+
raise ArgumentError.new "wrong number of arguments (#{args.length} for 0..2)"
|
98
|
+
end
|
99
|
+
|
100
|
+
# params hash we'll return
|
101
|
+
my_params = source_params.dup.merge(params_to_merge.dup)
|
102
|
+
|
103
|
+
if block_given?
|
104
|
+
yield my_params
|
105
|
+
end
|
106
|
+
|
107
|
+
if my_params[:page] and (my_params[:per_page] != source_params[:per_page] or my_params[:sort] != source_params[:sort] )
|
108
|
+
my_params[:page] = 1
|
109
|
+
end
|
110
|
+
|
111
|
+
sanitize_search_params(my_params)
|
112
|
+
end
|
113
|
+
|
114
|
+
##
|
115
|
+
# Sanitize the search parameters by removing unnecessary parameters
|
116
|
+
# from the provided parameters
|
117
|
+
# @param [Hash] Hash of parameters
|
118
|
+
def sanitize_search_params source_params
|
119
|
+
|
120
|
+
my_params = source_params.reject { |k,v| v.nil? }
|
121
|
+
|
122
|
+
my_params.except(:action, :controller, :id, :commit, :utf8)
|
123
|
+
|
124
|
+
end
|
125
|
+
|
126
|
+
# adds the value and/or field to params[:f]
|
127
|
+
# Does NOT remove request keys and otherwise ensure that the hash
|
128
|
+
# is suitable for a redirect. See
|
129
|
+
# add_facet_params_and_redirect
|
130
|
+
def add_facet_params(field, item, source_params = params)
|
131
|
+
|
132
|
+
if item.respond_to? :field
|
133
|
+
field = item.field
|
134
|
+
end
|
135
|
+
|
136
|
+
facet_config = facet_configuration_for_field(field)
|
137
|
+
|
138
|
+
value = facet_value_for_facet_item(item)
|
139
|
+
|
140
|
+
p = source_params.dup
|
141
|
+
p[:f] = (p[:f] || {}).dup # the command above is not deep in rails3, !@#$!@#$
|
142
|
+
p[:f][field] = (p[:f][field] || []).dup
|
143
|
+
|
144
|
+
if facet_config.single and not p[:f][field].empty?
|
145
|
+
p[:f][field] = []
|
146
|
+
end
|
147
|
+
|
148
|
+
p[:f][field].push(value)
|
149
|
+
|
150
|
+
if item and item.respond_to?(:fq) and item.fq
|
151
|
+
item.fq.each do |f,v|
|
152
|
+
p = add_facet_params(f, v, p)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
p
|
157
|
+
end
|
158
|
+
|
159
|
+
# Used in catalog/facet action, facets.rb view, for a click
|
160
|
+
# on a facet value. Add on the facet params to existing
|
161
|
+
# search constraints. Remove any paginator-specific request
|
162
|
+
# params, or other request params that should be removed
|
163
|
+
# for a 'fresh' display.
|
164
|
+
# Change the action to 'index' to send them back to
|
165
|
+
# catalog/index with their new facet choice.
|
166
|
+
def add_facet_params_and_redirect(field, item)
|
167
|
+
new_params = add_facet_params(field, item)
|
168
|
+
new_params.except! :page, :id
|
169
|
+
|
170
|
+
# Delete any request params from facet-specific action, needed
|
171
|
+
# to redir to index action properly.
|
172
|
+
new_params.except! *Blacklight::Solr::FacetPaginator.request_keys.values
|
173
|
+
|
174
|
+
# Force action to be index.
|
175
|
+
new_params[:action] = "index"
|
176
|
+
new_params
|
177
|
+
end
|
178
|
+
# copies the current params (or whatever is passed in as the 3rd arg)
|
179
|
+
# removes the field value from params[:f]
|
180
|
+
# removes the field if there are no more values in params[:f][field]
|
181
|
+
# removes additional params (page, id, etc..)
|
182
|
+
def remove_facet_params(field, item, source_params=params)
|
183
|
+
if item.respond_to? :field
|
184
|
+
field = item.field
|
185
|
+
end
|
186
|
+
|
187
|
+
value = facet_value_for_facet_item(item)
|
188
|
+
|
189
|
+
p = source_params.dup
|
190
|
+
# need to dup the facet values too,
|
191
|
+
# if the values aren't dup'd, then the values
|
192
|
+
# from the session will get remove in the show view...
|
193
|
+
p[:f] = (p[:f] || {}).dup
|
194
|
+
p[:f][field] = (p[:f][field] || []).dup
|
195
|
+
p.except! :page, :id, :counter, :commit
|
196
|
+
p[:f][field] = p[:f][field] - [value]
|
197
|
+
p[:f].delete(field) if p[:f][field].size == 0
|
198
|
+
p
|
199
|
+
end
|
200
|
+
|
201
|
+
end
|
@@ -2,13 +2,10 @@
|
|
2
2
|
<li class="cite">
|
3
3
|
<%= link_to t('blacklight.tools.cite'), citation_catalog_path(:sort=>params[:sort], :per_page=>params[:per_page], :id => @bookmarks.collect{|doc| doc.document_id}), {:id => 'citeLink', :name => 'citation', :class => 'btn btn-default', :data => {:ajax_modal => "trigger"}} %>
|
4
4
|
</li>
|
5
|
-
|
6
|
-
<%= render :
|
7
|
-
|
8
|
-
|
9
|
-
<li class="endnote">
|
10
|
-
<%= link_to t('blacklight.tools.endnote'), endnote_catalog_path(:sort=>params[:sort], :per_page=>params[:per_page], :id => @bookmarks.collect {|doc| doc.document_id}, :format => 'endnote'), {:class => 'btn btn-default'}%>
|
11
|
-
</li>
|
5
|
+
<% if defined? BlacklightMarc %>
|
6
|
+
<%= render partial: 'bookmarks/refworks' %>
|
7
|
+
<%= render partial: 'bookmarks/endnote' %>
|
8
|
+
<% end %>
|
12
9
|
<li class="email">
|
13
10
|
<%= link_to t('blacklight.tools.email'), email_catalog_path(:sort=>params[:sort], :per_page=>params[:per_page], :id => @bookmarks.collect {|doc| doc.document_id}), :class=>"btn btn-default", :id => "emailLink", :data => {:ajax_modal => "trigger"} %>
|
14
11
|
</li>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
<% @documents.each do |document| %>
|
3
3
|
|
4
|
-
<h3 class="modal-title"><%=
|
4
|
+
<h3 class="modal-title"><%= document_heading(document) %></h3>
|
5
5
|
|
6
6
|
<% if document.respond_to?(:export_as_mla_citation_txt) %>
|
7
7
|
<h4><%= t('blacklight.citation.mla') %></h4>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% if
|
1
|
+
<% if should_show_spellcheck_suggestions? @response %>
|
2
2
|
<div id="spell">
|
3
3
|
<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>
|
4
4
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
1
|
<% # container for a single doc -%>
|
2
2
|
<div class="document <%= render_document_class document %>" itemscope itemtype="<%= document.itemtype %>">
|
3
|
-
<%= render_document_partials document, blacklight_config.
|
3
|
+
<%= render_document_partials document, blacklight_config.view_config(document_index_view_type).partials, :document_counter => document_counter %>
|
4
4
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= form_tag search_action_url, :method => :get, :class => 'search-query-form form-inline clearfix navbar-form' do %>
|
2
|
-
<%=
|
2
|
+
<%= render_hash_as_hidden_fields(params_for_search().except(:q, :search_field, :qt, :page, :utf8)) %>
|
3
3
|
|
4
4
|
<div class="input-group">
|
5
5
|
<% unless search_fields.empty? %>
|
@@ -1,10 +1,10 @@
|
|
1
|
-
<% if
|
1
|
+
<% if has_alternative_views? -%>
|
2
2
|
<div class="view-type">
|
3
3
|
<span class="sr-only"><%= t('blacklight.search.view_title') %></span>
|
4
4
|
<div class="view-type-group btn-group">
|
5
|
-
<% blacklight_config.
|
6
|
-
<%= link_to url_for(params.merge(:view => view)), :title => t("blacklight.search.view_title.#{view}", default: t("blacklight.search.view.#{view}", default:
|
7
|
-
|
5
|
+
<% blacklight_config.view.keys.each do |view| %>
|
6
|
+
<%= link_to url_for(params.merge(:view => view)), :title => t("blacklight.search.view_title.#{view}", default: t("blacklight.search.view.#{view}", default: blacklight_config.view[view].title)), :class => "btn btn-default view-type-#{ view.to_s.parameterize } #{"active" if document_index_view_type == view}" do %>
|
7
|
+
<%= render_view_type_group_icon view %>
|
8
8
|
<span class="caption"><%= t("blacklight.search.view.#{view}") %></span>
|
9
9
|
<% end %>
|
10
10
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="modal-header">
|
2
|
-
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
2
|
+
<button type="button" class="ajax-modal-close close" data-dismiss="modal" aria-hidden="true">×</button>
|
3
3
|
<h1 class="modal-title"><%= t('blacklight.email.form.title') %></h1>
|
4
4
|
</div>
|
5
|
-
<%= render :partial => 'email_form' %>
|
5
|
+
<%= render :partial => 'email_form' %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
</div>
|
4
4
|
|
5
5
|
<div class="modal-header">
|
6
|
-
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
6
|
+
<button type="button" class="ajax-modal-close close" data-dismiss="modal" aria-hidden="true">×</button>
|
7
7
|
<h3 class="modal-title"><%= blacklight_config.facet_fields[params[:id]].label %></h3>
|
8
8
|
</div>
|
9
9
|
<div class="modal-body">
|