blacklight 3.8.2 → 4.0.0.pre6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (206) hide show
  1. data/Gemfile +1 -0
  2. data/README.md +1 -1
  3. data/VERSION +1 -1
  4. data/app/assets/javascripts/blacklight/blacklight.js +12 -1
  5. data/app/assets/javascripts/blacklight/bootstrap_dropdowns.js +3 -0
  6. data/app/assets/javascripts/blacklight/checkbox_submit.js +12 -5
  7. data/app/assets/javascripts/blacklight/core.js +0 -1
  8. data/app/assets/javascripts/blacklight/css_dropdowns.js +10 -0
  9. data/app/assets/javascripts/blacklight/facet_expand_contract.js +5 -5
  10. data/app/assets/javascripts/blacklight/lightbox_dialog.js +68 -13
  11. data/app/assets/javascripts/blacklight/select_submit.js +19 -10
  12. data/app/assets/javascripts/improved-modal/bootstrap-modal.js +282 -0
  13. data/app/assets/javascripts/improved-modal/bootstrap-modalmanager.js +353 -0
  14. data/app/assets/stylesheets/blacklight/_blacklight_base.css.scss +16 -5
  15. data/app/assets/stylesheets/blacklight/_bookmark.css.scss +24 -6
  16. data/app/assets/stylesheets/blacklight/_catalog.css.scss +115 -141
  17. data/app/assets/stylesheets/blacklight/_dropdown.css.scss +57 -0
  18. data/app/assets/stylesheets/blacklight/_facets.css.scss +127 -58
  19. data/app/assets/stylesheets/blacklight/_footer.css.scss +20 -0
  20. data/app/assets/stylesheets/blacklight/_header.css.scss +90 -21
  21. data/app/assets/stylesheets/blacklight/_layout.css.scss +10 -9
  22. data/app/assets/stylesheets/blacklight/_modal.css.scss +23 -0
  23. data/app/assets/stylesheets/blacklight/_print.css.scss +0 -7
  24. data/app/assets/stylesheets/blacklight/_responsive.css.scss +3 -0
  25. data/app/assets/stylesheets/blacklight/_search_history.css.scss +2 -4
  26. data/app/assets/stylesheets/blacklight/blacklight.css.scss +0 -1
  27. data/app/assets/stylesheets/blacklight/blacklight_defaults.css.scss +9 -2
  28. data/app/assets/stylesheets/blacklight/responsive_partials/_catalog.css.scss +5 -0
  29. data/app/assets/stylesheets/blacklight/responsive_partials/_facets.css.scss +37 -0
  30. data/app/assets/stylesheets/blacklight/responsive_partials/_header.css.scss +30 -0
  31. data/app/assets/stylesheets/improved-modal/bootstrap-modal.css +199 -0
  32. data/app/controllers/bookmarks_controller.rb +16 -10
  33. data/app/helpers/blacklight/blacklight_helper_behavior.rb +124 -61
  34. data/app/helpers/blacklight/catalog_helper_behavior.rb +5 -3
  35. data/app/helpers/blacklight/facets_helper_behavior.rb +9 -9
  36. data/app/views/_flash_msg.html.erb +9 -4
  37. data/app/views/_user_util_links.html.erb +23 -17
  38. data/app/views/bookmarks/_tools.html.erb +7 -7
  39. data/app/views/bookmarks/index.html.erb +5 -13
  40. data/app/views/catalog/_bookmark_control.html.erb +2 -4
  41. data/app/views/catalog/_bookmark_form.html.erb +1 -1
  42. data/app/views/catalog/_citation.html.erb +21 -20
  43. data/app/views/catalog/_constraints.html.erb +8 -6
  44. data/app/views/catalog/_document_header.html.erb +6 -7
  45. data/app/views/catalog/_document_list.html.erb +1 -7
  46. data/app/views/catalog/_email_form.html.erb +42 -16
  47. data/app/views/catalog/_facet_layout.html.erb +1 -1
  48. data/app/views/catalog/_facet_limit.html.erb +1 -1
  49. data/app/views/catalog/_facet_pagination.html.erb +11 -14
  50. data/app/views/catalog/_facets.html.erb +16 -2
  51. data/app/views/catalog/_home.html.erb +2 -2
  52. data/app/views/catalog/_home_text.html.erb +5 -2
  53. data/app/views/catalog/_index_default.html.erb +2 -2
  54. data/app/views/catalog/_marc_view.html.erb +0 -1
  55. data/app/views/catalog/_paginate_compact.html.erb +5 -0
  56. data/app/views/catalog/_per_page_widget.html.erb +13 -7
  57. data/app/views/catalog/_previous_next_doc.html.erb +14 -4
  58. data/app/views/catalog/_refworks_form.html.erb +2 -2
  59. data/app/views/catalog/_results_pagination.html.erb +4 -1
  60. data/app/views/catalog/_search_form.html.erb +19 -13
  61. data/app/views/catalog/_show_default.html.erb +2 -2
  62. data/app/views/catalog/_show_more_like_this.html.erb +3 -0
  63. data/app/views/catalog/_show_sidebar.html.erb +14 -1
  64. data/app/views/catalog/_show_tools.html.erb +18 -18
  65. data/app/views/catalog/_sms_form.html.erb +35 -10
  66. data/app/views/catalog/_sort_and_per_page.html.erb +5 -3
  67. data/app/views/catalog/_sort_widget.html.erb +12 -6
  68. data/app/views/catalog/citation.html.erb +1 -1
  69. data/app/views/catalog/citation.js.erb +7 -0
  70. data/app/views/catalog/email.html.erb +5 -0
  71. data/app/views/catalog/facet.html.erb +28 -21
  72. data/app/views/catalog/index.html.erb +26 -26
  73. data/app/views/catalog/librarian_view.html.erb +7 -0
  74. data/app/views/catalog/show.html.erb +35 -29
  75. data/app/views/catalog/sms.html.erb +5 -0
  76. data/app/views/kaminari/blacklight/_first_page.html.erb +2 -2
  77. data/app/views/kaminari/blacklight/_gap.html.erb +4 -1
  78. data/app/views/kaminari/blacklight/_last_page.html.erb +2 -2
  79. data/app/views/kaminari/blacklight/_next_page.html.erb +3 -3
  80. data/app/views/kaminari/blacklight/_page.html.erb +4 -3
  81. data/app/views/kaminari/blacklight/_paginator.html.erb +5 -5
  82. data/app/views/kaminari/blacklight/_prev_page.html.erb +3 -3
  83. data/app/views/kaminari/blacklight_compact/_next_page.html.erb +9 -0
  84. data/app/views/kaminari/blacklight_compact/_paginator.html.erb +15 -0
  85. data/app/views/kaminari/blacklight_compact/_prev_page.html.erb +9 -0
  86. data/app/views/layouts/blacklight.html.erb +47 -27
  87. data/app/views/saved_searches/index.html.erb +2 -2
  88. data/app/views/search_history/index.html.erb +12 -7
  89. data/app/views/shared/_footer.html.erb +0 -0
  90. data/app/views/shared/_header_navbar.html.erb +25 -0
  91. data/blacklight.gemspec +2 -5
  92. data/config/locales/blacklight.en.yml +23 -15
  93. data/lib/blacklight.rb +2 -2
  94. data/lib/blacklight/catalog.rb +36 -14
  95. data/lib/blacklight/configuration.rb +10 -2
  96. data/lib/blacklight/mash.rb +151 -0
  97. data/lib/blacklight/solr/document.rb +73 -11
  98. data/lib/blacklight/solr/document/extensions.rb +0 -8
  99. data/lib/blacklight/solr/document/marc_export.rb +7 -2
  100. data/lib/blacklight/solr/document/more_like_this.rb +5 -0
  101. data/lib/blacklight/solr_helper.rb +43 -18
  102. data/lib/blacklight/solr_response.rb +60 -0
  103. data/lib/blacklight/solr_response/facets.rb +58 -0
  104. data/lib/blacklight/solr_response/more_like_this.rb +14 -0
  105. data/lib/blacklight/solr_response/spelling.rb +92 -0
  106. data/lib/generators/blacklight/assets_generator.rb +1 -14
  107. data/lib/generators/blacklight/blacklight_generator.rb +22 -21
  108. data/lib/generators/blacklight/jetty_generator.rb +1 -35
  109. data/{test_support → lib/generators/blacklight/templates}/alternate_controller.rb +0 -0
  110. data/lib/generators/blacklight/templates/blacklight.css.scss +4 -0
  111. data/lib/generators/blacklight/templates/config/SolrMarc/config-test.properties +2 -2
  112. data/lib/generators/blacklight/templates/config/jetty.yml +6 -0
  113. data/lib/generators/blacklight/test_support_generator.rb +35 -0
  114. data/lib/railties/all_tests.rake +5 -23
  115. data/lib/railties/blacklight_cucumber.rake +2 -11
  116. data/lib/railties/blacklight_rspec.rake +2 -12
  117. data/test_support/bin/run-tests.sh +1 -1
  118. data/test_support/bin/setup-test-app.sh +123 -0
  119. data/test_support/bin/test.sh +21 -21
  120. data/test_support/features/bookmarks.feature +9 -3
  121. data/test_support/features/saved_searches.feature +3 -3
  122. data/test_support/features/search.feature +3 -3
  123. data/test_support/features/search_filters.feature +24 -26
  124. data/test_support/features/search_history.feature +9 -10
  125. data/test_support/features/search_sort.feature +4 -6
  126. data/test_support/features/step_definitions/general_steps.rb +0 -4
  127. data/test_support/features/step_definitions/search_result_steps.rb +2 -1
  128. data/test_support/features/step_definitions/search_steps.rb +32 -2
  129. data/test_support/spec/controllers/application_controller_spec.rb +8 -0
  130. data/test_support/spec/controllers/catalog_controller_spec.rb +3 -18
  131. data/test_support/spec/helpers/blacklight_helper_spec.rb +116 -20
  132. data/test_support/spec/helpers/catalog_helper_spec.rb +14 -6
  133. data/test_support/spec/helpers/facets_helper_spec.rb +1 -1
  134. data/test_support/spec/lib/blacklight_solr_document_more_like_this_spec.rb +18 -0
  135. data/test_support/spec/lib/blacklight_solr_document_spec.rb +54 -1
  136. data/test_support/spec/lib/blacklight_solr_response_spec.rb +153 -0
  137. data/test_support/spec/lib/facet_paginator_spec.rb +1 -1
  138. data/test_support/spec/lib/marc_export_spec.rb +14 -6
  139. data/test_support/spec/lib/solr_helper_spec.rb +22 -6
  140. data/test_support/spec/models/solr_docment_spec.rb +1 -4
  141. data/test_support/spec/{features → requests}/alternate_controller_spec.rb +3 -2
  142. data/test_support/spec/views/catalog/_facets.html.erb_spec.rb +20 -4
  143. data/test_support/spec/views/catalog/_show_sidebar.erb_spec.rb +25 -0
  144. metadata +53 -131
  145. data/app/assets/javascripts/blacklight/more_facets.js +0 -16
  146. data/app/assets/javascripts/jquery-1.4.2.min.js +0 -154
  147. data/app/assets/javascripts/jquery-ui-1.8.1.custom.min.js +0 -756
  148. data/app/assets/javascripts/jquery.uiExt.ajaxyDialog.js +0 -180
  149. data/app/assets/stylesheets/blacklight/_formatting.css.scss +0 -164
  150. data/app/assets/stylesheets/blacklight/grids/_susy_grid.css.scss +0 -72
  151. data/app/assets/stylesheets/jquery/ui-lightness/images/ui-anim_basic_16x16.gif +0 -0
  152. data/app/assets/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  153. data/app/assets/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  154. data/app/assets/stylesheets/jquery/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  155. data/app/assets/stylesheets/jquery/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  156. data/app/assets/stylesheets/jquery/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  157. data/app/assets/stylesheets/jquery/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  158. data/app/assets/stylesheets/jquery/ui-lightness/images/ui-bg_gloss-wave_35_558fd0_500x100.png +0 -0
  159. data/app/assets/stylesheets/jquery/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  160. data/app/assets/stylesheets/jquery/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  161. data/app/assets/stylesheets/jquery/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  162. data/app/assets/stylesheets/jquery/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  163. data/app/assets/stylesheets/jquery/ui-lightness/images/ui-icons_2e4f81_256x240.png +0 -0
  164. data/app/assets/stylesheets/jquery/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  165. data/app/assets/stylesheets/jquery/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  166. data/app/assets/stylesheets/jquery/ui-lightness/jquery-ui-1.8.1.custom.css +0 -486
  167. data/app/models/solr_document.rb +0 -5
  168. data/app/views/catalog/email.erb +0 -1
  169. data/app/views/catalog/sms.erb +0 -1
  170. data/doc/Atom-Responses.md +0 -90
  171. data/doc/Blacklight-3.2-Release-Notes-and-Upgrade-Guide.md +0 -191
  172. data/doc/Blacklight-3.3-release-notes-and-upgrade-guide.md +0 -37
  173. data/doc/Blacklight-3.4-release-notes-and-upgrade-guide.md +0 -27
  174. data/doc/Blacklight-3.5-release-notes-and-upgrade-guide.md +0 -44
  175. data/doc/Blacklight-3.6-release-notes-and-upgrade-guide.md +0 -25
  176. data/doc/Blacklight-3.7-release-notes-and-upgrade-guide.md +0 -78
  177. data/doc/Blacklight-3.8-release-notes-and-upgrade-guide.md +0 -11
  178. data/doc/Blacklight-Add-ons.md +0 -28
  179. data/doc/Blacklight-configuration.md +0 -301
  180. data/doc/Blacklight-on-Heroku.md +0 -135
  181. data/doc/Community-principles.md +0 -44
  182. data/doc/Configuring-and-Customizing-Blacklight.md +0 -271
  183. data/doc/Contributing-to-Blacklight.md +0 -25
  184. data/doc/Examples.md +0 -62
  185. data/doc/Extending-or-Modifying-Blacklight-Search-Behavior.md +0 -141
  186. data/doc/Home.md +0 -77
  187. data/doc/How-to-release-a-version.md +0 -37
  188. data/doc/Indexing-your-data-into-solr.md +0 -5
  189. data/doc/Integration-with-Rails-Footnotes.md +0 -20
  190. data/doc/Pagination.md +0 -38
  191. data/doc/Providing-your-own-view-templates.md +0 -109
  192. data/doc/Quickstart.md +0 -116
  193. data/doc/README.md +0 -77
  194. data/doc/README_SOLR.md +0 -245
  195. data/doc/Release-Notes-And-Upgrade-Guides.md +0 -14
  196. data/doc/Sunspot-for-indexing.md +0 -46
  197. data/doc/User-Authentication.md +0 -60
  198. data/doc/testing.md +0 -115
  199. data/lib/generators/blacklight/solr_conf_generator.rb +0 -26
  200. data/lib/generators/blacklight/templates/assets/standard.css.scss +0 -59
  201. data/lib/generators/blacklight/templates/config/blacklight_config.rb +0 -3
  202. data/lib/generators/blacklight/templates/config/compass.rb +0 -2
  203. data/lib/generators/blacklight/templates/solr_conf/schema.xml +0 -689
  204. data/lib/generators/blacklight/templates/solr_conf/solrconfig.xml +0 -1846
  205. data/lib/solrmarc.log.1 +0 -849
  206. data/test_support/spec/controllers/bookmarks_controller_spec.rb +0 -48
