blacklight 3.0pre1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/.gitmodules +6 -0
- data/.yardopts +4 -0
- data/Gemfile +4 -0
- data/LICENSE +14 -0
- data/README.rdoc +168 -0
- data/Rakefile +9 -0
- data/app/controllers/bookmarks_controller.rb +98 -0
- data/app/controllers/feedback_controller.rb +37 -0
- data/app/controllers/folder_controller.rb +49 -0
- data/app/controllers/saved_searches_controller.rb +45 -0
- data/app/controllers/search_history_controller.rb +25 -0
- data/app/helpers/blacklight_helper.rb +606 -0
- data/app/helpers/bookmarks_helper.rb +3 -0
- data/app/helpers/catalog_helper.rb +65 -0
- data/app/helpers/feedback_helper.rb +2 -0
- data/app/helpers/hash_as_hidden_fields.rb +57 -0
- data/app/helpers/render_constraints_helper.rb +120 -0
- data/app/helpers/saved_searches_helper.rb +2 -0
- data/app/helpers/search_history_helper.rb +2 -0
- data/app/models/bookmark.rb +6 -0
- data/app/models/record_mailer.rb +43 -0
- data/app/models/search.rb +19 -0
- data/app/views/_flash_msg.html.erb +6 -0
- data/app/views/_user_util_links.html.erb +13 -0
- data/app/views/bookmarks/index.html.erb +33 -0
- data/app/views/catalog/_bookmark_control.html.erb +25 -0
- data/app/views/catalog/_bookmark_form.html.erb +8 -0
- data/app/views/catalog/_citation.html.erb +15 -0
- data/app/views/catalog/_constraints.html.erb +7 -0
- data/app/views/catalog/_constraints_element.html.erb +33 -0
- data/app/views/catalog/_did_you_mean.html.erb +10 -0
- data/app/views/catalog/_document_list.html.erb +30 -0
- data/app/views/catalog/_email_form.html.erb +11 -0
- data/app/views/catalog/_facet_limit.html.erb +33 -0
- data/app/views/catalog/_facet_pagination.html.erb +28 -0
- data/app/views/catalog/_facets.html.erb +9 -0
- data/app/views/catalog/_folder_control.html.erb +12 -0
- data/app/views/catalog/_home.html.erb +6 -0
- data/app/views/catalog/_home_text.html.erb +6 -0
- data/app/views/catalog/_index_partials/_default.erb +11 -0
- data/app/views/catalog/_marc_view.html.erb +33 -0
- data/app/views/catalog/_opensearch_response_metadata.html.erb +3 -0
- data/app/views/catalog/_previous_next_doc.html.erb +6 -0
- data/app/views/catalog/_refworks_form.html.erb +7 -0
- data/app/views/catalog/_results_pagination.html.erb +11 -0
- data/app/views/catalog/_search_form.html.erb +14 -0
- data/app/views/catalog/_show_partials/_default.html.erb +9 -0
- data/app/views/catalog/_show_sidebar.html.erb +1 -0
- data/app/views/catalog/_show_tools.html.erb +46 -0
- data/app/views/catalog/_sms_form.html.erb +23 -0
- data/app/views/catalog/_solr_request.html.erb +5 -0
- data/app/views/catalog/_sort_and_per_page.html.erb +20 -0
- data/app/views/catalog/_unapi_microformat.html.erb +1 -0
- data/app/views/catalog/citation.html.erb +1 -0
- data/app/views/catalog/email.erb +1 -0
- data/app/views/catalog/endnote.endnote.erb +1 -0
- data/app/views/catalog/facet.html.erb +28 -0
- data/app/views/catalog/index.atom.builder +108 -0
- data/app/views/catalog/index.html.erb +37 -0
- data/app/views/catalog/index.rss.builder +19 -0
- data/app/views/catalog/librarian_view.html.erb +3 -0
- data/app/views/catalog/opensearch.json.erb +0 -0
- data/app/views/catalog/opensearch.xml.erb +11 -0
- data/app/views/catalog/send_email_record.erb +0 -0
- data/app/views/catalog/show.endnote.erb +1 -0
- data/app/views/catalog/show.html.erb +42 -0
- data/app/views/catalog/show.refworks.erb +1 -0
- data/app/views/catalog/sms.erb +1 -0
- data/app/views/catalog/unapi.xml.builder +6 -0
- data/app/views/feedback/complete.html.erb +3 -0
- data/app/views/feedback/show.html.erb +20 -0
- data/app/views/folder/_tools.html.erb +23 -0
- data/app/views/folder/index.html.erb +44 -0
- data/app/views/layouts/blacklight.html.erb +49 -0
- data/app/views/record_mailer/email_record.erb +6 -0
- data/app/views/record_mailer/sms_record.erb +4 -0
- data/app/views/saved_searches/index.html.erb +27 -0
- data/app/views/search_history/index.html.erb +23 -0
- data/blacklight.gemspec +50 -0
- data/config.ru +4 -0
- data/config/routes.rb +54 -0
- data/db/seeds.rb +7 -0
- data/features/generators.feature +77 -0
- data/features/support/aruba.rb +9 -0
- data/install.rb +0 -0
- data/install/solr.yml +8 -0
- data/lib/blacklight.rb +121 -0
- data/lib/blacklight/catalog.rb +311 -0
- data/lib/blacklight/comma_link_renderer.rb +27 -0
- data/lib/blacklight/configurable.rb +46 -0
- data/lib/blacklight/controller.rb +121 -0
- data/lib/blacklight/engine.rb +32 -0
- data/lib/blacklight/exceptions.rb +13 -0
- data/lib/blacklight/marc.rb +46 -0
- data/lib/blacklight/marc/citation.rb +251 -0
- data/lib/blacklight/search_fields.rb +107 -0
- data/lib/blacklight/solr.rb +7 -0
- data/lib/blacklight/solr/document.rb +239 -0
- data/lib/blacklight/solr/document/dublin_core.rb +40 -0
- data/lib/blacklight/solr/document/email.rb +15 -0
- data/lib/blacklight/solr/document/marc.rb +84 -0
- data/lib/blacklight/solr/document/marc_export.rb +430 -0
- data/lib/blacklight/solr/document/sms.rb +13 -0
- data/lib/blacklight/solr/facet_paginator.rb +93 -0
- data/lib/blacklight/solr_helper.rb +413 -0
- data/lib/blacklight/user.rb +55 -0
- data/lib/blacklight/version.rb +3 -0
- data/lib/colorize.rb +196 -0
- data/lib/generators/blacklight/blacklight_generator.rb +134 -0
- data/lib/generators/blacklight/templates/SolrMarc.jar +0 -0
- data/lib/generators/blacklight/templates/catalog_controller.rb +8 -0
- data/lib/generators/blacklight/templates/config/SolrMarc/config-test.properties +37 -0
- data/lib/generators/blacklight/templates/config/SolrMarc/config.properties +37 -0
- data/lib/generators/blacklight/templates/config/SolrMarc/index.properties +97 -0
- data/lib/generators/blacklight/templates/config/SolrMarc/index_scripts/dewey.bsh +47 -0
- data/lib/generators/blacklight/templates/config/SolrMarc/index_scripts/format.bsh +126 -0
- data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/README_MAPS +1 -0
- data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/callnumber_map.properties +407 -0
- data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/composition_era_map.properties +56 -0
- data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/country_map.properties +379 -0
- data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/format_map.properties +50 -0
- data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/instrument_map.properties +101 -0
- data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/language_map.properties +490 -0
- data/lib/generators/blacklight/templates/config/blacklight_config.rb +245 -0
- data/lib/generators/blacklight/templates/config/solr.yml +6 -0
- data/lib/generators/blacklight/templates/migrations/add_user_types_to_bookmarks_searches.rb +11 -0
- data/lib/generators/blacklight/templates/migrations/create_bookmarks.rb +17 -0
- data/lib/generators/blacklight/templates/migrations/create_searches.rb +15 -0
- data/lib/generators/blacklight/templates/migrations/remove_editable_fields_from_bookmarks.rb +11 -0
- data/lib/generators/blacklight/templates/public/images/blacklight/bg.png +0 -0
- data/lib/generators/blacklight/templates/public/images/blacklight/border.png +0 -0
- data/lib/generators/blacklight/templates/public/images/blacklight/bul_sq_gry.gif +0 -0
- data/lib/generators/blacklight/templates/public/images/blacklight/checkmark.gif +0 -0
- data/lib/generators/blacklight/templates/public/images/blacklight/logo.png +0 -0
- data/lib/generators/blacklight/templates/public/images/blacklight/magnifying_glass.gif +0 -0
- data/lib/generators/blacklight/templates/public/images/blacklight/remove.gif +0 -0
- data/lib/generators/blacklight/templates/public/images/blacklight/separator.gif +0 -0
- data/lib/generators/blacklight/templates/public/images/blacklight/start_over.gif +0 -0
- data/lib/generators/blacklight/templates/public/javascripts/blacklight.js +485 -0
- data/lib/generators/blacklight/templates/public/javascripts/jquery-1.4.2.min.js +154 -0
- data/lib/generators/blacklight/templates/public/javascripts/jquery-ui-1.8.1.custom.min.js +756 -0
- data/lib/generators/blacklight/templates/public/stylesheets/blacklight.css +487 -0
- data/lib/generators/blacklight/templates/public/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/lib/generators/blacklight/templates/public/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/lib/generators/blacklight/templates/public/stylesheets/jquery/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/lib/generators/blacklight/templates/public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/lib/generators/blacklight/templates/public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/lib/generators/blacklight/templates/public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/generators/blacklight/templates/public/stylesheets/jquery/ui-lightness/images/ui-bg_gloss-wave_35_558fd0_500x100.png +0 -0
- data/lib/generators/blacklight/templates/public/stylesheets/jquery/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/lib/generators/blacklight/templates/public/stylesheets/jquery/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/lib/generators/blacklight/templates/public/stylesheets/jquery/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/lib/generators/blacklight/templates/public/stylesheets/jquery/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/lib/generators/blacklight/templates/public/stylesheets/jquery/ui-lightness/images/ui-icons_2e4f81_256x240.png +0 -0
- data/lib/generators/blacklight/templates/public/stylesheets/jquery/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/lib/generators/blacklight/templates/public/stylesheets/jquery/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/lib/generators/blacklight/templates/public/stylesheets/jquery/ui-lightness/jquery-ui-1.8.1.custom.css +486 -0
- data/lib/generators/blacklight/templates/public/stylesheets/yui.css +31 -0
- data/lib/generators/blacklight/templates/solr_document.rb +30 -0
- data/lib/railties/blacklight.rake +66 -0
- data/lib/railties/cucumber.rake +53 -0
- data/lib/railties/rspec.rake +188 -0
- data/lib/railties/solr_marc.rake +148 -0
- data/lib/railties/test_solr_server.rb +130 -0
- data/spec/helpers/catalog_helper_spec.rb +111 -0
- data/spec/views/catalog/_sms_form.html.erb_spec.rb +19 -0
- data/tasks/blacklight_tasks.rake +4 -0
- data/uninstall.rb +1 -0
- metadata +431 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
<%- # local params:
|
2
|
+
# label
|
3
|
+
# value
|
4
|
+
# options =>
|
5
|
+
# :remove => url for a remove constraint link
|
6
|
+
# :classes => array of classes to add to container span
|
7
|
+
options ||= {}
|
8
|
+
options[:escape_label] = true unless options.has_key?(:escape_label)
|
9
|
+
options[:escape_value] = true unless options.has_key?(:escape_value)
|
10
|
+
-%>
|
11
|
+
|
12
|
+
<span class="appliedFilter constraint <%= options[:classes].join(" ") if options[:classes] %>">
|
13
|
+
<%- unless label.blank? -%>
|
14
|
+
<span class="filterName"><%= options[:escape_label] ? h(label) : raw(label) %></span>
|
15
|
+
<%- end -%>
|
16
|
+
<%- unless value.blank? -%>
|
17
|
+
<span class="filterValue"><%= options[:escape_value] ? h(value) : raw(value) %></span>
|
18
|
+
<%- end -%>
|
19
|
+
<%- unless options[:remove].blank? -%>
|
20
|
+
<% accessible_remove_label =
|
21
|
+
if label.blank?
|
22
|
+
"Remove constraint #{options[:escape_value] ? h(value) : value}"
|
23
|
+
else
|
24
|
+
"Remove constraint #{options[:escape_value] ? h(value) : value}: #{options[:escape_value] ? h(value) : value}"
|
25
|
+
end
|
26
|
+
%>
|
27
|
+
<%= link_to(accessible_remove_label,
|
28
|
+
options[:remove],
|
29
|
+
:class=>'btnRemove imgReplace',
|
30
|
+
:alt=>'remove'
|
31
|
+
) %>
|
32
|
+
<%- end -%>
|
33
|
+
</span>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<% if @response.response[:numFound] <= spell_check_max and @response.spelling.words.size > 0 %>
|
2
|
+
<div id="spell">
|
3
|
+
<h4 class="suggest"><i>Did you mean to type
|
4
|
+
<% @response.spelling.words.each_with_index do |word,index| -%>
|
5
|
+
<% if index > 0 -%>, or <% end -%>
|
6
|
+
<%= link_to_query(word) -%>
|
7
|
+
<% end -%>
|
8
|
+
?</i></h4>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<% # container for all documents in index view -%>
|
2
|
+
<div id="documents">
|
3
|
+
|
4
|
+
<% # loop thru each doc -%>
|
5
|
+
<% @document_list.each_with_index do |document,counter| %>
|
6
|
+
|
7
|
+
<% # container for a single doc -%>
|
8
|
+
<div class="document <%= render_document_class document %>">
|
9
|
+
|
10
|
+
<% # header bar for doc items in index view -%>
|
11
|
+
<div class="documentHeader">
|
12
|
+
|
13
|
+
<% # bookmark/folder functions for items/docs -%>
|
14
|
+
<%= render_index_doc_actions document %>
|
15
|
+
|
16
|
+
<% # main title container for doc partial view -%>
|
17
|
+
<div class="yui-u">
|
18
|
+
<h3 class="index_title"><%= counter + 1 + @response.params[:start].to_i %>. <%= link_to_document document, :label=>document_show_link_field, :counter => (counter + 1 + @response.params[:start].to_i) %></h3>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<% # main container for doc partial view -%>
|
23
|
+
<%= render_document_partial document, :index %>
|
24
|
+
|
25
|
+
<%= render_document_unapi_microformat document %>
|
26
|
+
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<% end %>
|
30
|
+
</div>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<h1>Email This</h1>
|
2
|
+
<%= form_tag url_for(:controller => "catalog", :action => "email"), :id => 'email_form', :method => :post do %>
|
3
|
+
<%= label_tag(:to, "Email:") %><br/>
|
4
|
+
<%= text_field_tag :to %><br/>
|
5
|
+
<%= label_tag(:message, "Message:") %><br/>
|
6
|
+
<%= text_area_tag :message %><br/>
|
7
|
+
<% @documents.each do |doc| %>
|
8
|
+
<%=hidden_field_tag "id[]", doc.get(:id)%>
|
9
|
+
<% end %>
|
10
|
+
<%= submit_tag "Send" %>
|
11
|
+
<% end %>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<%- # required to pass in local :solr_field
|
2
|
+
# optional :display_heading parameter, sometimes set to false
|
3
|
+
# by plugins that might re-use this inside something else.
|
4
|
+
display_heading = true unless local_assigns.has_key?(:display_heading)
|
5
|
+
-%>
|
6
|
+
|
7
|
+
<% display_facet = @response.facets.detect {|f| f.name == solr_field} -%>
|
8
|
+
<% if display_facet && display_facet.items.length > 0 %>
|
9
|
+
<% if display_heading %>
|
10
|
+
<h3><%= facet_field_labels[solr_field] -%></h3>
|
11
|
+
<% end %>
|
12
|
+
<ul>
|
13
|
+
<% paginator =
|
14
|
+
Blacklight::Solr::FacetPaginator.new(display_facet.items,
|
15
|
+
:limit => facet_limit_for(solr_field))
|
16
|
+
%>
|
17
|
+
<% paginator.items.each do |item| -%>
|
18
|
+
<li>
|
19
|
+
<% if facet_in_params?( solr_field, item.value ) %>
|
20
|
+
<%= render_selected_facet_value(solr_field, item) %>
|
21
|
+
<% else %>
|
22
|
+
<%= render_facet_value(solr_field, item) %>
|
23
|
+
<% end -%>
|
24
|
+
</li>
|
25
|
+
<% end %>
|
26
|
+
|
27
|
+
<% if(paginator.has_next?) %>
|
28
|
+
<li class="more_facets_link"><%= link_to('more »', params.merge(:id => solr_field, :action=>"facet"), :class => "more_facets_link") %></li>
|
29
|
+
<% end %>
|
30
|
+
|
31
|
+
</ul>
|
32
|
+
<% end %>
|
33
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<% if @pagination.has_previous? || @pagination.has_next? %>
|
2
|
+
<div class="prev_next_links">
|
3
|
+
<% if @pagination.has_previous? -%>
|
4
|
+
<%= link_to('« Previous', catalog_facet_path( @pagination.params_for_previous_url( params) ) , :class=>:prev_page) %>
|
5
|
+
<% else -%>
|
6
|
+
<span class="disabled ui-state-active prev_page">« Previous</span>
|
7
|
+
<% end -%>
|
8
|
+
|
9
|
+
<% if @pagination.has_next? -%>
|
10
|
+
<%= link_to('Next »', catalog_facet_path( @pagination.params_for_next_url(params)), :class => :next_page ) %>
|
11
|
+
<% else -%>
|
12
|
+
<span class="disabled ui-state-active next_page">Next »</span>
|
13
|
+
<% end -%>
|
14
|
+
|
15
|
+
</div>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<div class="sort_options">
|
19
|
+
<% if @pagination.sort == 'index' -%>
|
20
|
+
<span class="disabled az">A-Z Sort</span><%= link_to_unless(@pagination.sort == 'count', "Numerical Sort",
|
21
|
+
@pagination.params_for_resort_url('count', params), :class => "sort_change numeric") %>
|
22
|
+
<% elsif @pagination.sort == 'count' -%>
|
23
|
+
<%= link_to("A-Z Sort", @pagination.params_for_resort_url('index', params),
|
24
|
+
:class => "sort_change az") %><span class="disabled numeric">Numerical Sort</span>
|
25
|
+
<% end -%>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<% # main container for facets/limits menu -%>
|
2
|
+
<div id="facets" class="facets">
|
3
|
+
<h2>Limit your search</h2>
|
4
|
+
<% facet_field_names.each do |solr_fname| %>
|
5
|
+
<div class="facet_limit blacklight-<%= solr_fname.parameterize %>">
|
6
|
+
<%= render_facet_limit(solr_fname) %>
|
7
|
+
</div>
|
8
|
+
<% end %>
|
9
|
+
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%-
|
2
|
+
# pass in local :document with a SolrDocument
|
3
|
+
method = (item_in_folder?(document[:id]) ? "delete" : "put")
|
4
|
+
label = (item_in_folder?(document[:id]) ? "Unselect" : "Select")
|
5
|
+
cssClass = (item_in_folder?(document[:id]) ? "deleteFolder" : "addFolder")
|
6
|
+
-%>
|
7
|
+
|
8
|
+
<%= form_tag( folder_path(document[:id]), :method => method, :class=> "folder_toggle #{cssClass}", "data-doc-id" => document[:id], :title=>h(document[document_show_link_field])) do -%>
|
9
|
+
<%= hidden_field(:bookmark, :title, :value => document[document_show_link_field]) %>
|
10
|
+
<%= submit_tag(label, :class=>"folder_submit", :id => "folder_submit_#{document[:id]}") %>
|
11
|
+
<% end %>
|
12
|
+
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<h3>Welcome!</h3>
|
2
|
+
<p>To modify this text to your specifications, copy this file located in the blacklight plugin directory:<br/>
|
3
|
+
vendor/plugins/blacklight/app/views/catalog/_home_text.html.erb</p>
|
4
|
+
<p>to your top level rails app:<br/>
|
5
|
+
app/views/catalog/_home_text.html.erb</p>
|
6
|
+
Note that you will need to create the 'catalog' directory under views.
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%# default partial to display solr document fields in catalog index view -%>
|
2
|
+
<dl class="defList">
|
3
|
+
|
4
|
+
<% index_field_names.each do |solr_fname| -%>
|
5
|
+
<% if document.has? solr_fname %>
|
6
|
+
<dt class="blacklight-<%= solr_fname.parameterize %>"><%= render_index_field_label :field => solr_fname %></dt>
|
7
|
+
<dd class="blacklight-<%= solr_fname.parameterize %>"><%= render_index_field_value :document => document, :field => solr_fname %></dd>
|
8
|
+
<% end -%>
|
9
|
+
<% end -%>
|
10
|
+
|
11
|
+
</dl>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<h1>Librarian View</h1>
|
2
|
+
<div id="marc_view">
|
3
|
+
<% fields = @document.to_marc.find_all{|f| ('000'..'999') === f.tag } %>
|
4
|
+
<div class="field">LEADER <%= @document.to_marc.leader %></div>
|
5
|
+
<%- fields.each do |field| -%>
|
6
|
+
<%- unless field.tag.to_s == "940" -%>
|
7
|
+
<div class="field">
|
8
|
+
<div class="tag_ind">
|
9
|
+
<span class="tag">
|
10
|
+
<%= h(field.tag) %>
|
11
|
+
</span>
|
12
|
+
<%- if field.is_a?(MARC::ControlField) -%>
|
13
|
+
<span class="control_field_values">
|
14
|
+
<%= h(field.value) %>
|
15
|
+
</span>
|
16
|
+
<%- else -%>
|
17
|
+
<div class="ind1">
|
18
|
+
<%= !field.indicator1.blank? ? field.indicator1 : " ".html_safe -%>
|
19
|
+
</div>
|
20
|
+
<div class="ind2">
|
21
|
+
<%= !field.indicator2.blank? ? field.indicator2 : " ".html_safe -%>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
<div class="subfields">
|
25
|
+
<%- field.each do |sub| -%>
|
26
|
+
<span class="sub_code"><%= h(sub.code) %>|</span> <%= h(sub.value) %>
|
27
|
+
<%- end -%>
|
28
|
+
<%- end -%>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
<%- end-%>
|
32
|
+
<%- end -%>
|
33
|
+
</div>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<%= tag :meta, :name => "totalResults", :content => @response.total %>
|
2
|
+
<%= tag :meta, :name => "startIndex", :content => (@response.docs.next_page == 2 ? 1 : @response.docs.previous_page * @response.docs.per_page + 1) %>
|
3
|
+
<%= tag :meta, :name => "itemsPerPage", :content => @response.docs.per_page %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= form_tag "http://www.refworks.com/express/expressimport.asp?vendor=#{application_name}&filter=MARC%20Format&encoding=65001", :name => "refworks", :target => "_blank" do %>
|
2
|
+
|
3
|
+
<%= hidden_field_tag "ImportData", render_refworks_texts(documents) %>
|
4
|
+
<%= submit_tag "Export to Refworks", :class => 'submit'%>
|
5
|
+
<%= link_to_function "Export to Refworks", "document.refworks.submit();" %>
|
6
|
+
<% end %>
|
7
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<% if @response.docs.total_pages > 1 %>
|
2
|
+
<div class="pagination">
|
3
|
+
<% # will_paginate is called oddly because we want next/prev together
|
4
|
+
# at left for screen reader accessibility. We use CSS to restore
|
5
|
+
# a more conventional next-on-right.
|
6
|
+
%>
|
7
|
+
<h2>Results navigation</h2>
|
8
|
+
<%= will_paginate @response.docs, :page_links => false, :container => false, :renderer => Blacklight::CommaLinkRenderer %>
|
9
|
+
<%= will_paginate @response.docs, :next_label => '', :previous_label => '', :class => "page_links", :renderer => Blacklight::CommaLinkRenderer %>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div id="search" class="search">
|
2
|
+
<%= form_tag catalog_index_path, :method => :get do %>
|
3
|
+
<h2 class="search"><%= label_tag(:q, "Search ") %></h2>
|
4
|
+
<%= text_field_tag :q, params[:q], :class => "q" %>
|
5
|
+
<%= label_tag(:search_field, " in ") %>
|
6
|
+
<%= select_tag(:search_field, options_for_select(search_fields, h(params[:search_field])), :title => "Targeted search options", :class=>"search_field") %>
|
7
|
+
|
8
|
+
<%= search_as_hidden_fields(:omit_keys => [:q, :search_field, :qt, :page]).html_safe %>
|
9
|
+
|
10
|
+
<%= submit_tag 'search', :class=>'submit' %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<hr/>
|
14
|
+
</div>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%# default partial to display solr document fields in catalog show view -%>
|
2
|
+
<dl class="defList">
|
3
|
+
<% document_show_fields.each do |solr_fname| -%>
|
4
|
+
<% if document.has? solr_fname %>
|
5
|
+
<dt class="blacklight-<%= solr_fname.parameterize %>"><%= render_document_show_field_label :field => solr_fname %></dt>
|
6
|
+
<dd class="blacklight-<%= solr_fname.parameterize %>"><%= render_document_show_field_value :document => document, :field => solr_fname %></dd>
|
7
|
+
<% end -%>
|
8
|
+
<% end -%>
|
9
|
+
</dl>
|
@@ -0,0 +1 @@
|
|
1
|
+
<p><%= link_back_to_catalog %></p>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<%-
|
2
|
+
# Compare with render_document_functions_partial helper, and
|
3
|
+
# _document_functions partial. BL actually has two groups
|
4
|
+
# of document-related tools. "document functions" by default
|
5
|
+
# contains Bookmark/Folder functionality shown on both results and
|
6
|
+
# item view. While "document tools" contains external export type
|
7
|
+
# functions by default only on detail.
|
8
|
+
-%>
|
9
|
+
<ul class="tools">
|
10
|
+
|
11
|
+
<% if (@document.respond_to?(:export_as_mla_citation_txt) || @document.respond_to?(:export_as_apa_citation_txt)) %>
|
12
|
+
<li class="cite">
|
13
|
+
<%= link_to "Cite This", citation_catalog_path(:id => @document[:id]), {:id => 'citeLink', :name => 'citation', :class => 'lightboxLink'} %>
|
14
|
+
</li>
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
<% if @document.export_formats.keys.include?( :refworks_marc_txt ) %>
|
18
|
+
<li class="refworks">
|
19
|
+
<%= link_to "Export to RefWorks", refworks_export_url(@document) %>
|
20
|
+
</li>
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<% if @document.export_formats.keys.include?( :endnote ) %>
|
24
|
+
<li class="endnote">
|
25
|
+
<%= link_to "Export to EndNote", catalog_path(@document[:id], :format => 'endnote') %>
|
26
|
+
</li>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
<% if @document.respond_to?( :to_email_text ) %>
|
30
|
+
<li class="email">
|
31
|
+
<%= link_to "Email This", email_catalog_path(:id => @document[:id]), {:id => 'emailLink', :name => 'email', :class => 'lightboxLink'} %>
|
32
|
+
</li>
|
33
|
+
<%- end -%>
|
34
|
+
<%- if @document.respond_to?( :to_sms_text ) -%>
|
35
|
+
<li class="sms">
|
36
|
+
<%= link_to "SMS This", sms_catalog_path(:id => @document[:id]), {:id => 'smsLink', :name => 'sms', :class => 'lightboxLink'} %>
|
37
|
+
</li>
|
38
|
+
<%- end -%>
|
39
|
+
|
40
|
+
<% if @document.respond_to?(:to_marc) %>
|
41
|
+
<li class="librarian_view">
|
42
|
+
<%= link_to "Librarian View", librarian_view_catalog_path(@document[:id]), {:id => 'librarianLink', :name => 'librarian_view', :class => 'lightboxLink'} %>
|
43
|
+
</li>
|
44
|
+
<% end %>
|
45
|
+
|
46
|
+
</ul>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<% carriers =
|
2
|
+
{
|
3
|
+
'AT&T' => 'att',
|
4
|
+
'Verizon' => 'verizon',
|
5
|
+
'T Mobile' => 'tmobile',
|
6
|
+
'Sprint' => 'sprint',
|
7
|
+
'Nextel' => 'nextel',
|
8
|
+
'Virgin Mobile' => 'vmobile',
|
9
|
+
'Alltel' => 'alltel',
|
10
|
+
'Cricket' => 'cricket'
|
11
|
+
}
|
12
|
+
%>
|
13
|
+
<h1>SMS This</h1>
|
14
|
+
<%= form_tag url_for(:controller => "catalog", :action => "sms"), :id => 'sms_form', :method => :post do %>
|
15
|
+
<%= label_tag(:to, "Phone Number:") %><br/>
|
16
|
+
<%= text_field_tag :to %><br/>
|
17
|
+
<%= label_tag(:carrier, "Carrier:") %><br/>
|
18
|
+
<%= select_tag(:carrier, options_for_select(carriers.to_a.sort.unshift(["Please select your carrier",'']), '')) %><br/>
|
19
|
+
<% @documents.each do |doc| %>
|
20
|
+
<%=hidden_field_tag "id[]", doc.get(:id)%>
|
21
|
+
<% end %>
|
22
|
+
<%= submit_tag "Send" %>
|
23
|
+
<% end %>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<div id="sortAndPerPage">
|
2
|
+
<% unless @response.response['numFound'] < 2 %>
|
3
|
+
<%-# kind of hacky way to get this to work on catalog and folder controllers. May be able to simple do {:action=>"index"} but I'm not sure -%>
|
4
|
+
<%= form_tag params[:controller] == "folder" ? folder_index_path : catalog_index_path, :method=>:get, :class=>'per_page' do %>
|
5
|
+
<%= label_tag(:per_page) do %>
|
6
|
+
Show <%= select_tag(:per_page, options_for_select(['10', '20', '50', '100'], h(params[:per_page])), :title => "Number of results to display per page") %> per page
|
7
|
+
<% end %>
|
8
|
+
<%= search_as_hidden_fields(:omit_keys => [:page, :per_page]) %>
|
9
|
+
<%= submit_tag 'update' %>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%-# kind of hacky way to get this to work on catalog and folder controllers. May be able to simple do {:action=>"index"} but I'm not sure -%>
|
13
|
+
<%= form_tag params[:controller] == "folder" ? folder_index_path : catalog_index_path, :method=>:get, :class=>'sort', :id => "sort_form" do %>
|
14
|
+
<%= label_tag(:sort, "Sort by ") %>
|
15
|
+
<%= select_tag(:sort, options_for_select(sort_fields, h(params[:sort]))) %>
|
16
|
+
<%= search_as_hidden_fields(:omit_keys => [:page, :sort]) %>
|
17
|
+
<%= submit_tag 'sort results' %>
|
18
|
+
<% end %>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= content_tag :abbr, '', :class => 'unapi-id', :title => document.id %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render :partial => 'citation' -%>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render :partial => 'email_form' %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render_endnote_texts(@documents) %>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<div class="facet_extended_list">
|
2
|
+
|
3
|
+
<% sidebar_items << capture do %>
|
4
|
+
<p><%= link_back_to_catalog %></p>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<div class="facet_pagination top">
|
8
|
+
<%= render :partial=>'facet_pagination' %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<h3><%= facet_field_labels[params[:id]] %></h3>
|
12
|
+
|
13
|
+
<ul class="facet_extended_list">
|
14
|
+
<% @pagination.items.each do |item| %>
|
15
|
+
<li>
|
16
|
+
<% if facet_in_params?( params[:id], item.value ) %>
|
17
|
+
<%= render_selected_facet_value(params[:id], item) %>
|
18
|
+
<% else %>
|
19
|
+
<%= render_facet_value(params[:id], item) %>
|
20
|
+
<% end -%>
|
21
|
+
</li>
|
22
|
+
<% end %>
|
23
|
+
</ul>
|
24
|
+
|
25
|
+
<div class="facet_pagination bottom">
|
26
|
+
<%= render :partial=>'facet_pagination' %>
|
27
|
+
</div>
|
28
|
+
</div>
|