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,108 @@
|
|
1
|
+
require 'base64'
|
2
|
+
|
3
|
+
xml.instruct!(:xml, :encoding => "UTF-8")
|
4
|
+
|
5
|
+
xml.feed("xmlns" => "http://www.w3.org/2005/Atom",
|
6
|
+
"xmlns:opensearch"=>"http://a9.com/-/spec/opensearch/1.1/") do
|
7
|
+
|
8
|
+
xml.title application_name + " Search Results"
|
9
|
+
# an author is required, so we'll just use the app name
|
10
|
+
xml.author { xml.name application_name }
|
11
|
+
|
12
|
+
xml.link "rel" => "self", "href" => url_for(params.merge(:only_path => false))
|
13
|
+
xml.link "rel" => "alternate", "href" => url_for(params.merge(:only_path => false, :format => "html")), "type" => "text/html"
|
14
|
+
xml.id url_for(params.merge(:only_path => false, :format => "html", :content_format => nil, "type" => "text/html"))
|
15
|
+
|
16
|
+
# Navigational and context links
|
17
|
+
|
18
|
+
xml.link( "rel" => "next",
|
19
|
+
"href" => url_for(params.merge(:only_path => false, :page => (@response.docs.current_page() + 1).to_s))
|
20
|
+
) if @response.docs.has_next?
|
21
|
+
|
22
|
+
xml.link( "rel" => "previous",
|
23
|
+
"href" => url_for(params.merge(:only_path => false, :page => (@response.docs.current_page() - 1).to_s))
|
24
|
+
) if @response.docs.has_previous?
|
25
|
+
|
26
|
+
xml.link( "rel" => "first",
|
27
|
+
"href" => url_for(params.merge(:only_path => false, :page => "1")))
|
28
|
+
|
29
|
+
xml.link( "rel" => "last",
|
30
|
+
"href" => url_for(params.merge(:only_path => false, :page => @response.docs.total_pages.to_s)))
|
31
|
+
|
32
|
+
# "search" doesn't seem to actually be legal, but is very common, and
|
33
|
+
# used as an example in opensearch docs
|
34
|
+
xml.link( "rel" => "search",
|
35
|
+
"type" => "application/opensearchdescription+xml",
|
36
|
+
"href" => url_for(:controller=>'catalog',:action => 'opensearch', :format => 'xml', :only_path => false))
|
37
|
+
|
38
|
+
# opensearch response elements
|
39
|
+
xml.opensearch :totalResults, @response.docs.total.to_s
|
40
|
+
xml.opensearch :startIndex, @response.docs.start.to_s
|
41
|
+
xml.opensearch :itemsPerPage, @response.docs.per_page.to_s
|
42
|
+
xml.opensearch :Query, :role => "request", :searchTerms => params[:q], :startPage => @response.docs.current_page
|
43
|
+
|
44
|
+
|
45
|
+
# updated is required, for now we'll just set it to now, sorry
|
46
|
+
xml.updated Time.now.strftime("%Y-%m-%dT%H:%M:%SZ")
|
47
|
+
|
48
|
+
@document_list.each do |doc|
|
49
|
+
xml.entry do
|
50
|
+
xml.title doc.to_semantic_values[:title][0] || doc[:id]
|
51
|
+
|
52
|
+
# updated is required, for now we'll just set it to now, sorry
|
53
|
+
xml.updated Time.now.strftime("%Y-%m-%dT%H:%M:%SZ")
|
54
|
+
|
55
|
+
xml.link "rel" => "alternate", "type" => "text/html", "href" => catalog_url(doc[:id])
|
56
|
+
# add other doc-specific formats, atom only lets us have one per
|
57
|
+
# content type, so the first one in the list wins.
|
58
|
+
xml << render_link_rel_alternates(doc, :unique => true)
|
59
|
+
|
60
|
+
xml.id catalog_url(doc[:id])
|
61
|
+
|
62
|
+
|
63
|
+
if doc.to_semantic_values[:author][0]
|
64
|
+
xml.author { xml.name(doc.to_semantic_values[:author][0]) }
|
65
|
+
end
|
66
|
+
|
67
|
+
with_format("html") do
|
68
|
+
xml.summary "type" => "html" do
|
69
|
+
xml.text! render_document_partial(doc, :index)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
#If they asked for a format, give it to them.
|
74
|
+
if (params["content_format"] &&
|
75
|
+
doc.export_formats[params["content_format"].to_sym])
|
76
|
+
|
77
|
+
type = doc.export_formats[params["content_format"].to_sym][:content_type]
|
78
|
+
|
79
|
+
xml.content :type => type do |content_element|
|
80
|
+
data = doc.export_as(params["content_format"])
|
81
|
+
|
82
|
+
# encode properly. See:
|
83
|
+
# http://tools.ietf.org/html/rfc4287#section-4.1.3.3
|
84
|
+
type = type.downcase
|
85
|
+
if (type.downcase =~ /\+|\/xml$/)
|
86
|
+
# xml, just put it right in
|
87
|
+
content_element << data
|
88
|
+
elsif (type.downcase =~ /text\//)
|
89
|
+
# text, escape
|
90
|
+
content_element.text! data
|
91
|
+
else
|
92
|
+
#something else, base64 encode it
|
93
|
+
content_element << Base64.encode64(data)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
98
|
+
|
99
|
+
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
end
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
@@ -0,0 +1,37 @@
|
|
1
|
+
|
2
|
+
<% unless has_search_parameters? %>
|
3
|
+
<%# if there are no input/search related params, display the "home" partial -%>
|
4
|
+
<%= render 'home' %>
|
5
|
+
<% else %>
|
6
|
+
|
7
|
+
<% @page_title = application_name + " Search Results" %>
|
8
|
+
|
9
|
+
<% extra_head_content << render_opensearch_response_metadata.html_safe %>
|
10
|
+
|
11
|
+
<%= render :partial => 'search_form' %>
|
12
|
+
|
13
|
+
<%= render :partial => 'did_you_mean' %>
|
14
|
+
|
15
|
+
<%= render 'constraints', :localized_params=>params %>
|
16
|
+
|
17
|
+
<div class="pageEntriesInfo">
|
18
|
+
<%= (page_entries_info @response.docs, :entry_name=>'item').html_safe %>
|
19
|
+
<%=link_to "start over", catalog_index_path, :id=>"startOverLink" %>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<%= render 'sort_and_per_page' %>
|
23
|
+
|
24
|
+
<%= render 'results_pagination' %>
|
25
|
+
|
26
|
+
<%= render :partial => 'document_list' %>
|
27
|
+
|
28
|
+
<% sidebar_items << capture do %>
|
29
|
+
<%= render :partial=>'facets' %>
|
30
|
+
<% end %>
|
31
|
+
|
32
|
+
<%= render 'results_pagination' %>
|
33
|
+
|
34
|
+
<%= render :partial=>'solr_request' %>
|
35
|
+
|
36
|
+
<% end %>
|
37
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
xml.instruct! :xml, :version=>"1.0"
|
2
|
+
xml.rss(:version=>"2.0") {
|
3
|
+
|
4
|
+
xml.channel {
|
5
|
+
|
6
|
+
xml.title(application_name + " Search Results")
|
7
|
+
xml.link(catalog_index_url(params))
|
8
|
+
xml.description(application_name + " Search Results")
|
9
|
+
xml.language('en-us')
|
10
|
+
@document_list.each do |doc|
|
11
|
+
xml.item do
|
12
|
+
xml.title( doc.to_semantic_values[:title][0] || doc[:id] )
|
13
|
+
xml.link(catalog_url(doc[:id]))
|
14
|
+
xml.author( doc.to_semantic_values[:author][0] ) if doc.to_semantic_values[:author][0]
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
}
|
19
|
+
}
|
File without changes
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
3
|
+
<ShortName><%= application_name %></ShortName>
|
4
|
+
<Description><%= application_name %> Search</Description>
|
5
|
+
<Image height="16" width="16" type="image/x-icon">/favicon.ico</Image>
|
6
|
+
<Contact/>
|
7
|
+
<Url type="text/html" method="get" template="<%= url_for :controller=>'catalog', :only_path => false %>?q={searchTerms}"/>
|
8
|
+
<Url type="application/rss+xml" method="get" template="<%= url_for :controller=>'catalog', :only_path => false %>.rss?q={searchTerms}"/>
|
9
|
+
<Url type="application/atom+xml" method="get" template="<%= url_for :controller=>'catalog', :only_path => false %>.atom?q={searchTerms}"/>
|
10
|
+
<Url type="application/x-suggestions+json" method="get" template="<%= url_for :controller=>'catalog',:action => 'opensearch', :format=> 'json', :only_path => false %>?q={searchTerms}"/>
|
11
|
+
</OpenSearchDescription>
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render_endnote_text(@document) %>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<% @page_title = "#{document_show_html_title} - #{application_name}" %>
|
2
|
+
<% extra_head_content << render_link_rel_alternates %>
|
3
|
+
<% sidebar_items << render_document_sidebar_partial %>
|
4
|
+
|
5
|
+
<div class="show">
|
6
|
+
<%= render 'constraints', :localized_params=>session[:search] %>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<div class="pageEntriesInfo">
|
10
|
+
<%= item_page_entry_info %>
|
11
|
+
<%=link_to "start over", catalog_index_path, :id=>"startOverLink" %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<%= render 'previous_next_doc' %>
|
15
|
+
|
16
|
+
<%# this should be in a partial -%>
|
17
|
+
<div id="document" class="<%= render_document_class %>">
|
18
|
+
<div id="doc_<%= @document[:id] %>">
|
19
|
+
|
20
|
+
<% # bookmark/folder functions -%>
|
21
|
+
<%= render_show_doc_actions @document %>
|
22
|
+
|
23
|
+
<%= render_document_heading.html_safe %>
|
24
|
+
<div class="tools"><%= render :partial => 'show_tools' %></div>
|
25
|
+
<div class="document">
|
26
|
+
<%= render_document_partial @document, :show %>
|
27
|
+
</div>
|
28
|
+
<%= render_document_unapi_microformat @document %>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<%= render :partial=>'solr_request' %>
|
33
|
+
|
34
|
+
|
35
|
+
<% if @document.respond_to?(:export_as_openurl_ctx_kev) %>
|
36
|
+
<!--
|
37
|
+
// COinS, for Zotero among others.
|
38
|
+
// This document_partial_name(@document) business is not quite right,
|
39
|
+
// but has been there for a while.
|
40
|
+
-->
|
41
|
+
<span class="Z3988" title="<%= @document.export_as_openurl_ctx_kev(document_partial_name(@document)) %>"></span>
|
42
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render_refworks_text(@document) %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render :partial => 'sms_form' %>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<h1>Send Us Feedback</h1>
|
2
|
+
|
3
|
+
<% unless @errors.empty? %>
|
4
|
+
<strong>Please fix the following form errors:</strong>
|
5
|
+
<ul class="errors">
|
6
|
+
<% @errors.each do |msg| %>
|
7
|
+
<li><%= msg %></li>
|
8
|
+
<% end %>
|
9
|
+
</ul>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%= form_tag do %>
|
13
|
+
<fieldset>
|
14
|
+
<div class="row"><%= label_tag 'Your Name' %> <%= text_field_tag :name, params[:name] %></div>
|
15
|
+
<div class="row"><%= label_tag 'Your Email' %> <%= text_field_tag :email, params[:email] %></div>
|
16
|
+
<div class="row"><%= label_tag 'Your Message' %> <%= text_area_tag :message, params[:message] %></div>
|
17
|
+
<%#= show_simple_captcha(:image_style => 'random', :label => "Enter the characters you see into the text field") %>
|
18
|
+
<div class="row"><%= label_tag '' %><%= submit_tag 'Send!' %></div>
|
19
|
+
</fieldset>
|
20
|
+
<% end %>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<ul class="folderTools">
|
2
|
+
<li class="cite">
|
3
|
+
<%= link_to "Cite", citation_catalog_path(:id => @documents.collect{|doc| doc.get(:id)}), {:id => 'citeLink', :name => 'citation'} %>
|
4
|
+
</li>
|
5
|
+
<li class="refworks">
|
6
|
+
<%= render :partial => 'catalog/refworks_form', :locals => {:documents=>@documents} %>
|
7
|
+
</li>
|
8
|
+
<li class="endnote">
|
9
|
+
<%= link_to "Export to EndNote", endnote_catalog_path(:id => @documents.collect {|doc| doc.get(:id)}, :format => 'endnote')%>
|
10
|
+
</li>
|
11
|
+
<li class="email">
|
12
|
+
<%= link_to "Email", email_catalog_path(:id => @documents.collect {|doc| doc.get(:id)}), :class=>"lightboxLink", :id => "emailLink" %>
|
13
|
+
</li>
|
14
|
+
<% if current_user %>
|
15
|
+
<li>
|
16
|
+
<%= render :partial=>'catalog/bookmark_form', :locals=>{:documents=>@documents} %>
|
17
|
+
</li>
|
18
|
+
<% end %>
|
19
|
+
<li>
|
20
|
+
<%= link_to "Clear Selected Items", clear_folder_path, :method => :delete %>
|
21
|
+
</li>
|
22
|
+
</ul>
|
23
|
+
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<% sidebar_items << capture do %>
|
2
|
+
<p><%= link_back_to_catalog %></p>
|
3
|
+
<% end %>
|
4
|
+
<h1>Selected Items</h1>
|
5
|
+
|
6
|
+
<% unless @documents.empty? %>
|
7
|
+
<%- # just adding pageEntriedInfo div to get the proper rounded corners at the top -%>
|
8
|
+
<div class="pageEntriesInfo"></div>
|
9
|
+
<%= render "catalog/sort_and_per_page" %>
|
10
|
+
<%= render "catalog/results_pagination" %>
|
11
|
+
|
12
|
+
<%= render 'tools' %>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<div id="documents">
|
16
|
+
<% @documents.each_with_index do |document, i| %>
|
17
|
+
<% # container for a single doc -%>
|
18
|
+
<div class="document">
|
19
|
+
<% # header bar for doc items in index view -%>
|
20
|
+
<div class="documentHeader">
|
21
|
+
<div class="documentFunctions">
|
22
|
+
<div class="in_folder">
|
23
|
+
<%= render :partial=>'catalog/folder_control', :locals=>{:document=>document} %>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<h3 class="index_title"><%= i + 1 + @response.params[:start].to_i%>. <%= link_to_document document, :label => document_show_link_field, :results_view => false %></h3>
|
28
|
+
|
29
|
+
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<%= render_document_partial document, :index %>
|
33
|
+
<% if document.respond_to?(:export_as_openurl_ctx_kev) %>
|
34
|
+
<!--
|
35
|
+
// COinS, for Zotero among others.
|
36
|
+
// This document_partial_name(@document) business is not quite right,
|
37
|
+
// but has been there for a while.
|
38
|
+
-->
|
39
|
+
<span class="Z3988" title="<%= document.export_as_openurl_ctx_kev(document_partial_name(document)) %>"></span>
|
40
|
+
<% end %>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<% end %>
|
44
|
+
</div>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
+
|
4
|
+
<head>
|
5
|
+
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
+
|
8
|
+
<title><%= h(@page_title || application_name) %></title>
|
9
|
+
<link href="<%= opensearch_catalog_path %>" title="<%= application_name%>" type="application/opensearchdescription+xml" rel="search"/>
|
10
|
+
|
11
|
+
<%= raw(render_head_content) %>
|
12
|
+
|
13
|
+
|
14
|
+
</head>
|
15
|
+
<% if params[:q].to_s.empty? and params[:f].to_s.empty? and params[:id].nil? %>
|
16
|
+
<body onload="$('input#q').focus();" class="<%= render_body_class %>">
|
17
|
+
<% else %>
|
18
|
+
<body class="<%= render_body_class.html_safe %>">
|
19
|
+
<% end %>
|
20
|
+
<div id="doc4" class="yui-t2">
|
21
|
+
|
22
|
+
<div id="hd">
|
23
|
+
<div class="yui-g">
|
24
|
+
<div class="yui-u first">
|
25
|
+
<h1 class="site_title"><%= link_to application_name, "/" %><%= (params[:controller] == "catalog" and !params[:id]) ? "<span id='results_text'>Search Results</span>".html_safe : "" %></h1>
|
26
|
+
</div>
|
27
|
+
<div class="yui-u user_util_links">
|
28
|
+
<%= render :partial=>'/user_util_links' %>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<div id="bd">
|
34
|
+
|
35
|
+
<div id="yui-main">
|
36
|
+
<div class="yui-b">
|
37
|
+
<%= render :partial=>'/flash_msg' %>
|
38
|
+
<%= yield %>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<div class="yui-b sidebar"><%= sidebar_items.join('').html_safe %></div>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
<div id="ft"><%= raw(@footer) %></div>
|
46
|
+
</div>
|
47
|
+
</body>
|
48
|
+
|
49
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<h1>Saved Searches</h1>
|
2
|
+
|
3
|
+
<%- if current_user.blank? -%>
|
4
|
+
|
5
|
+
<h2>Please log in to see your saved searches.</h2>
|
6
|
+
|
7
|
+
<%- elsif @searches.blank? -%>
|
8
|
+
|
9
|
+
<h2>You have no saved searches</h2>
|
10
|
+
|
11
|
+
<%- else -%>
|
12
|
+
<p>
|
13
|
+
<%= link_to "Clear Saved Searches", clear_saved_searches_path, :method => :delete, :confirm => "Clear your saved searches?" %>
|
14
|
+
</p>
|
15
|
+
|
16
|
+
<h2>Your saved searches</h2>
|
17
|
+
<table class="zebra">
|
18
|
+
<%- @searches.each do |search| -%>
|
19
|
+
<tr>
|
20
|
+
<td><%= link_to_previous_search(search.query_params) %></td>
|
21
|
+
<td><%= button_to "delete", forget_search_path(search.id) %></td>
|
22
|
+
</tr>
|
23
|
+
<%- end -%>
|
24
|
+
</table>
|
25
|
+
|
26
|
+
<%- end -%>
|
27
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<h1>Search History</h1>
|
2
|
+
<%- if @searches.blank? -%>
|
3
|
+
<h2>You have no search history</h2>
|
4
|
+
<%- else -%>
|
5
|
+
<p>
|
6
|
+
<%= link_to "Clear Search History", clear_search_history_path, :method => :delete, :confirm => "Clear your search history?" %>
|
7
|
+
</p>
|
8
|
+
<h2>Your recent searches</h2>
|
9
|
+
<table class="zebra search_history">
|
10
|
+
<%- @searches.each_with_index do |search,index| -%>
|
11
|
+
<%= content_tag :tr, :id => "document_#{index + 1}" do %>
|
12
|
+
<td class="query"><%= link_to_previous_search(search.query_params) %></td>
|
13
|
+
<td class="actions"><%- if current_user && search.saved? -%>
|
14
|
+
<%= button_to "forget", forget_search_path(search.id) %>
|
15
|
+
<%- else -%>
|
16
|
+
<%= button_to "save", save_search_path(search.id), :method => :put %>
|
17
|
+
<%- end -%></td>
|
18
|
+
<td class="actions"><%= button_to "delete", delete_search_path(search.id), :confirm => "Delete item?" %></td>
|
19
|
+
<% end #content_tag %>
|
20
|
+
<%- end -%>
|
21
|
+
</table>
|
22
|
+
<%- end -%>
|
23
|
+
|