@@ -44,8 +44,10 @@ module Blacklight::CatalogHelperBehavior
44
44
  total_num = format_num(total_hits)
45
45
 
46
46
  # TODO: i18n the entry_name
47
- entry_name = options[:entry_name] ||
48
- (response.empty?? t('blacklight.entry_name.default') : response.docs.first.class.name.underscore.sub('_', ' '))
47
+ entry_name = options[:entry_name]
48
+ entry_name ||= response.docs.first.class.name.underscore.sub('_', ' ') unless response.docs.empty?
49
+ entry_name ||= t('blacklight.entry_name.default')
50
+
49
51
 
50
52
  case response.total
51
53
  when 0; t('blacklight.search.pagination_info.no_items_found', :entry_name => entry_name.pluralize ).html_safe
@@ -70,7 +72,7 @@ module Blacklight::CatalogHelperBehavior
70
72
  end
71
73
 
72
74
  def current_sort_field
73
- blacklight_config.sort_fields[params[:sort]] || blacklight_config.sort_fields.first.last
75
+ blacklight_config.sort_fields[params[:sort]] || (blacklight_config.sort_fields.first ? blacklight_config.sort_fields.first.last : nil )
74
76
  end
75
77
 
76
78
  # Export to Refworks URL, called in _show_tools
