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,20 @@
|
|
1
|
+
<% if params[:exhibit_id] %>
|
2
|
+
<%= link_to "Back to Browse Exhibit",atrium_exhibit_path(:id=>params[:exhibit_id], :f=>params[:f]) %>
|
3
|
+
<% else %>
|
4
|
+
<%= link_to "Back to Browse #{@atrium_collection.pretty_title}", @atrium_collection %>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<div>
|
8
|
+
<h3><%= @atrium_description.pretty_title%></h3>
|
9
|
+
<% if !@atrium_description.description_solr_id.blank? %>
|
10
|
+
<%= get_essay_from_description(@description_hash,@atrium_description.description_solr_id).html_safe%>
|
11
|
+
<% elsif @atrium_description && @atrium_description.essay && @atrium_description.essay.content %>
|
12
|
+
<%= @atrium_description.get_essay %>
|
13
|
+
<% end %>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<% if params[:exhibit_id] %>
|
17
|
+
<%= link_to "Back to Browse Exhibit",atrium_exhibit_path(:id=>params[:exhibit_id], :f=>params[:f]) %>
|
18
|
+
<% else %>
|
19
|
+
<%= link_to "Back to Browse #{@atrium_collection.pretty_title}", @atrium_collection %>
|
20
|
+
<% end %>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<% if current_user %>
|
2
|
+
<%- existing_bookmark = current_user.existing_bookmark_for(document[:id]) -%>
|
3
|
+
<%-
|
4
|
+
# Note these two forms are pretty similar but for different :methods, classes, and labels.
|
5
|
+
# but it was simpler to leave them seperate instead of DRYing them, got confusing trying that.
|
6
|
+
# the data-doc-id attribute is used by our JS that converts to a checkbox/label.
|
7
|
+
-%>
|
8
|
+
<% unless existing_bookmark %>
|
9
|
+
|
10
|
+
<%= form_tag( bookmark_path( document[:id]), :method => :put, :class => "bookmark_toggle", "data-doc-id" => document[:id], :title=> document[document_show_link_field] ) do %>
|
11
|
+
<%= hidden_field(:bookmark, :title, :value => document[document_show_link_field] ) %>
|
12
|
+
<%= submit_tag("Bookmark", :id => "bookmark_toggle_#{document[:id]}", :class => "bookmark_add") %>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<% else %>
|
16
|
+
|
17
|
+
<%= form_tag( bookmark_path( document[:id]), :method => :delete, :class => "bookmark_toggle", "data-doc-id" => document[:id], :title=> document[document_show_link_field]) do %>
|
18
|
+
<%= hidden_field(:bookmark, :title, :value => document[document_show_link_field] ) %>
|
19
|
+
<%= submit_tag("Remove bookmark", :id => "bookmark_toggle_#{document[:id]}", :class => "bookmark_remove") %>
|
20
|
+
<% end %>
|
21
|
+
|
22
|
+
<% end %>
|
23
|
+
<% else %>
|
24
|
+
|
25
|
+
<% end %>
|
@@ -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,108 @@
|
|
1
|
+
<% if @exhibit %>
|
2
|
+
<%= form_for(@exhibit, :html => {:class => 'atrium'}) do |f| %>
|
3
|
+
<fieldset>
|
4
|
+
<legend>General Configuration</legend>
|
5
|
+
<ol>
|
6
|
+
<li>
|
7
|
+
<%= f.label :label, 'Title:' %>
|
8
|
+
<%= f.text_field :label %>
|
9
|
+
</li>
|
10
|
+
</ol>
|
11
|
+
</fieldset>
|
12
|
+
|
13
|
+
<h3>Exhibit Scope</h3>
|
14
|
+
<p>
|
15
|
+
An exhibit is a subset of a collection. The scope of the exhibit can be
|
16
|
+
set to any query made in the search interface.
|
17
|
+
</p>
|
18
|
+
<fieldset>
|
19
|
+
<legend>Current Scope</legend>
|
20
|
+
<%if @exhibit.filter_query_params %>
|
21
|
+
<ul>
|
22
|
+
<% @exhibit.filter_query_params.each do |key,value| %>
|
23
|
+
<li><label><%= key %>: </label><%= value %></li>
|
24
|
+
<% end %>
|
25
|
+
</ul>
|
26
|
+
<% end %>
|
27
|
+
</fieldset>
|
28
|
+
<% collection_id = @exhibit.atrium_collection_id if @exhibit.atrium_collection_id %>
|
29
|
+
<% query_params = {:collection_id=>collection_id,:edit_exhibit_filter=>true, :exhibit_id=>@exhibit[:id]} %>
|
30
|
+
<% query_params.merge!(@exhibit.filter_query_params) if @exhibit.filter_query_params %>
|
31
|
+
<% query_params.delete(:controller) %>
|
32
|
+
<% query_params.delete(:action) %>
|
33
|
+
<% query_params.delete(:solr_doc_ids) %>
|
34
|
+
<p class="exhibit-scope-controls">
|
35
|
+
<%= link_to("Set Exhibit Scope", atrium_set_exhibit_scope_path(query_params), :class => 'button').html_safe %>
|
36
|
+
<%= link_to("Remove Exhibit Scope", atrium_unset_exhibit_scope_path(@exhibit[:id]), :class => 'button').html_safe %>
|
37
|
+
</p>
|
38
|
+
|
39
|
+
<h3>Group Exhibit Items by Facets</h3>
|
40
|
+
<p>
|
41
|
+
Items present in a exhibit can be further scoped by facet selections. These facets
|
42
|
+
are arranged in a single-level tree with each facet nested beneath its parent.
|
43
|
+
</p>
|
44
|
+
<fieldset>
|
45
|
+
<legend>Current Facets</legend>
|
46
|
+
<% if @exhibit.browse_levels.any? %>
|
47
|
+
<table>
|
48
|
+
<thead>
|
49
|
+
<tr>
|
50
|
+
<th> </th>
|
51
|
+
<th> </th>
|
52
|
+
<th>Facet</th>
|
53
|
+
<th>Label</th>
|
54
|
+
<th>Filter</th>
|
55
|
+
<th>Exclude</th>
|
56
|
+
<th>Remove</th>
|
57
|
+
</tr>
|
58
|
+
</thead>
|
59
|
+
<tbody data-resource="<%= update_atrium_exhibit_facet_order_path %>" data-primary-label="Group By:" data-secondary-label="Then By:" class="sortable">
|
60
|
+
<% @exhibit.browse_levels.each_with_index do |level,index| %>
|
61
|
+
<tr data-id="<%= level[:id] %>" data-order="<%= level.level_number %>" class="ui-state-default">
|
62
|
+
<%= f.fields_for :browse_levels, level do |level_form| %>
|
63
|
+
<% collection_id = @exhibit.atrium_collection_id if @exhibit.atrium_collection_id %>
|
64
|
+
<% level_query_params = {:collection_id=>collection_id,:browse_level_id=>level[:id], :exhibit_id=>@exhibit[:id]} %>
|
65
|
+
<% level_query_params.merge!(level.filter_query_params) if level.filter_query_params %>
|
66
|
+
<% exclude_query_params = level_query_params.dup %>
|
67
|
+
<td><span class="ui-icon ui-icon-arrowthick-2-n-s"></span></td>
|
68
|
+
<td class="label"><%= level.level_number == 1 ? 'Group By:' : 'Then By:' %></td>
|
69
|
+
<td><%=facet_field_labels[level.solr_facet_name]%></td>
|
70
|
+
<td><%=level_form.text_field :label, :value=>level.label%></td>
|
71
|
+
<td><%= link_to("Set Group By Filter", catalog_index_path(level_query_params.merge!(:edit_browse_level_filter=>level[:id]))).html_safe %></td>
|
72
|
+
<td><%= link_to("Set Exclude Filter", catalog_index_path(exclude_query_params.merge!(:exclude_browse_level_filter=>level[:id]))).html_safe %></td>
|
73
|
+
<td><%=level_form.check_box :_destroy %></td>
|
74
|
+
<% end %>
|
75
|
+
</tr>
|
76
|
+
<% end %>
|
77
|
+
</tbody>
|
78
|
+
</table>
|
79
|
+
<% end %>
|
80
|
+
</fieldset>
|
81
|
+
<p class="exhibit-facet-controls">
|
82
|
+
<%= f.submit 'Update Exhibit and Facets', :class => 'button' %>
|
83
|
+
</p>
|
84
|
+
<% end %>
|
85
|
+
|
86
|
+
<%= form_for(@exhibit) do |f| %>
|
87
|
+
<% @level = Atrium::BrowseLevel.new%>
|
88
|
+
<% @exhibit.set_number = @atrium_collection.exhibits.size + 1 %>
|
89
|
+
<% @exhibit.atrium_collection_id = @atrium_collection[:id] %>
|
90
|
+
<%= f.fields_for :browse_levels, @level do |level_fields| %>
|
91
|
+
<% if @exhibit.browse_levels.empty? %>
|
92
|
+
<% available_facets = CatalogController.blacklight_config.facet_fields.keys %>
|
93
|
+
<% else %>
|
94
|
+
<% facet_names = @exhibit.browse_levels.collect {|level| level.solr_facet_name}%>
|
95
|
+
<% available_facets = CatalogController.blacklight_config.facet_fields.keys.reject {|facet| facet_names.include?(facet)} %>
|
96
|
+
<% end %>
|
97
|
+
<% @level.level_number = @exhibit.browse_levels.size + 1 %>
|
98
|
+
<fieldset>
|
99
|
+
<legend>Add Facets To This Exhibit</legend>
|
100
|
+
<%= level_fields.hidden_field :level_number %>
|
101
|
+
<%= level_fields.label :solr_facet_name, 'Solr Facet:' %>
|
102
|
+
<%= level_fields.select(:solr_facet_name, available_facets.collect {|solr_fname| [facet_field_labels[solr_fname],solr_fname]})%>
|
103
|
+
<%= f.submit 'Add Facet', :class => 'button' %>
|
104
|
+
</fieldset>
|
105
|
+
<% end %>
|
106
|
+
<% end %>
|
107
|
+
|
108
|
+
<% end %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<h1>Configure Exhibit</h1>
|
2
|
+
|
3
|
+
<%= render :partial => "form" %>
|
4
|
+
|
5
|
+
<% if @exhibit %>
|
6
|
+
<p class="exhibit-destroy-controls">
|
7
|
+
<%= button_to "Delete this Exhibit", atrium_exhibit_path(@exhibit[:id]), :method=>:delete, :class=>:destroy, :confirm=>"Are you really want to delete this exhibit?", :class => 'button' %>
|
8
|
+
</p>
|
9
|
+
<% end %>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<h2>
|
2
|
+
<div class="<%= params[:edit_showcase] && (can? :create, Atrium::Exhibit) ? "edit-text": "no-edit"%>" id="div_1" data-column-name="atrium_exhibit[label]" data-update-uri=<%=atrium_exhibit_path(@exhibit)%>>
|
3
|
+
<%= @exhibit.pretty_title %>
|
4
|
+
</div>
|
5
|
+
</h2>
|
6
|
+
|
7
|
+
<div id="show-description">
|
8
|
+
<%- if @atrium_showcase && @atrium_showcase.descriptions-%>
|
9
|
+
<%= render :partial=>'shared/list_descriptions', :locals=>{:descriptions=>@atrium_showcase.descriptions} %>
|
10
|
+
<%- end -%>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div id="show-selected">
|
14
|
+
<%- if !@featured_documents.blank? && @featured_documents.any? -%>
|
15
|
+
<%= render :partial=>'shared/featured_sources' %>
|
16
|
+
<%- end -%>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<h3 class="list-heading">Complete Sources</h3>
|
20
|
+
<div id="complete-sources">
|
21
|
+
<%- if !@collection_items_documents.blank? -%>
|
22
|
+
<%= render :partial=>'atrium/collections/collection_items_index' %>
|
23
|
+
<%- else -%>
|
24
|
+
<%= render :partial=>'atrium/collections/browse_index'%>
|
25
|
+
<%- end -%>
|
26
|
+
</div>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<%- unless @exhibit_navigation_data.nil? || @exhibit_navigation_data.empty? -%>
|
2
|
+
<%- @exhibit_navigation_data.each do |exhibit| -%>
|
3
|
+
<%- if @exhibit && exhibit.set_number == @exhibit.set_number %>
|
4
|
+
<%- unless exhibit.browse_levels.nil? || exhibit.browse_levels.empty? -%>
|
5
|
+
<%= render :partial => 'shared/navigation_browse_levels',
|
6
|
+
:locals => {
|
7
|
+
:exhibit_number => exhibit.set_number,
|
8
|
+
:browse_levels => exhibit.browse_levels,
|
9
|
+
:browse_facets => exhibit.browse_facet_names,
|
10
|
+
:exhibit_id => exhibit[:id]
|
11
|
+
}%>
|
12
|
+
<%- end -%>
|
13
|
+
<%- end -%>
|
14
|
+
<%- end -%>
|
15
|
+
<%- end -%>
|
16
|
+
|
17
|
+
<%- if current_user && is_editing? -%>
|
18
|
+
<%- if !@atrium_showcase -%>
|
19
|
+
<%= link_to "Customize this page", get_customize_page_path, :class=>"customize"%>
|
20
|
+
<%- else %>
|
21
|
+
<%= link_to 'View this page', atrium_showcase_refresh_path(@atrium_showcase[:id], :f=>params[:f]) %>
|
22
|
+
<%- end %>
|
23
|
+
<%- end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render :partial=>'shared/featured_sources' %>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<% if @atrium_collection.search_instructions %>
|
2
|
+
<%= @atrium_collection.search_instructions.html_safe %>
|
3
|
+
<% else %>
|
4
|
+
<%= render :partial => 'default_collection_text' %>
|
5
|
+
<% end %>
|
6
|
+
<h3><%= link_to 'Browse This Collection', atrium_collection_path(params[:collection_id]) %></h3>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<h2>About Searching This Collection</h2>
|
2
|
+
<p>
|
3
|
+
Search results will be narrowed to just items contained within this
|
4
|
+
collection. If you wish to search across multiple collections you can go to
|
5
|
+
the <%= link_to "Main Search Page", root_path %>.
|
6
|
+
|
7
|
+
The bibliographic descriptions available on this site can be browsed via the
|
8
|
+
general search box or faceted values lists, both found at left. Entering a
|
9
|
+
query in the search box seeks a match across all fields of bibliographic data.
|
10
|
+
</p>
|
11
|
+
<p>
|
12
|
+
If you have narrowed down a results list via faceted values but would like to
|
13
|
+
drop one or more of these restrictions from your results set, click the
|
14
|
+
“ <span class="close-symbol">×</span> ” symbol at the top of
|
15
|
+
the page to eliminate search limiters. You can also initiate a new search at
|
16
|
+
any time via the blue “Start Over” button found at the top of the
|
17
|
+
results set.
|
18
|
+
</p>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<h3><%= t(:welcome) %></h3>
|
2
|
+
<p>To modify this text copy the following file within the Atirum gem:</p>
|
3
|
+
<pre>GEM_HOME/atrium/app/views/catalog/_default_home_text.html.erb</pre>
|
4
|
+
<p>to your rails application:<p>
|
5
|
+
<code><pre>app/views/catalog/_default_home_text.html.erb</pre></code>
|
6
|
+
<p><strong>NOTE:</strong> You will need to create the <em>views/catalog</em> directory if you haven't already.</p>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<dl class="defList" style="position:relative;left:-60px;">
|
2
|
+
<%- index_fields.each do |solr_fname, field| -%>
|
3
|
+
<%- if document.has? solr_fname %>
|
4
|
+
<dt class="blacklight-<%= solr_fname.parameterize %>"><%= render_index_field_label :field => solr_fname %></dt>
|
5
|
+
<dd class="blacklight-<%= solr_fname.parameterize %>"><%= render_index_field_value :document => document, :field => solr_fname %></dd>
|
6
|
+
<%- end -%>
|
7
|
+
<%- end -%>
|
8
|
+
</dl>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<% if params[:add_featured] %>
|
2
|
+
<h1>Select Featured Items</h1>
|
3
|
+
<p>
|
4
|
+
In a showcase the “Featured Items” are highlighted as exemplars
|
5
|
+
and placed at the top of the page. The rest of the items are present in a
|
6
|
+
paginated list at below them.
|
7
|
+
</p>
|
8
|
+
<p>
|
9
|
+
To select “Featured Items” use the “Select” checkbox
|
10
|
+
on the right side of the desired item. You can limit the items listed by
|
11
|
+
keyword search and or facet selection.
|
12
|
+
</p>
|
13
|
+
<p>
|
14
|
+
Each time you make a selection it is saved. When you are finished close the modal window.
|
15
|
+
</p>
|
16
|
+
<% elsif params[:add_description] %>
|
17
|
+
<h1>Select Existing Description</h1>
|
18
|
+
<p>
|
19
|
+
Descriptions are blocks of text present at the top of the page when viewing
|
20
|
+
a showcase. They can be added from within Atrium or they can be ingested
|
21
|
+
into Solr through any process you like.
|
22
|
+
</p>
|
23
|
+
<p>
|
24
|
+
To associate a description that is already present in the Solr index with
|
25
|
+
this showcase find the item you are interested in and click the
|
26
|
+
“Select” checkbox. You can limit the items listed by keyword
|
27
|
+
search and or facet selection.
|
28
|
+
</p>
|
29
|
+
<p>
|
30
|
+
Each time you make a selection it is saved. When you are finished close the modal window.
|
31
|
+
</p>
|
32
|
+
<% else %>
|
33
|
+
<%= render :partial => "shared/collection_title_header" if @atrium_collection %>
|
34
|
+
<% end %>
|
35
|
+
|
36
|
+
<div id="search" class="search">
|
37
|
+
<%= form_tag catalog_index_path, :method => :get do %>
|
38
|
+
<h2 class="search"><%= label_tag(:q, "Search ") %></h2>
|
39
|
+
<%= text_field_tag :q, params[:q], :class => "q" %>
|
40
|
+
<% unless search_fields.empty? %>
|
41
|
+
<%= label_tag(:search_field, " in ") %>
|
42
|
+
<%= select_tag(:search_field, options_for_select(search_fields, h(params[:search_field])), :title => "Targeted search options", :class=>"search_field") %>
|
43
|
+
<% end %>
|
44
|
+
<%= search_as_hidden_fields(:omit_keys => [:q, :search_field, :qt, :page]).html_safe %>
|
45
|
+
|
46
|
+
<%= submit_tag 'search', :class=>'submit' %>
|
47
|
+
|
48
|
+
<% if params[:collection_id] && params[:edit_collection_filter] %>
|
49
|
+
<div id="prompt" class="ui-state-highlight ui-corner-all">
|
50
|
+
<%= submit_tag 'Set Collection Scope to Here', :class=>'submit', :name=>'save_collection_filter_button' %>
|
51
|
+
</div>
|
52
|
+
<% elsif params[:edit_exhibit_filter] %>
|
53
|
+
<div id="prompt" class="ui-state-highlight ui-corner-all">
|
54
|
+
<%= submit_tag 'Set Exhibit Scope to Here', :class=>'submit', :name=>'save_exhibit_filter_button' %>
|
55
|
+
</div>
|
56
|
+
<% elsif params[:edit_browse_level_filter] %>
|
57
|
+
<div id="prompt" class="ui-state-highlight ui-corner-all">
|
58
|
+
<%= submit_tag 'Set Browse Level Scope to Here', :class=>'submit', :name=>'save_browse_level_filter_button' %>
|
59
|
+
</div>
|
60
|
+
<% elsif params[:exclude_browse_level_filter] %>
|
61
|
+
<div id="prompt" class="ui-state-highlight ui-corner-all">
|
62
|
+
<%= submit_tag 'Set Browse Level Exclude to Here', :class=>'submit', :name=>'save_browse_level_exclude_button' %>
|
63
|
+
</div>
|
64
|
+
<% end %>
|
65
|
+
<% end %>
|
66
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% desc, showcase = Atrium::Description.get_description_from_solr_id(document[:id]) %>
|
2
|
+
|
3
|
+
<% if desc && desc.summary && !desc.summary.content.blank? %>
|
4
|
+
<em>Summary</em>
|
5
|
+
<%= desc.summary.content.html_safe %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
|
9
|
+
<% if desc && desc.essay && !desc.essay.content.blank? %>
|
10
|
+
<em>Essay</em>
|
11
|
+
<%= desc.essay.content.html_safe %>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
Related To: <%= link_to showcase.parent_title, showcase.get_parent_path if showcase%>
|
15
|
+
|
@@ -0,0 +1,18 @@
|
|
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
|
+
<%= render 'previous_next_doc' %>
|
6
|
+
|
7
|
+
<%# this should be in a partial -%>
|
8
|
+
<div id="document" class="<%= render_document_class %>">
|
9
|
+
<div id="doc_<%= @document[:id] %>">
|
10
|
+
|
11
|
+
<%= render_document_heading.html_safe %>
|
12
|
+
<div class="tools"><%= render :partial => 'show_tools' %></div>
|
13
|
+
<div class="document">
|
14
|
+
<%= render_document_partial @document, :show %>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
</div>
|
18
|
+
</div>
|
@@ -0,0 +1,35 @@
|
|
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
|
+
<%= render_pagination_info @response, :entry_name=>'item' %>
|
19
|
+
<%=link_to "start over", get_start_over_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
|
+
<% end %>
|
35
|
+
|