umlaut 3.0.0alpha1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +7 -0
- data/README.md +49 -0
- data/Rakefile +37 -0
- data/app/assets/images/error.gif +0 -0
- data/app/assets/images/export_bg_bot.gif +0 -0
- data/app/assets/images/export_bg_mid.gif +0 -0
- data/app/assets/images/export_bg_top.gif +0 -0
- data/app/assets/images/famfamfam/book_open.png +0 -0
- data/app/assets/images/famfamfam/cross.png +0 -0
- data/app/assets/images/famfamfam/page_sound.gif +0 -0
- data/app/assets/images/famfamfam/page_text.gif +0 -0
- data/app/assets/images/famfamfam/page_up.gif +0 -0
- data/app/assets/images/famfamfam/page_white.png +0 -0
- data/app/assets/images/famfamfam/readme.html +1495 -0
- data/app/assets/images/famfamfam/tiny_cross.png +0 -0
- data/app/assets/images/frame_remove.gif +0 -0
- data/app/assets/images/ico_go.gif +0 -0
- data/app/assets/images/jhu_findit.gif +0 -0
- data/app/assets/images/list_closed.png +0 -0
- data/app/assets/images/list_open.png +0 -0
- data/app/assets/images/more_info.gif +0 -0
- data/app/assets/images/rails.png +0 -0
- data/app/assets/images/request.gif +0 -0
- data/app/assets/images/spinner.gif +0 -0
- data/app/assets/javascripts/umlaut/ajax_windows.js +35 -0
- data/app/assets/javascripts/umlaut/ensure_window_size.js.erb +34 -0
- data/app/assets/javascripts/umlaut/expand_contract_toggle.js +25 -0
- data/app/assets/javascripts/umlaut/search_autocomplete.js +46 -0
- data/app/assets/javascripts/umlaut/simple_visible_toggle.js +8 -0
- data/app/assets/javascripts/umlaut/update_html.js +152 -0
- data/app/assets/javascripts/umlaut.js +17 -0
- data/app/assets/stylesheets/umlaut.css +857 -0
- data/app/controllers/application_controller.rb +14 -0
- data/app/controllers/export_email_controller.rb +123 -0
- data/app/controllers/js_helper_controller.rb +10 -0
- data/app/controllers/link_router_controller.rb +87 -0
- data/app/controllers/open_search_controller.rb +9 -0
- data/app/controllers/resolve_controller.rb +288 -0
- data/app/controllers/resource_controller.rb +83 -0
- data/app/controllers/search_controller.rb +328 -0
- data/app/controllers/search_methods/sfx3.rb +148 -0
- data/app/controllers/search_methods/sfx4.rb +257 -0
- data/app/controllers/search_methods/sfx_api.rb +47 -0
- data/app/controllers/store_controller.rb +64 -0
- data/app/controllers/umlaut/controller_behavior.rb +20 -0
- data/app/controllers/umlaut/controller_logic.rb +96 -0
- data/app/controllers/umlaut/error_handling.rb +48 -0
- data/app/controllers/umlaut_controller.rb +112 -0
- data/app/helpers/application_helper.rb +4 -0
- data/app/helpers/emailer_helper.rb +43 -0
- data/app/helpers/export_email_helper.rb +34 -0
- data/app/helpers/open_search_helper.rb +7 -0
- data/app/helpers/resolve_helper.rb +225 -0
- data/app/helpers/search_helper.rb +50 -0
- data/app/helpers/umlaut/footer_helper.rb +64 -0
- data/app/helpers/umlaut/helper.rb +62 -0
- data/app/helpers/umlaut/html_head_helper.rb +37 -0
- data/app/helpers/umlaut/url_generation.rb +77 -0
- data/app/mailers/emailer.rb +48 -0
- data/app/models/clickthrough.rb +2 -0
- data/app/models/collection.rb +259 -0
- data/app/models/crossref_lookup.rb +2 -0
- data/app/models/dispatched_service.rb +58 -0
- data/app/models/permalink.rb +29 -0
- data/app/models/referent.rb +473 -0
- data/app/models/referent_value.rb +14 -0
- data/app/models/request.rb +449 -0
- data/app/models/service_response.rb +179 -0
- data/app/models/service_store.rb +59 -0
- data/app/models/service_type_value.rb +58 -0
- data/app/models/service_wave.rb +150 -0
- data/app/models/sfx_db/az_additional_title.rb +11 -0
- data/app/models/sfx_db/az_letter_group.rb +11 -0
- data/app/models/sfx_db/az_title.rb +38 -0
- data/app/models/sfx_db/az_title_v2.rb +34 -0
- data/app/models/sfx_db/isbn.rb +12 -0
- data/app/models/sfx_db/issn.rb +12 -0
- data/app/models/sfx_db/object.rb +35 -0
- data/app/models/sfx_db/object_portfolio.rb +6 -0
- data/app/models/sfx_db/publisher.rb +10 -0
- data/app/models/sfx_db/sfx_db_base.rb +54 -0
- data/app/models/sfx_db/target.rb +9 -0
- data/app/models/sfx_db/target_service.rb +10 -0
- data/app/models/sfx_db/title.rb +10 -0
- data/app/models/sfx_db.rb +10 -0
- data/app/models/sfx_url.rb +35 -0
- data/app/views/emailer/citation.text.erb +28 -0
- data/app/views/emailer/short_citation.text.erb +8 -0
- data/app/views/export_email/_email.html.erb +25 -0
- data/app/views/export_email/_send_email.html.erb +3 -0
- data/app/views/export_email/_send_txt.html.erb +3 -0
- data/app/views/export_email/_txt.html.erb +62 -0
- data/app/views/export_email/email.html.erb +3 -0
- data/app/views/export_email/send_email.html.erb +1 -0
- data/app/views/export_email/send_txt.html.erb +1 -0
- data/app/views/export_email/txt.html.erb +3 -0
- data/app/views/js_helper/loader.erb.js +13 -0
- data/app/views/layouts/umlaut.html.erb +52 -0
- data/app/views/open_search/index.html.erb +9 -0
- data/app/views/resolve/_api_in_progress.xml.erb +21 -0
- data/app/views/resolve/_background_progress.html.erb +51 -0
- data/app/views/resolve/_background_updater.html.erb +38 -0
- data/app/views/resolve/_citation.html.erb +87 -0
- data/app/views/resolve/_coins.html.erb +1 -0
- data/app/views/resolve/_compact_citation.html.erb +33 -0
- data/app/views/resolve/_cover_image.html.erb +35 -0
- data/app/views/resolve/_fulltext.html.erb +55 -0
- data/app/views/resolve/_help.html.erb +17 -0
- data/app/views/resolve/_holding.html.erb +91 -0
- data/app/views/resolve/_related_items.html.erb +35 -0
- data/app/views/resolve/_search_inside.html.erb +62 -0
- data/app/views/resolve/_section_display.html.erb +49 -0
- data/app/views/resolve/_service_errors.html.erb +29 -0
- data/app/views/resolve/_standard_response_item.html.erb +89 -0
- data/app/views/resolve/api.xml.builder +72 -0
- data/app/views/resolve/background_status.html.erb +26 -0
- data/app/views/resolve/index.html.erb +73 -0
- data/app/views/resolve/partial_html_sections.xml.erb +30 -0
- data/app/views/search/_a_to_z.html.erb +6 -0
- data/app/views/search/_citation.html.erb +94 -0
- data/app/views/search/_pager.html.erb +60 -0
- data/app/views/search/books.html.erb +103 -0
- data/app/views/search/journal_search.html.erb +90 -0
- data/app/views/search/journals.html.erb +167 -0
- data/app/views/search/opensearch_description.rxml +10 -0
- data/app/views/testing/index.html.erb +1 -0
- data/app/views/umlaut/README +5 -0
- data/app/views/umlaut/error.html.erb +45 -0
- data/db/migrate/01_umlaut_init.rb +113 -0
- data/db/orig_fixed_data/service_type_values.yml +120 -0
- data/db/seeds.rb +7 -0
- data/lib/CronTab.rb +192 -0
- data/lib/aws_product_sign.rb +146 -0
- data/lib/exlibris/aleph/patron.rb +64 -0
- data/lib/exlibris/aleph/record.rb +54 -0
- data/lib/exlibris/aleph/rest_api.rb +29 -0
- data/lib/exlibris/primo/holding.rb +192 -0
- data/lib/exlibris/primo/rsrc.rb +17 -0
- data/lib/exlibris/primo/searcher.rb +276 -0
- data/lib/exlibris/primo/source/aleph.rb +46 -0
- data/lib/exlibris/primo/source/distribution/nyu_aleph.rb +323 -0
- data/lib/exlibris/primo/toc.rb +17 -0
- data/lib/exlibris/primo_ws.rb +140 -0
- data/lib/generators/templates/umlaut_services.yml +237 -0
- data/lib/generators/umlaut/asset_hooks_generator.rb +44 -0
- data/lib/generators/umlaut/install_generator.rb +110 -0
- data/lib/hip3/bib.rb +291 -0
- data/lib/hip3/bib_searcher.rb +302 -0
- data/lib/hip3/custom_field_lookup.rb +44 -0
- data/lib/hip3/holding.rb +50 -0
- data/lib/hip3/item.rb +65 -0
- data/lib/hip3/receipt.rb +7 -0
- data/lib/hip3/serial_copy.rb +82 -0
- data/lib/holding.rb +32 -0
- data/lib/marc_helper.rb +254 -0
- data/lib/metadata_helper.rb +312 -0
- data/lib/opensearch_feed.rb +398 -0
- data/lib/opensearch_query.rb +98 -0
- data/lib/referent_filter.rb +16 -0
- data/lib/referent_filters/dissertation_catch.rb +45 -0
- data/lib/section_renderer.rb +503 -0
- data/lib/service.rb +336 -0
- data/lib/service_adaptors/ajax_export.rb +37 -0
- data/lib/service_adaptors/amazon.rb +412 -0
- data/lib/service_adaptors/blacklight.rb +327 -0
- data/lib/service_adaptors/book_finder.rb +40 -0
- data/lib/service_adaptors/bx.rb +51 -0
- data/lib/service_adaptors/cover_thing.rb +73 -0
- data/lib/service_adaptors/elsevier_cover.rb +57 -0
- data/lib/service_adaptors/email_export.rb +10 -0
- data/lib/service_adaptors/ezproxy.rb +171 -0
- data/lib/service_adaptors/google_book_search.rb +442 -0
- data/lib/service_adaptors/gpo.rb +124 -0
- data/lib/service_adaptors/hathi_trust.rb +308 -0
- data/lib/service_adaptors/hip3_service.rb +150 -0
- data/lib/service_adaptors/hip_holding_search.rb +237 -0
- data/lib/service_adaptors/internet_archive.rb +488 -0
- data/lib/service_adaptors/isbn_db.rb +86 -0
- data/lib/service_adaptors/isi.rb +258 -0
- data/lib/service_adaptors/jcr.rb +146 -0
- data/lib/service_adaptors/opac.rb +351 -0
- data/lib/service_adaptors/open_library.rb +316 -0
- data/lib/service_adaptors/open_library_cover.rb +73 -0
- data/lib/service_adaptors/primo_service.rb +392 -0
- data/lib/service_adaptors/primo_source.rb +78 -0
- data/lib/service_adaptors/pubmed.rb +133 -0
- data/lib/service_adaptors/request_to_fixture.rb +68 -0
- data/lib/service_adaptors/scopus.rb +295 -0
- data/lib/service_adaptors/sfx-new.rb +557 -0
- data/lib/service_adaptors/sfx.rb +566 -0
- data/lib/service_adaptors/sfx_backchannel_record.rb +69 -0
- data/lib/service_adaptors/txt_holding_export.rb +32 -0
- data/lib/service_adaptors/ulrichs_cover.rb +57 -0
- data/lib/service_adaptors/ulrichs_link.rb +47 -0
- data/lib/service_adaptors/worldcat.rb +116 -0
- data/lib/service_adaptors/worldcat_identities.rb +591 -0
- data/lib/tasks/umlaut.rake +134 -0
- data/lib/umlaut/default_configuration.rb +5 -0
- data/lib/umlaut/routes.rb +136 -0
- data/lib/umlaut/version.rb +3 -0
- data/lib/umlaut.rb +37 -0
- data/lib/umlaut_configurable.rb +343 -0
- data/lib/umlaut_http.rb +100 -0
- data/lib/xml_schema_helper.rb +109 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/umlaut_controller.rb +112 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +45 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database-jhu.yml +44 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +34 -0
- data/test/dummy/config/environments/production.rb +60 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +61 -0
- data/test/dummy/config/umlaut_services.yml +237 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/migrate/20111228211210_umlaut_init.rb +113 -0
- data/test/dummy/db/schema.rb +124 -0
- data/test/dummy/log/development.log +12981 -0
- data/test/dummy/log/production.log +0 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/tmp/cache/assets/C5F/340/sprockets%2F99692920160b7a279b86a80415b79db7 +0 -0
- data/test/dummy/tmp/cache/assets/C70/4D0/sprockets%2F034ad2036e623081bd352800786dfe80 +0 -0
- data/test/dummy/tmp/cache/assets/C73/920/sprockets%2Fd371318f22900492fd180f17c5e2a504 +9268 -0
- data/test/dummy/tmp/cache/assets/C80/980/sprockets%2Fc94807409c1523d43e18d25f35d93c41 +0 -0
- data/test/dummy/tmp/cache/assets/C8F/780/sprockets%2Fe47e28558116fb5f8038754e60d1961d +11769 -0
- data/test/dummy/tmp/cache/assets/CAA/EB0/sprockets%2F1d179210e8b76f1ea63c802688a015e4 +9271 -0
- data/test/dummy/tmp/cache/assets/CBB/9C0/sprockets%2F706f28923fb754cad04b9107c89986a1 +0 -0
- data/test/dummy/tmp/cache/assets/CBF/B60/sprockets%2F08ca89671549936265dcb673bf02e36f +0 -0
- data/test/dummy/tmp/cache/assets/CC9/9F0/sprockets%2F306166316e2cafd13c15e62b51a2339d +0 -0
- data/test/dummy/tmp/cache/assets/CF6/F20/sprockets%2F5b2ffa1103079dfd555197838f87a99f +0 -0
- data/test/dummy/tmp/cache/assets/CF7/2B0/sprockets%2F25a7c73655bd3598173b39d9f98bcd46 +862 -0
- data/test/dummy/tmp/cache/assets/CFE/080/sprockets%2F37fe9f4255baddbd549a659914929398 +0 -0
- data/test/dummy/tmp/cache/assets/D22/060/sprockets%2F9aec77b768e91a802d284271c58e2f7e +21357 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D33/6D0/sprockets%2F500129c57f1146e556ec3aacd6cd38c1 +0 -0
- data/test/dummy/tmp/cache/assets/D33/FD0/sprockets%2F2ba0b4e6334a77b923e5f770381bb2bf +0 -0
- data/test/dummy/tmp/cache/assets/D42/C20/sprockets%2Fbcf14e437b1582bf93b77670acf8e090 +21353 -0
- data/test/dummy/tmp/cache/assets/D50/A30/sprockets%2F7d8b294ac433db5d056538f8cf7c66b9 +0 -0
- data/test/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4 +872 -0
- data/test/dummy/tmp/cache/assets/D65/590/sprockets%2Fc1bb92fc3406a126b7dd302edc96d629 +0 -0
- data/test/dummy/tmp/cache/assets/D71/6B0/sprockets%2Fde558b71b494cf09b1bf055c8dff0353 +0 -0
- data/test/dummy/tmp/cache/assets/D72/610/sprockets%2Fa8c708eeb30ef93de34d755d4f45d023 +859 -0
- data/test/dummy/tmp/cache/assets/D76/AD0/sprockets%2Fe2158cde93188cf5ab6457bc6d6602ec +0 -0
- data/test/dummy/tmp/cache/assets/D7A/E40/sprockets%2F9622ffcc499a57627cd1bb18fe31b8e4 +11772 -0
- data/test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +0 -0
- data/test/dummy/tmp/cache/assets/D9B/770/sprockets%2F8aacf02eb7dbb0949704b28f27b87e0b +0 -0
- data/test/dummy/tmp/cache/assets/DA6/A80/sprockets%2F92e26d8e58d5bcc8b8f6c25d1b05b9c1 +0 -0
- data/test/dummy/tmp/cache/assets/DE8/790/sprockets%2Fd1333bde2b9aafcc712d11dd09ab35d8 +0 -0
- data/test/dummy/tmp/cache/assets/DF7/F30/sprockets%2F7bc16c4109b17fabe29f8ddbbf732d1c +374 -0
- data/test/dummy/tmp/cache/assets/E03/570/sprockets%2F493bdc0ac14cd4f57fdfe4253f992bde +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/E0B/4B0/sprockets%2F7988df51a61c81ce6ede4a2d4c8cce4f +377 -0
- data/test/dummy/tmp/cache/assets/E5F/960/sprockets%2Fdc007b6cad5c7ef08e33ec28cfff0ef6 +0 -0
- data/test/fixtures/dispatched_services.yml +5 -0
- data/test/fixtures/permalinks.yml +5 -0
- data/test/fixtures/referent_values.yml +1734 -0
- data/test/fixtures/referents.yml +156 -0
- data/test/fixtures/requests.yml +284 -0
- data/test/fixtures/service_responses.yml +5 -0
- data/test/fixtures/sfx_urls.yml +4 -0
- data/test/performance/browsing_test.rb +9 -0
- data/test/test_helper.rb +10 -0
- data/test/umlaut_test.rb +7 -0
- data/test/unit/aleph_patron_test.rb +39 -0
- data/test/unit/aleph_record_benchmarks.rb +28 -0
- data/test/unit/aleph_record_test.rb +30 -0
- data/test/unit/aws_product_sign_test.rb +93 -0
- data/test/unit/collection_test.rb +76 -0
- data/test/unit/google_book_search_test.rb +101 -0
- data/test/unit/primo_searcher_test.rb +403 -0
- data/test/unit/primo_service_test.rb +939 -0
- data/test/unit/primo_ws_test.rb +131 -0
- data/test/unit/service_response_test.rb +9 -0
- data/test/unit/service_test.rb +33 -0
- metadata +580 -0
@@ -0,0 +1,73 @@
|
|
1
|
+
|
2
|
+
<%= render :partial=>'background_updater' %>
|
3
|
+
|
4
|
+
|
5
|
+
<div class="umlaut_resolve"> <!-- actual wrapper for both columns -->
|
6
|
+
<div class="main_column">
|
7
|
+
|
8
|
+
|
9
|
+
<h1>Find <%=@user_request.referent.type_of_thing.titlecase %></h1>
|
10
|
+
|
11
|
+
<div class="resource_info">
|
12
|
+
<table width="100%" cellpadding="3" cellspacing="0">
|
13
|
+
<tr>
|
14
|
+
<td>
|
15
|
+
<%= render :partial=>'citation' %>
|
16
|
+
|
17
|
+
<div class="resource_info_sections">
|
18
|
+
<% html_sections(:resource_info).each do |section|
|
19
|
+
%>
|
20
|
+
<%= content_tag "div", :id => section[:div_id] do %>
|
21
|
+
<%= render_section(section) %>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
</td>
|
27
|
+
|
28
|
+
<td align='right'>
|
29
|
+
<div id="cover_image">
|
30
|
+
<%= render_section(html_section_by_div_id("cover_image")) %>
|
31
|
+
</div>
|
32
|
+
</td>
|
33
|
+
</tr>
|
34
|
+
</table>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
|
38
|
+
<div class="main_response_list">
|
39
|
+
<% html_sections(:main).each do |section|
|
40
|
+
%>
|
41
|
+
<%= content_tag "div", :id => section[:div_id] do %>
|
42
|
+
<%= render_section(section) %>
|
43
|
+
<% end %>
|
44
|
+
<% end %>
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<!--close mainColumn-->
|
48
|
+
</div>
|
49
|
+
|
50
|
+
<div id="rightColumn" class="sidebar">
|
51
|
+
|
52
|
+
<% html_sections(:sidebar).each do |section|
|
53
|
+
%>
|
54
|
+
<%= content_tag "div", :id => section[:div_id] do %>
|
55
|
+
<%= render_section(section) %>
|
56
|
+
<% end %>
|
57
|
+
<% end %>
|
58
|
+
|
59
|
+
<!-- service errors -->
|
60
|
+
<div id="service_errors">
|
61
|
+
<% html_sections(:service_errors).each do |section| %>
|
62
|
+
<%= render_section(section) %>
|
63
|
+
<% end %>
|
64
|
+
</div>
|
65
|
+
|
66
|
+
</div>
|
67
|
+
|
68
|
+
|
69
|
+
<!-- close bothColumns -->
|
70
|
+
</div>
|
71
|
+
|
72
|
+
|
73
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<partial_html_sections>
|
2
|
+
|
3
|
+
<%= render(:partial => "api_in_progress", :layout => false) %>
|
4
|
+
|
5
|
+
|
6
|
+
<% partial_html_sections.each do |section|
|
7
|
+
|
8
|
+
renderer = SectionRenderer.new(@user_request, section)
|
9
|
+
|
10
|
+
|
11
|
+
%>
|
12
|
+
<html_section id="<%= section[:div_id] %>">
|
13
|
+
<included_services>
|
14
|
+
<% renderer.service_type_values.each do |svc_type| %>
|
15
|
+
<service name="<%= svc_type.name %>" />
|
16
|
+
<% end %>
|
17
|
+
</included_services>
|
18
|
+
<service_load_complete value="<%= ! renderer.services_in_progress? %>" />
|
19
|
+
<response_count value="<%= renderer.responses_list.length %>" />
|
20
|
+
<html_content>
|
21
|
+
<%= with_format("html") do
|
22
|
+
escape_xml( render_section(renderer) ).html_safe
|
23
|
+
end %>
|
24
|
+
</html_content>
|
25
|
+
</html_section>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
</partial_html_sections>
|
29
|
+
|
30
|
+
|
@@ -0,0 +1,94 @@
|
|
1
|
+
<%
|
2
|
+
# save the conversion to hash on every call!
|
3
|
+
ref_meta = @current_context_object.referent.metadata
|
4
|
+
labels = referent_labels
|
5
|
+
%>
|
6
|
+
<div class="search_citation">
|
7
|
+
<ul class="citation">
|
8
|
+
|
9
|
+
<% if ! ref_meta["atitle"].blank? %>
|
10
|
+
<li class="atitle">
|
11
|
+
<span class="label"><%= labels.atitle %>:</span>
|
12
|
+
<span class="value"><%= ref_meta["atitle"] %></span>
|
13
|
+
</li>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<% unless ref_meta["au"].nil? and ref_meta['aulast'].nil? %>
|
17
|
+
<li class="au">
|
18
|
+
<span class="label">Author:</span>
|
19
|
+
<span class="value">
|
20
|
+
<%= ref_meta["au"] || ref_meta["aulast"] %>
|
21
|
+
<% if ref_meta["aufirst"] || ref_meta["auinit"] || ref_meta["auinit1"]%>
|
22
|
+
, <%= ref_meta["aufirst"] || ref_meta["auinit"] || ref_meta["auinit1"] %>
|
23
|
+
<% end %>
|
24
|
+
</span>
|
25
|
+
</li>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<% if ref_meta.has_key?("jtitle") or ref_meta.has_key?("title") or ref_meta.has_key?("btitle") %>
|
29
|
+
<li class="title">
|
30
|
+
<span class="label">
|
31
|
+
<%= labels.title %>:
|
32
|
+
</span>
|
33
|
+
<span class="value">
|
34
|
+
<%= link_to(ref_meta["title"] || ref_meta["btitle"] || ref_meta["jtitle"],
|
35
|
+
url_for_with_co({:controller => 'resolve'}, @current_context_object),
|
36
|
+
{:target => search_result_target_window})
|
37
|
+
%>
|
38
|
+
</span>
|
39
|
+
</li>
|
40
|
+
<% end %>
|
41
|
+
|
42
|
+
<% if ref_meta.has_key?("issn") %>
|
43
|
+
<li class="issn">
|
44
|
+
<span class="label">ISSN:</span>
|
45
|
+
<span class="value"><%=ref_meta["issn"] %></span>
|
46
|
+
</li>
|
47
|
+
<% end %>
|
48
|
+
|
49
|
+
<% if ref_meta.has_key?("isbn") %>
|
50
|
+
<ul class="isbn">
|
51
|
+
<span class="label">ISBN:</span>
|
52
|
+
<span class="value"><%=ref_meta["isbn"] %></span>
|
53
|
+
</ul>
|
54
|
+
<% end %>
|
55
|
+
|
56
|
+
|
57
|
+
<% if ( ref_meta.has_key?("date") || ref_meta.has_key?("volume") || ref_meta.has_key?("issue") || ref_meta.has_key?("spage")) %>
|
58
|
+
<li class="cite">
|
59
|
+
<%= date_format(ref_meta["date"].to_s) %>
|
60
|
+
<% if ref_meta.has_key?("volume") %>
|
61
|
+
Volume: <%= ref_meta["volume"] %>
|
62
|
+
<% end %>
|
63
|
+
<% if ref_meta.has_key?("issue") %>
|
64
|
+
Issue: <%= ref_meta["issue"] %>
|
65
|
+
<% end %>
|
66
|
+
<% if ref_meta.has_key?("spage") %>
|
67
|
+
Page: <%= ref_meta["spage"] %>
|
68
|
+
<% end %>
|
69
|
+
<% if ref_meta.has_key?("epage") %>
|
70
|
+
- <%= ref_meta["epage"] %>
|
71
|
+
<% end %>
|
72
|
+
</li>
|
73
|
+
<% end %>
|
74
|
+
|
75
|
+
<% unless ref_meta['pub'].blank? && ref_meta['place'].blank? %>
|
76
|
+
<li class="pub">
|
77
|
+
<span class="label" >Publisher:</span>
|
78
|
+
<span class="value">
|
79
|
+
<% unless ref_meta['place'].blank? %>
|
80
|
+
<%= ref_meta['place'] %> :
|
81
|
+
<% end %>
|
82
|
+
<%= ref_meta['pub'] %>
|
83
|
+
</span>
|
84
|
+
</li>
|
85
|
+
<% end %>
|
86
|
+
</ul>
|
87
|
+
|
88
|
+
<div class="citation_link">
|
89
|
+
<%= resolver_link(@current_context_object, {:target => search_result_target_window}) %>
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
|
94
|
+
|
@@ -0,0 +1,60 @@
|
|
1
|
+
<% # much of this paging code adopted from will_paginate plugin for view
|
2
|
+
|
3
|
+
|
4
|
+
total_pages = (@hits / @batch_size)
|
5
|
+
total_pages += 1 unless (@hits % @batch_size == 0)
|
6
|
+
|
7
|
+
if total_pages > 1
|
8
|
+
|
9
|
+
# Arguments for paging actions, just add 'page'
|
10
|
+
args= params.clone
|
11
|
+
# Need to take out that annoying legacy journal key, sorry.
|
12
|
+
args.delete('journal')
|
13
|
+
|
14
|
+
inner_window ||= 2 #how many links are shown on each side of current page
|
15
|
+
outer_window ||= 2 #how many links are around the first and the last page
|
16
|
+
|
17
|
+
min = @page - inner_window
|
18
|
+
max = @page + inner_window
|
19
|
+
|
20
|
+
# adjust lower or upper limit if other is out of bounds
|
21
|
+
if max > total_pages
|
22
|
+
min -= max - total_pages
|
23
|
+
elsif min < 1
|
24
|
+
max += 1 - min
|
25
|
+
end
|
26
|
+
|
27
|
+
current = min..max
|
28
|
+
beginning = 1..(1 + outer_window)
|
29
|
+
tail = (total_pages - outer_window)..total_pages
|
30
|
+
visible = [beginning, current, tail].map(&:to_a).flatten.sort.uniq
|
31
|
+
links, prev = [], 0
|
32
|
+
|
33
|
+
visible.each do |n|
|
34
|
+
next if n < 1
|
35
|
+
break if n > total_pages
|
36
|
+
|
37
|
+
unless n - prev > 1
|
38
|
+
prev = n
|
39
|
+
if ( n != @page )
|
40
|
+
links << ( link_to n, args.merge({'page' => n }) )
|
41
|
+
else
|
42
|
+
links << ( content_tag :span, n )
|
43
|
+
end
|
44
|
+
else
|
45
|
+
# ellipsis represents the gap between windows
|
46
|
+
prev = n - 1
|
47
|
+
links << '...'
|
48
|
+
redo
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# Next and previous buttons
|
53
|
+
links.unshift(link_to('Previous', args.merge({'page' => @page -1 }))) if @page > 1
|
54
|
+
links.push(link_to('Next', args.merge({'page' => @page + 1}))) if @page < total_pages
|
55
|
+
%>
|
56
|
+
<%= content_tag :div, links.join(' ').html_safe %>
|
57
|
+
<%
|
58
|
+
end
|
59
|
+
%>
|
60
|
+
|
@@ -0,0 +1,103 @@
|
|
1
|
+
<div class="oneColumn">
|
2
|
+
<h1>Books</h1>
|
3
|
+
|
4
|
+
<%= form_tag({:controller=>'resolve', :action=>@submit_action}, {:method=>'get'}) %>
|
5
|
+
<div class="citationLinker">
|
6
|
+
|
7
|
+
<input type=hidden name="url_ver" value="Z39.88-2004">
|
8
|
+
<input type=hidden name="url_ctx_fmt" value="info:ofi/fmt:kev:mtx:ctx">
|
9
|
+
<input type=hidden name="ctx_ver" value="Z39.88-2004">
|
10
|
+
<input type=hidden name="rfr_id" value="info:sid/umlaut.code4lib.org:citation">
|
11
|
+
<input type=hidden name="rft_val_fmt" value="info:ofi/fmt:kev:mtx:book">
|
12
|
+
<input type=hidden name="rft.genre" value="book">
|
13
|
+
|
14
|
+
<table>
|
15
|
+
</tr>
|
16
|
+
<td align="right" >book title</td>
|
17
|
+
|
18
|
+
<td><input
|
19
|
+
type=text
|
20
|
+
name="rft.btitle"
|
21
|
+
size="33"
|
22
|
+
value=""></td>
|
23
|
+
</tr>
|
24
|
+
<tr>
|
25
|
+
<td align="right" >year</td>
|
26
|
+
<td>
|
27
|
+
<input type=text name="rft.date" size="10" value="">
|
28
|
+
</td>
|
29
|
+
</tr>
|
30
|
+
|
31
|
+
<tr>
|
32
|
+
<td align="right" >volume</td>
|
33
|
+
<td>
|
34
|
+
<input
|
35
|
+
type=text
|
36
|
+
name="rft.volume"
|
37
|
+
size="5"
|
38
|
+
maxlength="5"
|
39
|
+
value="">
|
40
|
+
part <input
|
41
|
+
type=text
|
42
|
+
name="rft.part"
|
43
|
+
size="5"
|
44
|
+
value="">
|
45
|
+
|
46
|
+
</td>
|
47
|
+
</tr>
|
48
|
+
<tr>
|
49
|
+
<td align="right" >isbn</td>
|
50
|
+
<td>
|
51
|
+
<input
|
52
|
+
type=text
|
53
|
+
name="rft.isbn"
|
54
|
+
size="17"
|
55
|
+
maxlength="17"
|
56
|
+
value="">
|
57
|
+
</td>
|
58
|
+
</tr>
|
59
|
+
|
60
|
+
<tr>
|
61
|
+
<td align="right" >author</td>
|
62
|
+
<td>
|
63
|
+
<table border="0" cellspacing="0" cellpadding="0">
|
64
|
+
<tr>
|
65
|
+
<td >last name</td>
|
66
|
+
<td >first name</td>
|
67
|
+
|
68
|
+
<td >initials</td>
|
69
|
+
</tr>
|
70
|
+
<tr>
|
71
|
+
<td><input
|
72
|
+
type=text
|
73
|
+
name="rft.aulast"
|
74
|
+
size="12"
|
75
|
+
value=""></td>
|
76
|
+
<td><input
|
77
|
+
type=text
|
78
|
+
name="rft.aufirst"
|
79
|
+
size="10"
|
80
|
+
value=""></td>
|
81
|
+
<td><input
|
82
|
+
type=text
|
83
|
+
name="rft.auinit"
|
84
|
+
size="4"
|
85
|
+
value=""></td>
|
86
|
+
</tr>
|
87
|
+
</table>
|
88
|
+
|
89
|
+
</td>
|
90
|
+
</tr>
|
91
|
+
<tr>
|
92
|
+
<td colspan="80%" align="right">
|
93
|
+
|
94
|
+
</td>
|
95
|
+
<td colspan="20%" align="right">
|
96
|
+
<input type="submit" value="search"></td>
|
97
|
+
</td>
|
98
|
+
|
99
|
+
</tr>
|
100
|
+
</table>
|
101
|
+
</div>
|
102
|
+
</form>
|
103
|
+
</div>
|
@@ -0,0 +1,90 @@
|
|
1
|
+
<%
|
2
|
+
if (params["action"] == "journal_list")
|
3
|
+
@page_title = "Browse by Journal Title: #{params['id']}"
|
4
|
+
else
|
5
|
+
@page_title = 'Journal titles that '
|
6
|
+
|
7
|
+
@page_title +=
|
8
|
+
(params["umlaut.title_search_type"] == "begins") ?
|
9
|
+
'begin with ' : 'contain '
|
10
|
+
|
11
|
+
@page_title += "'" + params['rft.jtitle'] + "'"
|
12
|
+
end
|
13
|
+
|
14
|
+
%>
|
15
|
+
|
16
|
+
<div class="oneColumn">
|
17
|
+
<h1><%= @page_title %>
|
18
|
+
</h1>
|
19
|
+
|
20
|
+
<div class="citationLinker" style="margin-bottom: 8px">
|
21
|
+
<%= form_tag({:controller=>'search', :action=>'journal_search'}, {:method=>'get', :name=>'OpenURL', :id=>'OpenURL'}) %>
|
22
|
+
<input type=hidden name="rfr_id" value="info:sid/sfxit.com:citation">
|
23
|
+
<!-- <input type=hidden name="rfr_id" value="info:sid/umlaut.code4lib.org:citation"> -->
|
24
|
+
|
25
|
+
<input type="hidden" class="rft_title" name="rft.title">
|
26
|
+
<input type="hidden" class="rft_object_id" name="rft.object_id">
|
27
|
+
|
28
|
+
<%-
|
29
|
+
# specific article fields from prior form may be present, if the user is now choosing from
|
30
|
+
# amongst serveral possible title matches. Preserve them on refinement of search terms.
|
31
|
+
-%>
|
32
|
+
<% params.slice("rft.date", "__year", "__month", "__day", "rft.volume", "rft.issue", "rft.spage").each_pair do |key, value| %>
|
33
|
+
<%= hidden_field_tag key, value %>
|
34
|
+
<% end %>
|
35
|
+
|
36
|
+
|
37
|
+
Journal Title:
|
38
|
+
<%= text_field :journal, :title, {:name=>'rft.jtitle', :autocomplete=>'off', :size=>'40', :value=>params['rft.jtitle'], :class=>"title_search"}
|
39
|
+
%>
|
40
|
+
|
41
|
+
<select name="umlaut.title_search_type" class="sfx_title_search">
|
42
|
+
<option value="contains" <%= "SELECTED" if params["umlaut.title_search_type"] == "contains" %>>contains</option>
|
43
|
+
<option value="begins" <%= "SELECTED" if params["umlaut.title_search_type"] == "begins" %> >begins
|
44
|
+
with</option>
|
45
|
+
<option value="exact">exact match</option>
|
46
|
+
</select>
|
47
|
+
|
48
|
+
<input type=hidden name="rft.issn">
|
49
|
+
<input type="submit" name="Generate_OpenURL2" value="Search">
|
50
|
+
<%= link_to('More search options', :controller=>'search') %>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
<% if params["action"] == "journal_list" %>
|
55
|
+
<%= render :partial=>"a_to_z" %>
|
56
|
+
<div class="line2"></div>
|
57
|
+
<% end %>
|
58
|
+
|
59
|
+
|
60
|
+
<% unless @hits == 0%>
|
61
|
+
<h3>Showing results <%= @start_result_num %> through <%= @end_result_num %> of <%= @hits %></h3>
|
62
|
+
<% end %>
|
63
|
+
<% if params["rft.jtitle"] %>
|
64
|
+
<div class="note"><em><strong>Note:</strong> Alternate titles might have matched your search terms</em></div>
|
65
|
+
<% end %>
|
66
|
+
|
67
|
+
<div class='pagination'>
|
68
|
+
<%= render :partial=>'pager' %>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
<div class="list">
|
72
|
+
<% @display_results.each do | co |
|
73
|
+
@current_context_object = co
|
74
|
+
%>
|
75
|
+
<% partial_name = @citation_partial || 'citation' %>
|
76
|
+
<%= render :partial=>partial_name %>
|
77
|
+
|
78
|
+
<% end %>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
<div class='pagination'>
|
82
|
+
<%= render :partial=>'pager' %>
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<% if params["action"] == "journal_list" %>
|
86
|
+
<div class="line2"></div>
|
87
|
+
<%= render :partial=>"a_to_z" %>
|
88
|
+
<% end %>
|
89
|
+
<!--close oneColumn-->
|
90
|
+
</div>
|