@@ -51,7 +51,7 @@ module Blacklight::FacetsHelperBehavior
51
51
  # solr field used for faceting. Can be over-ridden for custom
52
52
  # display on a per-facet basis.
53
53
  #
54
- # @param [RSolr::Ext::Response::Facets::FacetField] display_facet
54
+ # @param [Blacklight::SolrResponse::Facets::FacetField] display_facet
55
55
  # @param [Hash] options parameters to use for rendering the facet limit partial
56
56
  #
57
57
  def render_facet_limit(display_facet, options = {})
@@ -76,7 +76,7 @@ module Blacklight::FacetsHelperBehavior
76
76
  # Determine if Blacklight should render the display_facet or not
77
77
  #
78
78
  # By default, only render facets with items.
79
- # @param [RSolr::Ext::Response::Facets::FacetField] display_facet
79
+ # @param [Blacklight::SolrResponse::Facets::FacetField] display_facet
80
80
  def should_render_facet? display_facet
81
81
  # display when show is nil or true
82
82
  display = facet_configuration_for_field(display_facet.name).show != false
@@ -89,7 +89,7 @@ module Blacklight::FacetsHelperBehavior
89
89
  name = facet_configuration_for_field(display_facet.name).try(:partial)
90
90
  name ||= "facet_limit"
