atrium 0.0.1.alpha
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +13 -0
- data/.gitmodules +3 -0
- data/.rvmrc +32 -0
- data/GETTING_STARTED.textile +109 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +320 -0
- data/Guardfile +10 -0
- data/README.mkd +56 -0
- data/Rakefile +6 -0
- data/app/assets/images/atrium/ajax-loader.gif +0 -0
- data/app/assets/images/atrium/lightbox-ico-loading.gif +0 -0
- data/app/assets/images/atrium/logo.png +0 -0
- data/app/assets/javascripts/atrium/atrium.js +281 -0
- data/app/assets/javascripts/chosen.jquery.js +899 -0
- data/app/assets/javascripts/ckeditor.warning.js +65 -0
- data/app/assets/javascripts/ckeditor/config.js.coffee +6 -0
- data/app/assets/javascripts/ckeditor/jquery.generateId.js +13 -0
- data/app/assets/javascripts/ckeditor/jquery.jeditable.ckeditor.js +59 -0
- data/app/assets/javascripts/ckeditor/plugins/linkItem/application_link.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/linkItem/dialogs/linkItem.js +1470 -0
- data/app/assets/javascripts/ckeditor/plugins/linkItem/plugin.js +16 -0
- data/app/assets/javascripts/ckeditor/plugins/linkItem/ui_toolbar_pencil.png +0 -0
- data/app/assets/javascripts/jquery.colorbox.js +864 -0
- data/app/assets/javascripts/jquery.jeditable.js +543 -0
- data/app/assets/stylesheets/atrium/atrium.css +216 -0
- data/app/assets/stylesheets/atrium/chosen-sprite.png +0 -0
- data/app/assets/stylesheets/atrium/chosen.css +367 -0
- data/app/assets/stylesheets/colorbox.css +42 -0
- data/app/assets/stylesheets/controls.png +0 -0
- data/app/assets/stylesheets/loading.gif +0 -0
- data/app/controllers/atrium/base_controller.rb +25 -0
- data/app/controllers/atrium/collection_exhibit_order_controller.rb +21 -0
- data/app/controllers/atrium/collections_controller.rb +165 -0
- data/app/controllers/atrium/customization_controller.rb +41 -0
- data/app/controllers/atrium/descriptions_controller.rb +177 -0
- data/app/controllers/atrium/exhibit_facet_order_controller.rb +19 -0
- data/app/controllers/atrium/exhibits_controller.rb +108 -0
- data/app/controllers/atrium/showcases_controller.rb +193 -0
- data/app/helpers/atrium/base_helper.rb +6 -0
- data/app/models/ability.rb +14 -0
- data/app/models/atrium/browse_level.rb +41 -0
- data/app/models/atrium/collection.rb +121 -0
- data/app/models/atrium/description.rb +128 -0
- data/app/models/atrium/essay.rb +21 -0
- data/app/models/atrium/exhibit.rb +58 -0
- data/app/models/atrium/search/facet.rb +29 -0
- data/app/models/atrium/search/facet_selection.rb +17 -0
- data/app/models/atrium/showcase.rb +173 -0
- data/app/models/atrium/showcase/facet_selection.rb +21 -0
- data/app/models/atrium/showcase/item.rb +19 -0
- data/app/models/role_mapper.rb +23 -0
- data/app/views/_user_util_links.html.erb +25 -0
- data/app/views/atrium/collections/_bookmark_control.html.erb +25 -0
- data/app/views/atrium/collections/_browse_index.html.erb +20 -0
- data/app/views/atrium/collections/_collection_items_index.html.erb +10 -0
- data/app/views/atrium/collections/_document.html.erb +24 -0
- data/app/views/atrium/collections/_document_list.html.erb +6 -0
- data/app/views/atrium/collections/_edit_navigation.html.erb +20 -0
- data/app/views/atrium/collections/_folder_control.html.erb +12 -0
- data/app/views/atrium/collections/_form.html.erb +93 -0
- data/app/views/atrium/collections/_listing.html.erb +18 -0
- data/app/views/atrium/collections/_navigation.html.erb +45 -0
- data/app/views/atrium/collections/_results_pagination.html.erb +9 -0
- data/app/views/atrium/collections/_sort_and_per_page.html.erb +23 -0
- data/app/views/atrium/collections/edit.html.erb +5 -0
- data/app/views/atrium/collections/new.html.erb +6 -0
- data/app/views/atrium/collections/show.html.erb +22 -0
- data/app/views/atrium/descriptions/_form.html.erb +64 -0
- data/app/views/atrium/descriptions/edit.html.erb +4 -0
- data/app/views/atrium/descriptions/index.html.erb +4 -0
- data/app/views/atrium/descriptions/new.html.erb +2 -0
- data/app/views/atrium/descriptions/show.html.erb +20 -0
- data/app/views/atrium/exhibits/_bookmark_control.html.erb +25 -0
- data/app/views/atrium/exhibits/_folder_control.html.erb +12 -0
- data/app/views/atrium/exhibits/_form.html.erb +108 -0
- data/app/views/atrium/exhibits/edit.html.erb +9 -0
- data/app/views/atrium/exhibits/new.html.erb +6 -0
- data/app/views/atrium/exhibits/show.html.erb +26 -0
- data/app/views/atrium/showcases/_showcase_navigation.html.erb +23 -0
- data/app/views/atrium/showcases/show.html.erb +1 -0
- data/app/views/catalog/_collection_home_text.html.erb +6 -0
- data/app/views/catalog/_constraints.html.erb +9 -0
- data/app/views/catalog/_default_collection_text.html.erb +18 -0
- data/app/views/catalog/_default_home_text.html.erb +6 -0
- data/app/views/catalog/_home_text.html.erb +6 -0
- data/app/views/catalog/_index_partials/_description.html.erb +8 -0
- data/app/views/catalog/_search_form.html.erb +66 -0
- data/app/views/catalog/_show_partials/_description.html.erb +15 -0
- data/app/views/catalog/browse_show.html.erb +18 -0
- data/app/views/catalog/index.html.erb +35 -0
- data/app/views/catalog/list_description.html.erb +24 -0
- data/app/views/catalog/list_item.html.erb +3 -0
- data/app/views/layouts/atrium.html.erb +86 -0
- data/app/views/layouts/atrium_themes/default.html.erb +4 -0
- data/app/views/layouts/item_listing.html.erb +36 -0
- data/app/views/listing/_document.html.erb +27 -0
- data/app/views/listing/_document_list.html.erb +3 -0
- data/app/views/listing/_item_search.html.erb +27 -0
- data/app/views/shared/_banner.html.erb +5 -0
- data/app/views/shared/_collection_complete_list.html.erb +33 -0
- data/app/views/shared/_collection_search_form.html.erb +12 -0
- data/app/views/shared/_collection_title_header.html.erb +3 -0
- data/app/views/shared/_featured_sources.html.erb +20 -0
- data/app/views/shared/_list_descriptions.html.erb +38 -0
- data/app/views/shared/_navigation_browse_levels.html.erb +34 -0
- data/app/views/shared/_showcase_configure_menu.html.erb +22 -0
- data/app/views/shared/_top_navigation.html.erb +9 -0
- data/atrium.gemspec +76 -0
- data/config/routes.rb +12 -0
- data/init.rb +3 -0
- data/lib/application_controller.rb +24 -0
- data/lib/atrium.rb +42 -0
- data/lib/atrium/application_helper.rb +24 -0
- data/lib/atrium/atrium_helper_behavior.rb +162 -0
- data/lib/atrium/catalog.rb +203 -0
- data/lib/atrium/collections_helper.rb +139 -0
- data/lib/atrium/controller.rb +10 -0
- data/lib/atrium/descriptions_helper.rb +23 -0
- data/lib/atrium/engine.rb +12 -0
- data/lib/atrium/layout_helper.rb +13 -0
- data/lib/atrium/routes.rb +99 -0
- data/lib/atrium/solr_helper.rb +440 -0
- data/lib/atrium/version.rb +3 -0
- data/lib/generators/atrium/assets_generator.rb +44 -0
- data/lib/generators/atrium/atrium_generator.rb +149 -0
- data/lib/generators/atrium/cucumber_support_generator.rb +29 -0
- data/lib/generators/atrium/templates/config/role_map_cucumber.yml +2 -0
- data/lib/generators/atrium/templates/config/role_map_development.yml +2 -0
- data/lib/generators/atrium/templates/config/role_map_production.yml +2 -0
- data/lib/generators/atrium/templates/config/role_map_test.yml +2 -0
- data/lib/generators/atrium/templates/config/solr.yml +10 -0
- data/lib/generators/atrium/templates/db/seeds.rb +87 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_browse_levels.rb +18 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_collections.rb +20 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_descriptions.rb +16 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_essays.rb +15 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_exhibits.rb +16 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_search_facets.rb +14 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_showcase_facet_selections.rb +15 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_showcase_items.rb +17 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_showcases.rb +16 -0
- data/lib/generators/atrium/templates/themes/example.html.erb +21 -0
- data/lib/railties/all_tests.rake +23 -0
- data/lib/railties/atrium_cucumber.rake +121 -0
- data/lib/railties/index.rake +37 -0
- data/tasks/atrium.rake +268 -0
- data/tasks/atrium_rspec.rake +91 -0
- data/test_support/etc/Gemfile +33 -0
- data/test_support/etc/bundle_config +3 -0
- data/test_support/etc/rvmrc +32 -0
- data/test_support/features/atrium_collections.feature +162 -0
- data/test_support/features/atrium_exhibits.feature +164 -0
- data/test_support/features/step_definitions/atrium_collection_steps.rb +102 -0
- data/test_support/features/step_definitions/atrium_exhibit_steps.rb +53 -0
- data/test_support/features/step_definitions/bookmarks_steps.rb +6 -0
- data/test_support/features/step_definitions/error_steps.rb +5 -0
- data/test_support/features/step_definitions/folder_steps.rb +27 -0
- data/test_support/features/step_definitions/general_steps.rb +50 -0
- data/test_support/features/step_definitions/record_view_steps.rb +12 -0
- data/test_support/features/step_definitions/saved_searches_steps.rb +22 -0
- data/test_support/features/step_definitions/search_facets_steps.rb +29 -0
- data/test_support/features/step_definitions/search_history_steps.rb +9 -0
- data/test_support/features/step_definitions/search_result_steps.rb +114 -0
- data/test_support/features/step_definitions/search_steps.rb +103 -0
- data/test_support/features/step_definitions/user_steps.rb +5 -0
- data/test_support/features/step_definitions/web_steps.rb +213 -0
- data/test_support/features/support/env.rb +67 -0
- data/test_support/features/support/paths.rb +76 -0
- data/test_support/features/support/selectors.rb +40 -0
- data/test_support/fixtures/atrium_exhibits.yml +3 -0
- data/test_support/spec/controllers/atrium/base_controller_spec.rb +13 -0
- data/test_support/spec/controllers/atrium/collection_exhibit_order_controller_spec.rb +29 -0
- data/test_support/spec/controllers/atrium/collections_controller_spec.rb +185 -0
- data/test_support/spec/controllers/atrium/customization_controller_spec.rb +38 -0
- data/test_support/spec/controllers/atrium/descriptions_controller_spec.rb +150 -0
- data/test_support/spec/controllers/atrium/exhibit_facet_order_controller_spec.rb +36 -0
- data/test_support/spec/controllers/atrium/exhibits_controller_spec.rb +192 -0
- data/test_support/spec/controllers/atrium/showcases_controller_spec.rb +185 -0
- data/test_support/spec/helpers/atrium_collections_helper_spec.rb +147 -0
- data/test_support/spec/helpers/atrium_description_helper_spec.rb +47 -0
- data/test_support/spec/helpers/atrium_solr_helper_spec.rb +512 -0
- data/test_support/spec/models/atrium/browse_level_spec.rb +31 -0
- data/test_support/spec/models/atrium/collection_spec.rb +30 -0
- data/test_support/spec/models/atrium/description_spec.rb +67 -0
- data/test_support/spec/models/atrium/essay_spec.rb +12 -0
- data/test_support/spec/models/atrium/exhibit_spec.rb +76 -0
- data/test_support/spec/models/atrium/search/facet_selection_spec.rb +24 -0
- data/test_support/spec/models/atrium/search/facet_spec.rb +11 -0
- data/test_support/spec/models/atrium/search_facet_spec.rb +54 -0
- data/test_support/spec/models/atrium/showcase/facet_selection_spec.rb +15 -0
- data/test_support/spec/models/atrium/showcase/item_spec.rb +12 -0
- data/test_support/spec/models/atrium/showcase_facet_selection_spec.rb +65 -0
- data/test_support/spec/models/atrium/showcase_spec.rb +134 -0
- data/test_support/spec/rcov.opts +3 -0
- data/test_support/spec/routing/atrium/collections_routing_spec.rb +33 -0
- data/test_support/spec/spec.opts +4 -0
- data/test_support/spec/spec_helper.rb +47 -0
- data/test_support/spec/support/be_accessible_matcher.rb +8 -0
- data/test_support/spec/support/be_routed_mixin.rb +7 -0
- data/test_support/tmp/step_definitions/catalog_index_steps.rb +14 -0
- data/test_support/tmp/step_definitions/edit_document_steps.rb +67 -0
- data/test_support/tmp/step_definitions/hydra_metadata_steps.rb +3 -0
- data/test_support/tmp/step_definitions/hydra_steps.rb +8 -0
- data/test_support/tmp/step_definitions/search_steps.rb +86 -0
- data/test_support/tmp/step_definitions/searching_steps.rb +22 -0
- data/test_support/tmp/step_definitions/select_steps.rb +8 -0
- data/test_support/tmp/step_definitions/show_document_steps.rb +73 -0
- data/test_support/tmp/step_definitions/user_steps.rb +15 -0
- data/test_support/tmp/step_definitions/web_steps.rb +273 -0
- data/test_support/tmp/support/env.rb +54 -0
- data/test_support/tmp/support/paths.rb +57 -0
- metadata +1047 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
<% @page_title = application_name + " Search Results" %>
|
3
|
+
|
4
|
+
<% extra_head_content << render_opensearch_response_metadata.html_safe %>
|
5
|
+
|
6
|
+
<%= render :partial => 'search_form' %>
|
7
|
+
|
8
|
+
|
9
|
+
<div class="pageEntriesInfo">
|
10
|
+
<%= render_pagination_info @response, :entry_name=>'item' %>
|
11
|
+
<%=link_to "start over", catalog_index_path, :id=>"startOverLink" %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<%= render 'sort_and_per_page' %>
|
15
|
+
|
16
|
+
<%= render 'results_pagination' %>
|
17
|
+
|
18
|
+
<%= render :partial => 'listing/document_list' %>
|
19
|
+
|
20
|
+
<% sidebar_items << capture do %>
|
21
|
+
<%= render :partial=>'facets' %>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<%= render 'results_pagination' %>
|
@@ -0,0 +1,86 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
5
|
+
<title><%= h(@page_title || application_name) %></title>
|
6
|
+
<link href="<%= opensearch_catalog_path(:format => 'xml', :only_path => false) %>" title="<%= application_name%>" type="application/opensearchdescription+xml" rel="search"/>
|
7
|
+
<%= favicon_link_tag asset_path('favicon.ico') %>
|
8
|
+
<%= stylesheet_link_tag "application" %>
|
9
|
+
<%= javascript_include_tag "application" %>
|
10
|
+
<%= csrf_meta_tags %>
|
11
|
+
<%= raw(render_head_content) %>
|
12
|
+
<%= yield :theme_styles %>
|
13
|
+
</head>
|
14
|
+
<% if params[:q].to_s.empty? and params[:f].to_s.empty? and params[:id].nil? %>
|
15
|
+
<body onload="$('input#q').focus();" class="<%= render_body_class.html_safe %>">
|
16
|
+
<% else %>
|
17
|
+
<body class="<%= render_body_class.html_safe %>">
|
18
|
+
<% end %>
|
19
|
+
<%= render :partial => 'shared/banner' %>
|
20
|
+
<div id="page">
|
21
|
+
<div id="hd">
|
22
|
+
<div id="logo">
|
23
|
+
<% if content_for? :main_header %>
|
24
|
+
<%= yield :main_header %>
|
25
|
+
<% else %>
|
26
|
+
<%# NOTE: There shouldn't be a new collection object hanging around here but one is present in the root catalog page when logged in. %>
|
27
|
+
<% if @atrium_collection && !@atrium_collection.new_record? %>
|
28
|
+
<h3><%= link_to @atrium_collection.title, atrium_collection_home_path(@atrium_collection) %></h3>
|
29
|
+
<% else %>
|
30
|
+
<h1 class="site_title">
|
31
|
+
<%= link_to application_name, "/" %>
|
32
|
+
</h1>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
35
|
+
</div>
|
36
|
+
<div id="user_util_links">
|
37
|
+
<%= render :partial=>'/user_util_links' %>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
<div id="bd">
|
41
|
+
<div id="main">
|
42
|
+
<div id="main_container">
|
43
|
+
<%= render :partial=>'/flash_msg' %>
|
44
|
+
<%= yield %>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
<div id="sidebar">
|
48
|
+
<% if params[:controller].eql?( "catalog") %>
|
49
|
+
<% if (params[:atrium_collection_browse].blank? && params[:atrium_exhibit_browse].blank?) || params[:class] == "edit_collection" %>
|
50
|
+
<% if params[:collection_id] %>
|
51
|
+
<h3 class="collection-browse-link"><%= link_to "Browse This Collection", atrium_collection_path(params[:collection_id]) %></h3>
|
52
|
+
<% end %>
|
53
|
+
<% else %>
|
54
|
+
<%= render :partial => 'shared/collection_search_form' %>
|
55
|
+
<%= render :partial => 'atrium/collections/navigation' %>
|
56
|
+
<% end %>
|
57
|
+
<% elsif params[:controller].eql?("atrium/collections") && !(params[:action].eql?("show"))%>
|
58
|
+
<%= render :partial => 'atrium/collections/edit_navigation' %>
|
59
|
+
<% elsif params[:controller].eql?("atrium/exhibits") && !(params[:action].eql?("show"))%>
|
60
|
+
<%= render :partial => 'atrium/collections/edit_navigation' %>
|
61
|
+
<% elsif params[:controller].eql?("atrium/exhibits") && params[:action].eql?("show") && session[:edit_showcase]%>
|
62
|
+
<%= render :partial => 'atrium/showcases/showcase_navigation' %>
|
63
|
+
<% elsif params[:controller].eql?("atrium/collections") && params[:action].eql?("show") && session[:edit_showcase]%>
|
64
|
+
<%= render :partial => 'atrium/showcases/showcase_navigation' %>
|
65
|
+
<% elsif params[:controller].eql?("atrium/collections") && params[:action].eql?("show")%>
|
66
|
+
<%= render :partial => 'shared/collection_search_form' %>
|
67
|
+
<%= render :partial => 'atrium/collections/navigation' %>
|
68
|
+
<% elsif params[:controller].eql?("atrium/descriptions") && params[:action].eql?("index")%>
|
69
|
+
<%= render :partial => 'shared/collection_search_form' %>
|
70
|
+
<%= render :partial => 'atrium/collections/navigation' %>
|
71
|
+
<% elsif params[:controller].eql?("atrium/descriptions") && !(params[:action].eql?("index"))%>
|
72
|
+
<% elsif params[:controller] != "user_sessions" && !(params[:controller] == "atrium/collections" && params[:action] == "index")%>
|
73
|
+
<%= render :partial => 'shared/collection_search_form' %>
|
74
|
+
<%= render :partial => 'atrium/collections/navigation' %>
|
75
|
+
<% end %>
|
76
|
+
<%= sidebar_items.join('').html_safe %>
|
77
|
+
</div>
|
78
|
+
</div>
|
79
|
+
<div id="ft">
|
80
|
+
<%= yield :footer %>
|
81
|
+
<%= raw(@footer) %>
|
82
|
+
</div>
|
83
|
+
</div>
|
84
|
+
|
85
|
+
</body>
|
86
|
+
</html>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
5
|
+
<title><%= h(@page_title || application_name) %></title>
|
6
|
+
<link href="<%= opensearch_catalog_path(:format => 'xml', :only_path => false) %>" title="<%= application_name%>" type="application/opensearchdescription+xml" rel="search"/>
|
7
|
+
<%= favicon_link_tag asset_path('favicon.ico') %>
|
8
|
+
<%= stylesheet_link_tag "application" %>
|
9
|
+
<%= javascript_include_tag "application" %>
|
10
|
+
<%= csrf_meta_tags %>
|
11
|
+
<%= raw(render_head_content) %>
|
12
|
+
</head>
|
13
|
+
<% if params[:q].to_s.empty? and params[:f].to_s.empty? and params[:id].nil? %>
|
14
|
+
<body onload="$('input#q').focus();" class="<%= render_body_class.html_safe %>">
|
15
|
+
<% else %>
|
16
|
+
<body class="<%= render_body_class.html_safe %>">
|
17
|
+
<% end %>
|
18
|
+
<%= render :partial => 'shared/banner' %>
|
19
|
+
<div id="page">
|
20
|
+
<div id="bd">
|
21
|
+
<div id="main">
|
22
|
+
<div id="main_container">
|
23
|
+
<%= render :partial=>'/flash_msg' %>
|
24
|
+
<%= yield %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
<div id="sidebar">
|
28
|
+
<%= sidebar_items.join('').html_safe %>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
<div id="ft">
|
32
|
+
<%= raw(@footer) %>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</body>
|
36
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<% # container for a single doc -%>
|
2
|
+
<div class="document <%= render_document_class document %>">
|
3
|
+
|
4
|
+
<% # header bar for doc items in index view -%>
|
5
|
+
<div class="documentHeader">
|
6
|
+
<%- if params[:CKEditor] %>
|
7
|
+
<% # main title container for doc partial view -%>
|
8
|
+
<div class="ckeditor">
|
9
|
+
<h3 class="index_title"><%= document_counter + 1 + @response.params[:start].to_i %>.
|
10
|
+
<%= link_to_document document, :label=>document_show_link_field, :counter => (document_counter + 1 + @response.params[:start].to_i) %>
|
11
|
+
</h3>
|
12
|
+
</div>
|
13
|
+
<% else %>
|
14
|
+
<% # bookmark/folder functions for items/docs are hidden in collection and exhibit view-%>
|
15
|
+
<%= render_index_doc_actions document %>
|
16
|
+
<div class="yui-u">
|
17
|
+
<h3 class="index_title"><%= document_counter + 1 + @response.params[:start].to_i %>.
|
18
|
+
<%= render_document_index_label document, :label=>document_show_link_field %>
|
19
|
+
</h3>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<% # main container for doc partial view -%>
|
25
|
+
<%= render_document_partial document, :index %>
|
26
|
+
|
27
|
+
</div>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
<% @page_title = application_name + " Search Results" %>
|
3
|
+
|
4
|
+
<% extra_head_content << render_opensearch_response_metadata.html_safe %>
|
5
|
+
|
6
|
+
<%= render :partial => 'search_form' %>
|
7
|
+
|
8
|
+
<%= render :partial => 'did_you_mean' %>
|
9
|
+
|
10
|
+
<%= render 'constraints', :localized_params=>params %>
|
11
|
+
|
12
|
+
<div class="pageEntriesInfo">
|
13
|
+
<%= render_pagination_info @response, :entry_name=>'item' %>
|
14
|
+
<%=link_to "start over", catalog_index_path, :id=>"startOverLink" %>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<%= render 'sort_and_per_page' %>
|
18
|
+
|
19
|
+
<%= render 'results_pagination' %>
|
20
|
+
|
21
|
+
<%= render :partial => 'listing/document_list' %>
|
22
|
+
|
23
|
+
<% sidebar_items << capture do %>
|
24
|
+
<%= render :partial=>'facets' %>
|
25
|
+
<% end %>
|
26
|
+
|
27
|
+
<%= render 'results_pagination' %>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<% # container for all documents in index view -%>
|
2
|
+
<div id="documents" class="collection-listing">
|
3
|
+
<% # loop thru each doc -%>
|
4
|
+
<% document_list = @document_list if document_list.nil?%>
|
5
|
+
<% response = @response if response.nil?%>
|
6
|
+
<% document_list.each_with_index do |document,counter| %>
|
7
|
+
<div class="document<%= thumbnail_class( document ) %>">
|
8
|
+
<% # header bar for doc items in index view -%>
|
9
|
+
<div class="documentHeader yui-g">
|
10
|
+
<% # main title container for doc partial view -%>
|
11
|
+
<div class="yui-u">
|
12
|
+
<%- af_model = get_af_model(document) -%>
|
13
|
+
<%- if af_model == "Collection" && document[Collection.title_solr_field_name] && !document[Collection.title_solr_field_name].empty?-%>
|
14
|
+
<%- title = document[Collection.title_solr_field_name].first -%>
|
15
|
+
<%- elsif af_model == "Component" && document["component_type_t"] && !document["component_type_t"].empty? && document[Component.title_solr_field_name] && !document[Component.title_solr_field_name].empty?-%>
|
16
|
+
<%- title = document[Component.title_solr_field_name].first -%>
|
17
|
+
<%- elsif af_model == "Page" && document["name_t"] && !document["name_t"].empty? -%>
|
18
|
+
<%- title = document["name_t"].first -%>
|
19
|
+
<%- else-%>
|
20
|
+
<%- title = document[:id] %>
|
21
|
+
<%- end %>
|
22
|
+
<!--<h2 class="index_title"><span class="title_count"><%# response.params[:start].to_i.eql?(0) ? counter + 1 + response.params[:start].to_i+new_counter : counter + 1 + response.params[:start].to_i-new_counter%>. </span> <%# link_to_document document, :label=>title.blank? ? document_show_link_field : title , :counter => (counter + 1 + response.params[:start].to_i) %></h2>-->
|
23
|
+
<h2 class="index_title"><span class="title_count"><%= counter + 1 + response.params[:start].to_i %>. </span> <%= link_to_document document, :label=>title.blank? ? document_show_link_field : title , :counter => (counter + 1 + response.params[:start].to_i) %></h2>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<% # main container for doc partial view -%>
|
28
|
+
<%= render_document_index_partial document, document[:id], counter, :index %>
|
29
|
+
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<% end %>
|
33
|
+
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<div id="collection-search" class="search">
|
2
|
+
<%- @atrium_collection ? collection_id = @atrium_collection[:id] : collection_id = params[:id]%>
|
3
|
+
<%= form_tag catalog_index_path, :method => :get do %>
|
4
|
+
<fieldset>
|
5
|
+
<h3 class="search"><label for="q"><%= link_to("Search Complete Collection", atrium_collection_home_path(collection_id)) %></label></h3>
|
6
|
+
<%= text_field_tag :q, params[:q], :class => "q" %>
|
7
|
+
<%= hidden_field_tag :collection_id, collection_id%>
|
8
|
+
<%= search_as_hidden_fields(:omit_keys => [:q, :f, :search_field, :qt, :action, :id, :controller, :class]).html_safe %>
|
9
|
+
<%= submit_tag 'Search', :class=>'submit' %>
|
10
|
+
</fieldset>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
<h1>Featured Sources</h1>
|
3
|
+
|
4
|
+
<div id="documents">
|
5
|
+
<%- if @featured_documents-%>
|
6
|
+
<% @featured_documents.each_with_index do |document, i| %>
|
7
|
+
<% # container for a single doc -%>
|
8
|
+
<div class="document <%= render_document_class document %>">
|
9
|
+
<% # header bar for doc items in index view -%>
|
10
|
+
<div class="documentHeader">
|
11
|
+
<% # main title container for doc partial view -%>
|
12
|
+
<div class="yui-u">
|
13
|
+
<h3 class="index_title"><%= i + 1 + @featured_response.params[:start].to_i%>. <%= link_to_document document, :label => document_show_link_field, :results_view => false %></h3>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<%= render_document_partial document, :index %>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
19
|
+
<%- end -%>
|
20
|
+
</div>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
|
2
|
+
<% descriptions.each do |desc| %>
|
3
|
+
<%- title= desc.pretty_title %>
|
4
|
+
<% if !desc.nil? && !is_editing?%>
|
5
|
+
<% path = params[:controller] == "atrium_exhibits" ? atrium_description_path(desc[:id], :f=>params[:f], :exhibit_id=>params[:id]) : atrium_description_path(desc[:id], :collection_id=>params[:id]) %>
|
6
|
+
<% if desc.show_on_this_page? %>
|
7
|
+
<h3>
|
8
|
+
<%= link_to title, path, :label=>("Essay: \"#{title}\"") %>
|
9
|
+
</h3>
|
10
|
+
<blockquote>
|
11
|
+
<%= desc.get_summary.html_safe %>
|
12
|
+
</blockquote>
|
13
|
+
<%= link_to "Read the complete essay", path%>
|
14
|
+
<% else %>
|
15
|
+
<h3><%=title%></h3>
|
16
|
+
<%- content= desc.description_solr_id.blank? ? desc.get_essay : get_essay_from_description(@description_hash,desc.description_solr_id)%>
|
17
|
+
<blockquote class="intro"><%= truncate( content, :length =>550, :ommision => "....").html_safe%></blockquote>
|
18
|
+
<% if content.length>50 %>
|
19
|
+
<a class="heading" href="#">[Read the complete essay]</a>
|
20
|
+
<div style="display: none"class="content" id="<%= desc[:id] %>">
|
21
|
+
<%= content.html_safe %>
|
22
|
+
</div>
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
25
|
+
<% elsif is_editing?%>
|
26
|
+
<%# need to add dl tag for animated JS to work %>
|
27
|
+
<dl>
|
28
|
+
<h3><%= "Essay: #{title}"%></h3>
|
29
|
+
<h4>Summary: </h4> <blockquote> <%= desc.get_summary.html_safe %></blockquote>
|
30
|
+
<h4>Essay: </h4><blockquote> <%= desc.get_summary.html_safe %> </blockquote>
|
31
|
+
<h4>From Solr:</h4> <%= desc.description_solr_id.blank? ? "" : get_essay_from_description(@description_hash,desc.description_solr_id).html_safe%>
|
32
|
+
<% if (can? :create, Atrium::Description)%>
|
33
|
+
<%= link_to 'Edit Description', edit_atrium_description_path(desc[:id]), :class => 'description_colorbox button', :action=> atrium_descriptions_path(:showcase_id=>desc.atrium_showcase_id, :id=>desc[:id], :no_layout=>true) if desc.description_solr_id.blank? %>
|
34
|
+
<a class="destroy_description button" href=# action="<%= atrium_description_path(desc[:id])%>" title="Remove Description"> Delete this description</a>
|
35
|
+
<% end %>
|
36
|
+
</dl>
|
37
|
+
<% end %>
|
38
|
+
<% end %>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<%# This partial recursively calls itself as necessary to render the navigation browse level data. %>
|
2
|
+
<% unless browse_levels.nil? || browse_facets.nil? || exhibit_number.nil?%>
|
3
|
+
<% browse_level = browse_levels.first %>
|
4
|
+
<% unless browse_level.values.empty? %>
|
5
|
+
<% solr_facet_name = browse_level.solr_facet_name %>
|
6
|
+
<% browse_level.label = facet_field_labels[solr_facet_name] if browse_level.label.blank? %>
|
7
|
+
<h3 class="facet-heading"><%= browse_level.label %></h3>
|
8
|
+
<ul class="browse-facets">
|
9
|
+
<% browse_level.values.each do |value| %>
|
10
|
+
<li class="<%= value.downcase.gsub(/\W/, '-') %>">
|
11
|
+
<% @exhibit ? exhibit_set_from_params = @exhibit.set_number : exhibit_set_from_params = get_exhibit_set_number(exhibit_id) %>
|
12
|
+
<% if !browse_level.selected.nil? && browse_level.selected == value && exhibit_number.to_i == exhibit_set_from_params.to_i%>
|
13
|
+
<% selected_path = get_selected_browse_facet_path(solr_facet_name, value, browse_facets, exhibit_number, exhibit_id) %>
|
14
|
+
<span class="selected browse-facet">
|
15
|
+
<%= value %>
|
16
|
+
</span>
|
17
|
+
<%= link_to("[remove]", selected_path, :class=>"remove") %>
|
18
|
+
<% if browse_levels.size > 1 && !browse_levels.second.values.empty? %>
|
19
|
+
<%= render :partial => 'shared/navigation_browse_levels',
|
20
|
+
:locals => {
|
21
|
+
:browse_levels => browse_levels.slice(1, browse_levels.length - 1),
|
22
|
+
:browse_facets => browse_facets.slice(1, browse_facets.length - 1),
|
23
|
+
:exhibit_number => exhibit_number,
|
24
|
+
:exhibit_id => exhibit_id
|
25
|
+
} %>
|
26
|
+
<% end %>
|
27
|
+
<% else %>
|
28
|
+
<%= link_to(value, get_browse_facet_path(solr_facet_name, value, browse_facets, exhibit_number, exhibit_id)) %>
|
29
|
+
<% end %>
|
30
|
+
</li>
|
31
|
+
<% end %>
|
32
|
+
</ul>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<strong>Browse view configuration</strong>
|
2
|
+
<%- params[:controller] == "atrium_collections" ? collection_id = params[:id] : collection_id = params[:collection_id] -%>
|
3
|
+
|
4
|
+
<ul class="controls">
|
5
|
+
<li>
|
6
|
+
<%= link_to 'Select Featured Items',
|
7
|
+
atrium_showcase_featured_path(:id => @atrium_showcase[:id], :collection_id => collection_id, :f => params[:f]),
|
8
|
+
:class => 'select_colorbox button',
|
9
|
+
:action => atrium_showcase_path(:id => @atrium_showcase[:id], :no_layout=>true)
|
10
|
+
%>
|
11
|
+
</li>
|
12
|
+
<li>
|
13
|
+
<%= link_to 'Add New Description', new_atrium_description_path(:showcase_id=>@atrium_showcase[:id]), :class => 'description_colorbox button', :action=> atrium_descriptions_path(:showcase_id=>@atrium_showcase[:id], :no_layout=>true) %>
|
14
|
+
</li>
|
15
|
+
<li>
|
16
|
+
<%= link_to 'Add Description From Solr', atrium_descriptions_add_path(:showcase_id=>@atrium_showcase[:id]), :class => 'description_colorbox button', :action=> atrium_descriptions_link_path(:showcase_id=>@atrium_showcase[:id], :no_layout=>true) %>
|
17
|
+
</li>
|
18
|
+
<li class="last">
|
19
|
+
<%= link_to "Stop Editing", stop_atrium_customization_path(@atrium_showcase.for_exhibit? ? {:type => 'exhibit', :id => @exhibit[:id], :f => params[:f]} : {:type => 'collection', :id => @atrium_collection[:id], :f => params[:f]}), :class => 'button close' %>
|
20
|
+
</li>
|
21
|
+
</ul>
|
22
|
+
|
data/atrium.gemspec
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "atrium/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "atrium"
|
7
|
+
s.version = Atrium::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Rick Johnson, Dan Brubaker Horst, Jeremy Friesen, and Banu Lakshminarayanan"]
|
10
|
+
s.email = ["hydra-tech@googlegroups.com"]
|
11
|
+
s.homepage = "https://github.com/ndlib/atrium"
|
12
|
+
s.summary = %q{Atrium Rails Engine (requires Rails 3)}
|
13
|
+
s.description = %q{This is an ALPHA release -- you have been warned. It will get much better soon. Atrium is a Rails Engine for for creating collections in either a Blacklight or Hydra context. The full hydra stack includes: Blacklight, Fedora, Solr, active-fedora, solrizer, and om. The first use of the atrium name for a gem was by Hiten Parmar: https://github.com/hrp/atrium}
|
14
|
+
|
15
|
+
|
16
|
+
s.add_dependency 'rails', '~> 3.1'
|
17
|
+
s.add_dependency 'blacklight', '~> 3.3'
|
18
|
+
s.add_dependency 'builder'
|
19
|
+
s.add_dependency 'cancan'
|
20
|
+
s.add_dependency 'ckeditor_rails'
|
21
|
+
s.add_dependency 'columnize'
|
22
|
+
s.add_dependency 'crack'
|
23
|
+
s.add_dependency 'curb'
|
24
|
+
s.add_dependency 'database_cleaner'
|
25
|
+
s.add_dependency 'diff-lcs'
|
26
|
+
s.add_dependency 'facets', '2.8.4'
|
27
|
+
s.add_dependency 'haml'
|
28
|
+
s.add_dependency 'httparty'
|
29
|
+
s.add_dependency 'json_pure', '>1.4.3'
|
30
|
+
s.add_dependency 'launchy'
|
31
|
+
s.add_dependency 'linecache'
|
32
|
+
s.add_dependency 'mediashelf-loggable'
|
33
|
+
s.add_dependency 'mime-types'
|
34
|
+
s.add_dependency 'multipart-post'
|
35
|
+
s.add_dependency 'nokogiri' # Default to using the version required by Blacklight
|
36
|
+
s.add_dependency 'om', '>=1.2.3'
|
37
|
+
s.add_dependency 'rack'
|
38
|
+
s.add_dependency 'rack-test'
|
39
|
+
s.add_dependency 'rake'
|
40
|
+
s.add_dependency 'rcov'
|
41
|
+
s.add_dependency 'RedCloth', '=4.2.3'
|
42
|
+
s.add_dependency 'solr-ruby'
|
43
|
+
s.add_dependency 'solrizer', '>=1.1.0'
|
44
|
+
s.add_dependency 'term-ansicolor'
|
45
|
+
s.add_dependency 'trollop'
|
46
|
+
s.add_dependency 'xml-simple'
|
47
|
+
s.add_dependency 'yard'
|
48
|
+
s.add_dependency 'block_helpers'
|
49
|
+
s.add_dependency 'sanitize'
|
50
|
+
s.add_dependency 'morphine'
|
51
|
+
s.add_development_dependency 'cucumber', '>=0.8.5'
|
52
|
+
s.add_development_dependency 'cucumber-rails', '>=1.0.0'
|
53
|
+
s.add_development_dependency 'devise' # Expected by Blacklight generator in test app
|
54
|
+
s.add_development_dependency 'factory_girl'
|
55
|
+
s.add_development_dependency 'gherkin'
|
56
|
+
s.add_development_dependency 'jettywrapper', '~> 1.1.0'
|
57
|
+
s.add_development_dependency 'jquery-rails'
|
58
|
+
s.add_development_dependency 'mocha'
|
59
|
+
s.add_development_dependency 'rake'
|
60
|
+
s.add_development_dependency 'rspec', '>= 2.0.0'
|
61
|
+
s.add_development_dependency 'rspec-rails', '>= 2.0.0' # rspec-rails 2.0.0 requires Rails 3.
|
62
|
+
s.add_development_dependency 'ruby-debug'
|
63
|
+
s.add_development_dependency 'ruby-debug-base'
|
64
|
+
s.add_development_dependency 'sqlite3'
|
65
|
+
s.add_development_dependency 'rspec-on-rails-matchers'
|
66
|
+
s.add_development_dependency 'rspec-given'
|
67
|
+
s.add_development_dependency 'guard'
|
68
|
+
s.add_development_dependency 'guard-rspec'
|
69
|
+
s.add_development_dependency 'ruby_gntp' if RUBY_PLATFORM =~ /darwin/
|
70
|
+
|
71
|
+
|
72
|
+
s.files = `git ls-files`.split("\n")
|
73
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
74
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
75
|
+
s.require_paths = ["lib"]
|
76
|
+
end
|