91
91
  end
92
-
92
+
93
93
  #
94
94
  # facet param helpers ->
95
95
  #
@@ -101,19 +101,19 @@ module Blacklight::FacetsHelperBehavior
101
101
  # options consist of:
102
102
  # :suppress_link => true # do not make it a link, used for an already selected value for instance
103
103
  def render_facet_value(facet_solr_field, item, options ={})
104
- (link_to_unless(options[:suppress_link], ((item.label if item.respond_to?(:label)) || item.value), add_facet_params_and_redirect(facet_solr_field, item.value), :class=>"facet_select label") + " " + render_facet_count(item.hits)).html_safe
104
+ (link_to_unless(options[:suppress_link], ((item.label if item.respond_to?(:label)) || item.value), add_facet_params_and_redirect(facet_solr_field, item.value), :class=>"facet_select") + " " + render_facet_count(item.hits)).html_safe
105
105
  end
106
106
 
107
107
  # Standard display of a SELECTED facet value, no link, special span
108
108
  # with class, and 'remove' button.
109
109
  def render_selected_facet_value(facet_solr_field, item)
110
- content_tag(:span, render_facet_value(facet_solr_field, item, :suppress_link => true), :class => "selected label") +
111
- link_to(t('blacklight.search.facets.selected.remove'), remove_facet_params(facet_solr_field, item.value, params), :class=>"remove")
110
+ #Updated class for Bootstrap Blacklight
111
+ content_tag(:span, render_facet_value(facet_solr_field, item, :suppress_link => true), :class => "selected") +
112
+ link_to(content_tag(:i, '', :class => "icon-remove") + content_tag(:span, '[remove]', :class => 'hide-text'), remove_facet_params(facet_solr_field, item.value, params), :class=>"remove")
112
113
  end
113
114
 
114
115
  # Renders a count value for facet limits. Can be over-ridden locally
115
- # to change style, for instance not use parens. And can be called
116
- # by plugins to get consistent display.
116
+ # to change style. And can be called by plugins to get consistent display.
117
117
  def render_facet_count(num)
118
118
  content_tag("span", t('blacklight.search.facets.count', :number => num), :class => "count")
119
119
  end
@@ -229,6 +229,6 @@ module Blacklight::FacetsHelperBehavior
229
229
  items << OpenStruct.new(:value => key, :hits => hits, :label => facet_field.query[key][:label])
230
230
  end
231
231
 
232
- RSolr::Ext::Response::Facets::FacetField.new facet_name, items
232
+ Blacklight::SolrResponse::Facets::FacetField.new facet_name, items
233
233
  end
234
234
  end
@@ -1,5 +1,10 @@
1
- <% [:notice, :error, :alert].each do |type| %>
2
- <% if flash[type] %>
3
- <div class="ui-state-<%= type == :error ? 'error' : 'highlight' %> ui-corner-all <%= type.to_s %>"><%= flash[type] %></div>
1
+ <div class="flash_messages">
2
+ <% [:success, :notice, :error, :alert].each do |type| %>
3
+ <%- alert_class = type == :notice ? 'info' : type %>
4
+ <% if flash[type] %>
5
+ <div class="alert alert-<%=alert_class%>"><%= flash[type] %>
6
+ <a class="close" data-dismiss="alert" href="#">x</a>
7
+ </div>
8
+ <% end %>
4
9
  <% end %>
5
- <% end %>
10
+ </div>
@@ -1,18 +1,24 @@
1
- <% if has_user_authentication_provider? %>
2
- <% if current_user %>
3
- <%= link_to t('blacklight.header_links.logout'), destroy_user_session_path %> [<%= link_to current_user, edit_user_registration_path %>]
4
- <% else %>
5
- <%= link_to t('blacklight.header_links.login'), new_user_session_path %>
6
- <% end %>
7
- |
8
- <% end %>
9
- <% if current_or_guest_user %>
10
- <%= link_to t('blacklight.header_links.bookmarks'), bookmarks_path %>
11
- <% end %>
12
- <% if current_user %>
13
- |
14
- <%= link_to t('blacklight.header_links.saved_searches'), saved_searches_path %>
15
- <% end %>
16
- |
17
- <%= link_to t('blacklight.header_links.search_history'), search_history_path %>
1
+ <small>
2
+ <% if has_user_authentication_provider? %>
3
+ <div class="util-links-login">
4
+ <% if current_user %>
5
+ <%= link_to t('blacklight.header_links.logout'), destroy_user_session_path %> <%= "[#{ link_to current_user, edit_user_registration_path }]" unless current_user.to_s.blank? %>
6
+ <% else %>
7
+ <%= link_to t('blacklight.header_links.login'), new_user_session_path %>
8
+ <% end %>
9
+ </div>
18
10
 
11
+ <% end %>
12
+
13
+ <div class="util-links-other">
14
+ <% if current_or_guest_user %>
15
+ <%= link_to t('blacklight.header_links.bookmarks'), bookmarks_path %>
16
+ <% end %>
17
+ <% if has_user_authentication_provider? and current_user %>
18
+ |
19
+ <%= link_to t('blacklight.header_links.saved_searches'), saved_searches_path %>
20
+ <% end %>
21
+ |
22
+ <%= link_to t('blacklight.header_links.search_history'), search_history_path %>
23
+ </div>
24
+ </small>
@@ -1,18 +1,18 @@
1
- <ul class="tools">
1
+ <ul class="bookmarkTools">
2
2
  <li class="cite">
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 => 'lightboxLink'} %>
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 => 'lightboxLink btn'} %>
4
4
  </li>
5
5
  <li class="refworks">
6
- <%= render :partial => 'catalog/refworks_form', :locals => {:documents=>@bookmarks.collect{|doc| doc.document_id}} %>
6
+ <%= render :partial => 'catalog/refworks_form', :locals => {:documents=>@bookmarks} %>
7
7
  </li>
8
8
 
9
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')%>
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'}%>
11
11
  </li>
12
12
  <li class="email">
13
- <%= 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=>"lightboxLink", :id => "emailLink" %>
13
+ <%= 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=>"lightboxLink btn", :id => "emailLink" %>
14
14
  </li>
15
15
  <li>
16
- <%= link_to t('blacklight.bookmarks.clear.action_title'), clear_bookmarks_path, :method => :delete, :data => { :confirm => t('blacklight.bookmarks.clear.action_confirm') } %>
16
+ <%= link_to t('blacklight.bookmarks.clear.action_title'), clear_bookmarks_path, :method => :delete, :data => { :confirm => t('blacklight.bookmarks.clear.action_confirm') }, :class => 'btn' %>
17
17
  </li>
18
- </ul>
18
+ </ul>
@@ -1,25 +1,17 @@
1
1
  <h1><%= t('blacklight.bookmarks.title') %></h1>
2
2
 
3
3
  <%- if current_or_guest_user.blank? -%>
4
-
4
+
5
5
  <h2><%= t('blacklight.bookmarks.need_login') %></h2>
6
-
6
+
7
7
  <%- elsif @document_list.blank? -%>
8
-
8
+
9
9
  <h3><%= t('blacklight.bookmarks.no_bookmarks') %></h3>
10
10
  <% else %>
11
-
12
- <div class="pageEntriesInfo">
13
- <%= render_pagination_info @response, :entry_name=>'item' %>
14
- </div>
15
-
16
11
  <%= render 'sort_and_per_page' %>
17
- <%= render 'results_pagination' %>
18
-
19
- <% sidebar_items << capture do %>
12
+
20
13
  <%= render 'tools' %>
21
- <% end %>
22
- <%= render :partial => 'catalog/document_list' %>
14
+ <%= render_document_index %>
23
15
  <%= render 'results_pagination' %>
24
16
  <% end %>
25
17
 
@@ -7,15 +7,13 @@
7
7
  -%>
8
8
  <% unless existing_bookmark %>
9
9
 
10
- <%= form_tag( bookmark_path( document ), :method => :put, :class => "bookmark_toggle", "data-doc-id" => document.id, :title=> document[document_show_link_field] ) do %>
11
- <%= hidden_field(:bookmark, :title, :value => document[document_show_link_field] ) %>
10
+ <%= form_tag( bookmark_path( document ), :method => :put, :class => "bookmark_toggle", "data-doc-id" => document.id) do %>
12
11
  <%= submit_tag(t('blacklight.bookmarks.add.button'), :id => "bookmark_toggle_#{document.id.to_s.parameterize}", :class => "bookmark_add") %>
13
12
  <% end %>
14
13
 
15
14
  <% else %>
16
15
 
17
- <%= form_tag( bookmark_path( document ), :method => :delete, :class => "bookmark_toggle", "data-doc-id" => document.id, :title=> document[document_show_link_field]) do %>
18
- <%= hidden_field(:bookmark, :title, :value => document[document_show_link_field] ) %>
16
+ <%= form_tag( bookmark_path( document ), :method => :delete, :class => "bookmark_toggle", "data-doc-id" => document.id) do %>
19
17
  <%= submit_tag(t('blacklight.bookmarks.remove.button'), :id => "bookmark_toggle_#{document.id.to_s.parameterize}", :class => "bookmark_remove") %>
20
18
  <% end %>
21
19
 
@@ -3,6 +3,6 @@
3
3
  <%= hidden_field_tag "bookmarks[#{index}][document_id]", document.id %>
4
4
  <%= hidden_field_tag "bookmarks[#{index}][title]", h(document[document_show_link_field])%>
5
5
  <% end %>
6
- <%= link_to_function t('blacklight.bookmarks.collection.add.button'), "document.bookmarks.submit()" %>
6
+ <%= link_to_function t('blacklight.bookmarks.collection.add.button'), "document.bookmarks.submit()", :class => "btn" %>
7
7
  <%= submit_tag t('blacklight.bookmarks.collection.add.button'), :class => 'hide' %>
8
8
  <% end %>
@@ -1,20 +1,21 @@
1
- <% @documents.each do |document| %>
2
-
3
- <h1><%= citation_title(document) %></h1>
4
-
5
- <% if document.respond_to?(:export_as_mla_citation_txt) %>
6
- <h4><%= t('blacklight.citation.mla') %></h4>
7
- <%= document.send(:export_as_mla_citation_txt).html_safe %><br/><br/>
8
- <% end %>
9
-
10
- <% if document.respond_to?(:export_as_apa_citation_txt) %>
11
- <h4><%= t('blacklight.citation.apa') %></h4>
12
- <%= document.send(:export_as_apa_citation_txt).html_safe %><br/><br/>
13
- <% end %>
14
-
15
- <%- if document.respond_to?(:export_as_chicago_citation_txt) -%>
16
- <h4><%= t('blacklight.citation.chicago') %></h4>
17
- <%= document.send(:export_as_chicago_citation_txt).html_safe %>
18
- <%- end -%>
19
-
20
- <% end %>
1
+
2
+ <% @documents.each do |document| %>
3
+
4
+ <h3><%= citation_title(document) %></h3>
5
+
6
+ <% if document.respond_to?(:export_as_mla_citation_txt) %>
7
+ <h4><%= t('blacklight.citation.mla') %></h4>
8
+ <%= document.send(:export_as_mla_citation_txt).html_safe %><br/><br/>
9
+ <% end %>
10
+
11
+ <% if document.respond_to?(:export_as_apa_citation_txt) %>
12
+ <h4><%= t('blacklight.citation.apa') %></h4>
13
+ <%= document.send(:export_as_apa_citation_txt).html_safe %><br/><br/>
14
+ <% end %>
15
+
16
+ <%- if document.respond_to?(:export_as_chicago_citation_txt) -%>
17
+ <h4><%= t('blacklight.citation.chicago') %></h4>
18
+ <%= document.send(:export_as_chicago_citation_txt).html_safe %>
19
+ <%- end -%>
20
+
21
+ <% end %>
@@ -1,7 +1,9 @@
1
- <div id="appliedParams">
2
-
3
- <h3 class="label"><%= t('blacklight.search.filters.title') %></h3>
1
+ <% if query_has_constraints? %>
2
+ <div class="constraints-container">
3
+ <span class="constraints-label"><%= t('blacklight.search.filters.title') %></span>
4
4
 
5
- <%= render_constraints(localized_params) %>
6
-
7
- </div>
5
+ <%=link_to t('blacklight.search.start_over'), url_for(:action=>'index'), :class => "catalog_startOverLink", :id=>"startOverLink" %>
6
+ <%= render_constraints(params) %>
7
+
8
+ </div>
9
+ <% end %>
@@ -1,13 +1,12 @@
1
1
 
2
2
  <% # header bar for doc items in index view -%>
3
- <div class="documentHeader">
4
-
5
- <% # bookmark functions for items/docs -%>
6
- <%= render_index_doc_actions document %>
3
+ <div class="documentHeader clearfix">
7
4
 
8
5
  <% # main title container for doc partial view -%>
9
- <div class="yui-u">
10
- <h3 class="index_title"><%= t('blacklight.search.documents.counter', :counter => (document_counter + 1 + @response.params[:start].to_i)) %><%= link_to_document document, :label=>document_show_link_field, :counter => (document_counter + 1 + @response.params[:start].to_i) %></h3>
11
- </div>
6
+ <h5 class="index_title"><%= t('blacklight.search.documents.counter', :counter => (document_counter + 1 + @response.params[:start].to_i)) %><%= link_to_document document, :label=>document_show_link_field, :counter => (document_counter + 1 + @response.params[:start].to_i) %></h5>
7
+
8
+
9
+ <% # bookmark functions for items/docs -%>
10
+ <%= render_index_doc_actions document, :wrapping_class => "documentFunctions span2" %>
12
11
  </div>
13
12
 
@@ -1,10 +1,4 @@
1
1
  <% # container for all documents in index view -%>
2
2
  <div id="documents">
3
- <% if Rails.version > "3.2.0" %>
4
- <%= render @document_list, :as => :document %>
5
- <% else %>
6
- <% @document_list.each_with_index do |document, document_counter| %>
7
- <%= render :partial => document.to_partial_path, :locals => { :document => document, :document_counter => document_counter } %>
8
- <% end %>
9
- <% end %>
3
+ <%= render documents, :as => :document %>
10
4
  </div>
@@ -1,17 +1,43 @@
1
- <h1><%= t('blacklight.email.form.title') %></h1>
2
- <%= form_tag url_for(:controller => "catalog", :action => "email"), :id => 'email_form', :method => :post do %>
3
- <%= label_tag(:to, t('blacklight.email.form.to')) %><br/>
4
- <%= text_field_tag :to %><br/>
5
- <%= label_tag(:message, t('blacklight.email.form.message')) %><br/>
6
- <%= text_area_tag :message %><br/>
7
- <% @documents.each do |doc| %>
8
- <%=hidden_field_tag "id[]", doc.get(:id)%>
9
- <% end %>
10
- <%- if params[:sort] -%>
11
- <%= hidden_field_tag "sort", params[:sort] %>
12
- <%- end -%>
13
- <%- if params[:per_page] -%>
14
- <%= hidden_field_tag "per_page", params[:per_page] %>
15
- <%- end -%>
16
- <%= submit_tag t('blacklight.email.form.submit') %>
1
+ <%- unless flash[:success] %>
2
+ <%= form_tag url_for(:controller => "catalog", :action => "email"), :id => 'email_form', :class => "form-horizontal ajax_form", :method => :post do %>
3
+
4
+ <div class="modal-body">
5
+ <%= render :partial=>'/flash_msg' %>
6
+ <div class="control-group">
7
+ <label class="control-label" for="to">
8
+ <%= t('blacklight.email.form.to') %>
9
+ </label>
10
+ <div class="controls">
11
+
12
+ <%= text_field_tag :to, params[:to] %><br/>
13
+ </div>
14
+ </div>
15
+ <div class="control-group">
16
+ <label class="control-label" for="message">
17
+ <%= t('blacklight.email.form.message') %>
18
+ </label>
19
+ <div class="controls">
20
+ <%= text_area_tag :message, params[:message] %>
21
+ </div>
22
+ </div>
23
+
24
+ <% @documents.each do |doc| %>
25
+ <%=hidden_field_tag "id[]", doc.get(:id)%>
26
+ <% end %>
27
+ <%- if params[:sort] -%>
28
+ <%= hidden_field_tag "sort", params[:sort] %>
29
+ <%- end -%>
30
+ <%- if params[:per_page] -%>
31
+ <%= hidden_field_tag "per_page", params[:per_page] %>
32
+ <%- end -%>
33
+ </div>
34
+ <div class="modal-footer">
35
+ <button type="submit" class="btn btn-primary"> <%= t('blacklight.sms.form.submit') %></button>
36
+ </div>
17
37
  <% end %>
38
+ <%- else %>
39
+ <div class="modal-body">
40
+ <%= render :partial=>'/flash_msg' %>
41
+ <span class="ajax-close-modal"/>
42
+ </div>
43
+ <%- end %>
@@ -1,4 +1,4 @@
1
1
  <div class="facet_limit blacklight-<%= facet_field.field.parameterize %>">
2
- <h3><%= facet_field.label -%></h3>
2
+ <h5><%= facet_field.label -%> <i class="icon-chevron"></i></h3>
3
3
  <%= yield %>
4
4
  </div>
@@ -14,7 +14,7 @@
14
14
  <% end %>
15
15
 
16
16
  <% if(paginator.has_next?) %>
17
- <li class="more_facets_link"><%= link_to(t('blacklight.search.facets.more'), params.merge(:id => solr_field, :action=>"facet"), :class => "more_facets_link") %></li>
17
+ <li class="more_facets_link"><%= link_to(t('blacklight.search.facets.more'), params.merge(:id => solr_field, :action=>"facet", :page => nil), :class => "more_facets_link") %></li>
18
18
  <% end %>
19
19
 
20
20
  </ul>
@@ -1,24 +1,21 @@
1
- <% if @pagination.has_previous? || @pagination.has_next? %>
2
- <div class="prev_next_links">
3
- <%= link_to_previous_page @pagination, raw(t('views.pagination.previous')), :params => params, :param_name => Blacklight::Solr::FacetPaginator.request_keys[:page], :class => 'ui-state-active next_page' do %>
4
- <span class="disabled ui-state-active prev_page"><%= raw(t('views.pagination.previous')) %></span>
1
+
2
+ <div class="prev_next_links btn-group pull-left">
3
+ <%= link_to_previous_page @pagination, raw(t('views.pagination.previous')), :params => params, :param_name => Blacklight::Solr::FacetPaginator.request_keys[:page], :class => 'btn' do %>
4
+ <span class="disabled btn"><%= raw(t('views.pagination.previous')) %></span>
5
5
  <% end %>
6
- <%= link_to_next_page @pagination, raw(t('views.pagination.next')), :params => params, :param_name => Blacklight::Solr::FacetPaginator.request_keys[:page], :class => 'ui-state-active prev_page' do %>
6
+ <%= link_to_next_page @pagination, raw(t('views.pagination.next')), :params => params, :param_name => Blacklight::Solr::FacetPaginator.request_keys[:page], :class => 'btn' do %>
7
7
 
8
- <span class="disabled ui-state-active next_page"><%= raw(t('views.pagination.next')) %></span>
8
+ <span class="disabled btn"><%= raw(t('views.pagination.next')) %></span>
9
9
  <% end %>
10
10
 
11
11
  </div>
12
- <% end %>
13
-
14
- <div class="sort_options">
12
+
13
+ <div class="sort_options btn-group pull-right">
15
14
  <% if @pagination.sort == 'index' -%>
16
- <span class="disabled az"><%= t('blacklight.search.facets.sort.index') %></span><%= link_to_unless(@pagination.sort == 'count', t('blacklight.search.facets.sort.count'),
17
- @pagination.params_for_resort_url('count', params), :class => "sort_change numeric") %>
15
+ <span class="active az btn"><%= t('blacklight.search.facets.sort.index') %></span><%= link_to_unless(@pagination.sort == 'count', t('blacklight.search.facets.sort.count'),
16
+ @pagination.params_for_resort_url('count', params), :class => "sort_change numeric btn") %>
18
17
  <% elsif @pagination.sort == 'count' -%>
19
18
  <%= link_to(t('blacklight.search.facets.sort.index'), @pagination.params_for_resort_url('index', params),
20
- :class => "sort_change az") %><span class="disabled numeric"><%= t('blacklight.search.facets.sort.count') %></span>
19
+ :class => "sort_change az btn") %><span class="active numeric btn"><%= t('blacklight.search.facets.sort.count') %></span>
21
20
  <% end -%>
22
21
  </div>
23
-
24
-
@@ -1,5 +1,19 @@
1
1
  <% # main container for facets/limits menu -%>
2
- <div id="facets" class="facets">
3
- <h2><%= t('blacklight.search.facets.title') %></h2>
2
+ <% if has_facet_values? %>
3
+ <div id="facets" class="facets sidenav">
4
+
5
+
6
+ <h4 data-toggle="collapse" data-target=".facets-collapse">
7
+
8
+ <a class="btn btn-navbar">
9
+ <span class="icon-bar"></span>
10
+ <span class="icon-bar"></span>
11
+ </a>
12
+ <%= t('blacklight.search.facets.title') %>
13
+
14
+ </h4>
15
+ <div class="facets-collapse">
4
16
  <%= render_facet_partials %>
5
17
  </div>
18
+ </div>
19
+ <% end %>&nbsp;