curate 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +14 -0
- data/app/controllers/application_controller.rb +69 -0
- data/app/controllers/catalog_controller.rb +336 -0
- data/app/controllers/classify_concerns_controller.rb +29 -0
- data/app/controllers/common_objects_controller.rb +27 -0
- data/app/controllers/curation_concern/base_controller.rb +26 -0
- data/app/controllers/curation_concern/generic_files_controller.rb +82 -0
- data/app/controllers/dashboard_controller.rb +85 -0
- data/app/controllers/downloads_controller.rb +22 -0
- data/app/controllers/errors_controller.rb +19 -0
- data/app/controllers/help_requests_controller.rb +38 -0
- data/app/controllers/terms_of_service_agreements_controller.rb +44 -0
- data/app/controllers/welcome_controller.rb +14 -0
- data/app/helpers/application_helper.rb +89 -0
- data/app/helpers/blacklight_helper.rb +19 -0
- data/app/helpers/common_objects_helper.rb +5 -0
- data/app/inputs/multi_value_input.rb +71 -0
- data/app/models/access_right.rb +53 -0
- data/app/models/classify_concern.rb +30 -0
- data/app/models/contributor_agreement.rb +58 -0
- data/app/models/digital_object_identifier.rb +83 -0
- data/app/models/doi_config.rb +26 -0
- data/app/models/help_request.rb +34 -0
- data/app/models/mint_doi.rb +51 -0
- data/app/models/mint_purl.rb +40 -0
- data/app/models/object_access.rb +17 -0
- data/app/models/purl.rb +18 -0
- data/app/models/purl_config.rb +10 -0
- data/app/models/repo_object.rb +24 -0
- data/app/models/solr_document.rb +35 -0
- data/app/repository_datastreams/file_content_datastream.rb +36 -0
- data/app/repository_models/curation_concern/embargoable.rb +43 -0
- data/app/repository_models/curation_concern/with_access_right.rb +31 -0
- data/app/repository_models/generic_file.rb +36 -0
- data/app/services/anti_virus_scanner.rb +28 -0
- data/app/services/curation_concern.rb +22 -0
- data/app/services/curation_concern/base_actor.rb +48 -0
- data/app/services/curation_concern/generic_file_actor.rb +38 -0
- data/app/validators/future_date_validator.rb +19 -0
- data/app/views/_footer.html.erb +19 -0
- data/app/views/_ga.html.erb +6 -0
- data/app/views/_logo.html.erb +34 -0
- data/app/views/_masthead.html.erb +34 -0
- data/app/views/catalog/_bookmark_control.html.erb +25 -0
- data/app/views/catalog/_bookmark_form.html.erb +8 -0
- data/app/views/catalog/_citation.html.erb +11 -0
- data/app/views/catalog/_constraints.html.erb +6 -0
- data/app/views/catalog/_constraints_element.html.erb +20 -0
- data/app/views/catalog/_delete_partials/_default.html.erb +29 -0
- data/app/views/catalog/_did_you_mean.html.erb +10 -0
- data/app/views/catalog/_document.html.erb +19 -0
- data/app/views/catalog/_document_list.html.erb +2 -0
- data/app/views/catalog/_edit_partials/_default.html.erb +58 -0
- data/app/views/catalog/_edit_partials/_default_details.html.erb +13 -0
- data/app/views/catalog/_email_form.html.erb +11 -0
- data/app/views/catalog/_facet_layout.html.erb +12 -0
- data/app/views/catalog/_facet_limit.html.erb +19 -0
- data/app/views/catalog/_facet_selected.html.erb +12 -0
- data/app/views/catalog/_facets.html.erb +5 -0
- data/app/views/catalog/_folder_control.html.erb +12 -0
- data/app/views/catalog/_home.html.erb +2 -0
- data/app/views/catalog/_home_text.html.erb +10 -0
- data/app/views/catalog/_index_default.html.erb +11 -0
- data/app/views/catalog/_index_partials/_default_group.html.erb +37 -0
- data/app/views/catalog/_marc_view.html.erb +33 -0
- data/app/views/catalog/_opensearch_response_metadata.html.erb +2 -0
- data/app/views/catalog/_previous_next_doc.html.erb +6 -0
- data/app/views/catalog/_refworks_form.html.erb +7 -0
- data/app/views/catalog/_results_pagination.html.erb +6 -0
- data/app/views/catalog/_search_form.html.erb +20 -0
- data/app/views/catalog/_show_default.html.erb +9 -0
- data/app/views/catalog/_show_partials/_default.html.erb +22 -0
- data/app/views/catalog/_show_partials/_default_details.html.erb +15 -0
- data/app/views/catalog/_show_partials/_facets.html.erb +52 -0
- data/app/views/catalog/_show_sidebar.html.erb +1 -0
- data/app/views/catalog/_show_tools.html.erb +46 -0
- data/app/views/catalog/_sms_form.html.erb +21 -0
- data/app/views/catalog/_sort_and_per_page.html.erb +38 -0
- data/app/views/catalog/_uva_tabs.html.erb +10 -0
- data/app/views/catalog/about.html.erb +0 -0
- data/app/views/catalog/citation.html.erb +1 -0
- data/app/views/catalog/email.erb +1 -0
- data/app/views/catalog/endnote.endnote.erb +1 -0
- data/app/views/catalog/index.atom.builder +109 -0
- data/app/views/catalog/index.html.erb +55 -0
- data/app/views/catalog/index.rss.builder +19 -0
- data/app/views/catalog/librarian_view.html.erb +3 -0
- data/app/views/catalog/opensearch.json.erb +0 -0
- data/app/views/catalog/opensearch.xml.builder +10 -0
- data/app/views/catalog/send_email_record.erb +0 -0
- data/app/views/catalog/show.endnote.erb +1 -0
- data/app/views/catalog/show.html.erb +40 -0
- data/app/views/catalog/show.refworks.erb +1 -0
- data/app/views/catalog/sms.erb +1 -0
- data/app/views/classify_concerns/new.html.erb +24 -0
- data/app/views/common_objects/_generic_file.html.erb +0 -0
- data/app/views/common_objects/_senior_thesis.html.erb +2 -0
- data/app/views/common_objects/show.html.erb +11 -0
- data/app/views/common_objects/show_stub_information.html.erb +13 -0
- data/app/views/curation_concern/_content_license.html.erb +16 -0
- data/app/views/curation_concern/_contributor_agreement.html.erb +27 -0
- data/app/views/curation_concern/_doi.html.erb +43 -0
- data/app/views/curation_concern/_media_display.html.erb +1 -0
- data/app/views/curation_concern/_permission.html.erb +39 -0
- data/app/views/curation_concern/_related_files.html.erb +46 -0
- data/app/views/curation_concern/generic_files/_attributes.html.erb +63 -0
- data/app/views/curation_concern/generic_files/_form.html.erb +57 -0
- data/app/views/curation_concern/generic_files/edit.html.erb +5 -0
- data/app/views/curation_concern/generic_files/new.html.erb +5 -0
- data/app/views/curation_concern/generic_files/show.html.erb +12 -0
- data/app/views/curation_concern/senior_theses/_attributes.html.erb +13 -0
- data/app/views/curation_concern/senior_theses/_form.html.erb +88 -0
- data/app/views/curation_concern/senior_theses/edit.html.erb +15 -0
- data/app/views/curation_concern/senior_theses/new.html.erb +14 -0
- data/app/views/curation_concern/senior_theses/show.html.erb +18 -0
- data/app/views/dashboard/_constraints.html.erb +22 -0
- data/app/views/dashboard/_did_you_mean.html.erb +26 -0
- data/app/views/dashboard/_document_list.html.erb +20 -0
- data/app/views/dashboard/_facet_layout.html.erb +27 -0
- data/app/views/dashboard/_facet_limit.html.erb +35 -0
- data/app/views/dashboard/_facet_pagination.html.erb +25 -0
- data/app/views/dashboard/_facet_selected.html.erb +28 -0
- data/app/views/dashboard/_facets.html.erb +22 -0
- data/app/views/dashboard/_index_partials/_default_group.html.erb +37 -0
- data/app/views/dashboard/_index_partials/_list_files.html.erb +66 -0
- data/app/views/dashboard/_index_partials/_thumbnail_display.html.erb +0 -0
- data/app/views/dashboard/_results_pagination.html.erb +22 -0
- data/app/views/dashboard/_search_form.html.erb +36 -0
- data/app/views/dashboard/_show_partials/_default.html.erb +38 -0
- data/app/views/dashboard/_show_partials/_default_details.html.erb +31 -0
- data/app/views/dashboard/_show_partials/_facets.html.erb +103 -0
- data/app/views/dashboard/_sort_and_per_page.html.erb +18 -0
- data/app/views/dashboard/facet.html.erb +38 -0
- data/app/views/dashboard/get_related_file.html.erb +4 -0
- data/app/views/dashboard/index.html.erb +60 -0
- data/app/views/errors/401.html.erb +5 -0
- data/app/views/errors/404.html.erb +16 -0
- data/app/views/errors/500.html.erb +10 -0
- data/app/views/help_requests/new.html.erb +60 -0
- data/app/views/layouts/application.html.erb +14 -0
- data/app/views/layouts/boilerplate.html.erb +28 -0
- data/app/views/layouts/common_objects.html.erb +45 -0
- data/app/views/layouts/curate_nd.html.erb +55 -0
- data/app/views/layouts/curate_nd/1_column.html.erb +22 -0
- data/app/views/layouts/curate_nd/2_column.html.erb +26 -0
- data/app/views/layouts/curate_nd/catalog.html.erb +22 -0
- data/app/views/layouts/curate_nd/dashboard.html.erb +22 -0
- data/app/views/layouts/hydra-head.html.erb +95 -0
- data/app/views/shared/_action_bar.html.erb +30 -0
- data/app/views/shared/_flash_message.html.erb +9 -0
- data/app/views/shared/_site_search.html.erb +18 -0
- data/app/views/terms_of_service_agreements/new.html.erb +136 -0
- data/app/views/welcome/index.html.erb +21 -0
- data/app/workers/characterize_job.rb +4 -0
- data/app/workers/doi_worker.rb +16 -0
- data/config/routes.rb +35 -0
- data/lib/curate.rb +6 -0
- data/lib/curate/engine.rb +46 -0
- data/lib/curate/version.rb +1 -1
- data/spec/abilities/generic_file_abilities_spec.rb +55 -0
- data/spec/controllers/application_controller_spec.rb +38 -0
- data/spec/controllers/classify_concerns_controller_spec.rb +36 -0
- data/spec/controllers/common_objects_controller_spec.rb +112 -0
- data/spec/controllers/curation_concern/base_controller_spec.rb +14 -0
- data/spec/controllers/curation_concern/generic_files_controller_spec.rb +156 -0
- data/spec/controllers/dashboard_controller_spec.rb +85 -0
- data/spec/controllers/downloads_controller_spec.rb +42 -0
- data/spec/controllers/help_requests_controller_spec.rb +42 -0
- data/spec/controllers/terms_of_service_agreements_controller_spec.rb +30 -0
- data/spec/controllers/welcome_controller_spec.rb +10 -0
- data/spec/dummy/app/models/solr_document.rb +4 -0
- data/spec/dummy/app/models/user.rb +13 -0
- data/spec/dummy/config/application.rb +8 -1
- data/spec/dummy/config/database.yml +21 -22
- data/spec/dummy/config/doi.yml +11 -0
- data/spec/dummy/config/fedora.yml +20 -0
- data/spec/dummy/config/initializers/devise.rb +232 -0
- data/spec/dummy/config/initializers/hydra_config.rb +41 -0
- data/spec/dummy/config/initializers/mailboxer.rb +17 -0
- data/spec/dummy/config/initializers/redis_config.rb +45 -0
- data/spec/dummy/config/initializers/sufia.rb +66 -0
- data/spec/dummy/config/purl.yml +15 -0
- data/spec/dummy/config/redis.yml +6 -0
- data/spec/dummy/config/role_map_ci.yml +15 -0
- data/spec/dummy/config/role_map_cucumber.yml +10 -0
- data/spec/dummy/config/role_map_development.yml +12 -0
- data/spec/dummy/config/role_map_pre_production.yml +2 -0
- data/spec/dummy/config/role_map_production.yml +2 -0
- data/spec/dummy/config/role_map_test.yml +15 -0
- data/spec/dummy/config/routes.rb +4 -55
- data/spec/dummy/config/solr.yml +17 -0
- data/spec/dummy/db/migrate/20130130142162_create_purl.rb +55 -0
- data/spec/dummy/db/migrate/20130312135359_create_help_requests.rb +22 -0
- data/spec/dummy/db/migrate/20130408165008_create_users.rb +11 -0
- data/spec/dummy/db/migrate/20130408165009_acts_as_follower_migration.rb +31 -0
- data/spec/dummy/db/migrate/20130408165010_add_social_to_users.rb +27 -0
- data/spec/dummy/db/migrate/20130408165011_create_single_use_links.rb +12 -0
- data/spec/dummy/db/migrate/20130408165012_add_ldap_attrs_to_user.rb +41 -0
- data/spec/dummy/db/migrate/20130408165013_add_avatars_to_users.rb +23 -0
- data/spec/dummy/db/migrate/20130408165014_create_checksum_audit_logs.rb +34 -0
- data/spec/dummy/db/migrate/20130408165015_create_version_committers.rb +29 -0
- data/spec/dummy/db/migrate/20130408165016_add_groups_to_users.rb +25 -0
- data/spec/dummy/db/migrate/20130408165017_create_local_authorities.rb +64 -0
- data/spec/dummy/db/migrate/20130408165018_create_trophies.rb +10 -0
- data/spec/dummy/db/migrate/20130408165022_create_mailboxer.mailboxer_engine.rb +62 -0
- data/spec/dummy/db/migrate/20130408165023_add_notified_object.mailboxer_engine.rb +18 -0
- data/spec/dummy/db/migrate/20130408165024_add_notification_code.mailboxer_engine.rb +14 -0
- data/spec/dummy/db/migrate/20130408165025_add_attachments.mailboxer_engine.rb +10 -0
- data/spec/dummy/db/migrate/20130408165026_rename_receipts_read.mailboxer_engine.rb +10 -0
- data/spec/dummy/db/schema.rb +197 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/fedora_conf/conf/development/fedora.fcfg +953 -0
- data/spec/dummy/fedora_conf/conf/test/fedora.fcfg +953 -0
- data/spec/dummy/log/development.log +1791 -0
- data/spec/dummy/log/test.log +176333 -0
- data/spec/dummy/solr_conf/conf/schema.xml +692 -0
- data/spec/dummy/solr_conf/conf/solrconfig.xml +299 -0
- data/spec/dummy/solr_conf/solr.xml +35 -0
- data/spec/factories/create_curation_concern.rb +11 -0
- data/spec/factories/create_generic_file.rb +36 -0
- data/spec/factories/help_requests.rb +10 -0
- data/spec/factories/mock_curation_concerns.rb +4 -0
- data/spec/factories/users.rb +8 -0
- data/spec/helpers/application_helper_spec.rb +139 -0
- data/spec/helpers/common_objects_helper_spec.rb +9 -0
- data/spec/models/access_right_spec.rb +47 -0
- data/spec/models/classify_concern_spec.rb +30 -0
- data/spec/models/contributor_agreement_spec.rb +45 -0
- data/spec/models/digital_object_identifier_spec.rb +50 -0
- data/spec/models/help_request_spec.rb +5 -0
- data/spec/models/mint_doi_spec.rb +79 -0
- data/spec/models/mint_purl_spec.rb +38 -0
- data/spec/models/object_access_spec.rb +24 -0
- data/spec/models/purl_spec.rb +22 -0
- data/spec/models/repo_object_spec.rb +39 -0
- data/spec/repository_models/curation_concern/embargoable_spec.rb +69 -0
- data/spec/repository_models/generic_file_spec.rb +38 -0
- data/spec/services/anti_virus_scanner_spec.rb +26 -0
- data/spec/services/curation_concern/base_actor_spec.rb +28 -0
- data/spec/services/curation_concern/generic_file_actor_spec.rb +75 -0
- data/spec/services/curation_concern_spec.rb +34 -0
- data/spec/spec_helper.rb +54 -1
- data/spec/support/environment_override.rb +17 -0
- data/spec/support/matchers/raise_rescue_response_type_matcher.rb +42 -0
- data/spec/support/mock_curation_concern.rb +61 -0
- data/spec/support/shared/shared_examples_is_embargoable.rb +9 -0
- data/spec/support/shared/shared_examples_with_access_rights.rb +33 -0
- data/spec/workers/characterize_job_spec.rb +26 -0
- metadata +686 -10
- data/MIT-LICENSE +0 -20
File without changes
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<%#
|
2
|
+
Copyright © 2012 The Pennsylvania State University
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
%>
|
16
|
+
|
17
|
+
<% if paginate_params(@response).num_pages > 1 %>
|
18
|
+
<div class="pager">
|
19
|
+
<%= paginate_rsolr_response @response, :outer_window => 2, :theme => 'blacklight' %>
|
20
|
+
<div class="clearfix"></div>
|
21
|
+
</div><!-- /pager -->
|
22
|
+
<% end %>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<%#
|
2
|
+
Copyright © 2012 The Pennsylvania State University
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
%>
|
16
|
+
|
17
|
+
<%= form_tag dashboard_index_path, :method => :get, :class => "search-form" do %>
|
18
|
+
<fieldset>
|
19
|
+
<legend class="accessible-hidden">Search My Dashboard</legend>
|
20
|
+
<%= label_tag :dashboard_search, 'Search keywords', :class => "accessible-hidden" %>
|
21
|
+
<%= hidden_field_tag :search_field, 'all_fields' %>
|
22
|
+
<%= search_as_hidden_fields(:omit_keys => [:q, :search_field, :qt, :page]).html_safe %>
|
23
|
+
<%= text_field_tag(
|
24
|
+
:q,
|
25
|
+
params[:q],
|
26
|
+
:class => "q search-query",
|
27
|
+
:placeholder => "Search My Dashboard",
|
28
|
+
:size => "30",
|
29
|
+
:type => "search",
|
30
|
+
:id => "dashboard_search",
|
31
|
+
:tabindex => "1"
|
32
|
+
)%><button type="submit" class="search-submit btn btn-primary" id="dashboard_submit" tabindex="2">
|
33
|
+
<i class="icon-search icon-white"></i> Go
|
34
|
+
</button>
|
35
|
+
</fieldset>
|
36
|
+
<% end %>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<%#
|
2
|
+
Copyright © 2012 The Pennsylvania State University
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
%>
|
16
|
+
|
17
|
+
<%# default partial to display solr document fields in catalog show view -%>
|
18
|
+
|
19
|
+
|
20
|
+
<div class="document_viewer" id="cover_container">
|
21
|
+
<dl class="defList">
|
22
|
+
<dt>ID: </dt>
|
23
|
+
<dd><%= render_document_show_field_value(:document=>document, :field=>"id") %></dd>
|
24
|
+
<dt>Download:</dt>
|
25
|
+
<dd id="downloads">
|
26
|
+
<ul>
|
27
|
+
<% %>
|
28
|
+
</ul>
|
29
|
+
</dd>
|
30
|
+
<dt>Copyright: </dt>
|
31
|
+
<dd><%= render_document_show_field_value(:document=>document, :field=>"rights_t") %></dd>
|
32
|
+
</dl>
|
33
|
+
</div>
|
34
|
+
<div class="<%= params[:action]%>_details">
|
35
|
+
<%= render "#{params[:controller]}/_#{params[:action]}_partials/default_details", locals: {document: document}%>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<%= async_load_tag(hydra_asset_downloads_path(params[:id]), 'downloads') %>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<%#
|
2
|
+
Copyright © 2012 The Pennsylvania State University
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
%>
|
16
|
+
|
17
|
+
<%# default partial to display solr document fields in catalog show view -%>
|
18
|
+
<div>
|
19
|
+
<dl class="defList">
|
20
|
+
<dt>Date: </dt>
|
21
|
+
<dd><%= render_document_show_field_value(:document=>document, :field=>"date_t") %></dd>
|
22
|
+
<dt>Title: </dt>
|
23
|
+
<dd><%= render_document_show_field_value(:document=>document, :field=>"title_t") %></dd>
|
24
|
+
<dt>Document Type: </dt>
|
25
|
+
<dd><%= render_document_show_field_value(:document=>document, :field=>"medium_t") %></dd>
|
26
|
+
<dt>Location: </dt>
|
27
|
+
<dd><%= render_document_show_field_value(:document=>document, :field=>"location_t") %></dd>
|
28
|
+
<dt>Date: </dt>
|
29
|
+
<dd><%= render_document_show_field_value(:document=>document, :field=>"date_t") %></dd>
|
30
|
+
</dl>
|
31
|
+
</div>
|
@@ -0,0 +1,103 @@
|
|
1
|
+
<%#
|
2
|
+
Copyright © 2012 The Pennsylvania State University
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
%>
|
16
|
+
|
17
|
+
<% facets_display_heading ||= "" %>
|
18
|
+
<% # main container for facets/limits menu -%>
|
19
|
+
<div id="facets">
|
20
|
+
<h2><%=h facets_display_heading %></h2>
|
21
|
+
<% facet_field_names.each do |solr_fname| %>
|
22
|
+
<div>
|
23
|
+
<% display_facet = @response.facets.detect {|f| f.name == solr_fname} -%>
|
24
|
+
<%#- raise solr_fname.inspect unless display_facet -%>
|
25
|
+
<% if display_facet && display_facet.items.length > 0 %>
|
26
|
+
<h3 class="facet_selected"><%= facet_field_labels[solr_fname] -%></h3>
|
27
|
+
<ul>
|
28
|
+
<% item_counter = 0 %>
|
29
|
+
<% display_facet.items.each do |item| -%>
|
30
|
+
<% if item.hits > 0 %>
|
31
|
+
<% facet_count_for_value = facet_value_hits(@facet_lookup, solr_fname, item.value) %>
|
32
|
+
<% if facet_in_params? solr_fname, item.value %>
|
33
|
+
<li>
|
34
|
+
<span class="selected"><%= h(item.value) %> (<%= format_num facet_count_for_value %>)</span>
|
35
|
+
<% link_options = remove_facet_params(solr_fname, item.value, params).merge!Hash["controller" => "catalog", :action=> "index"] %>
|
36
|
+
[<%= link_to 'remove', url_for(link_options), :class=>'remove' %>]
|
37
|
+
</li>
|
38
|
+
<% else %>
|
39
|
+
<%- if item_counter > Blacklight.config[:facet_more_num]-1 -%>
|
40
|
+
<li class="more">
|
41
|
+
<%- else -%>
|
42
|
+
<li>
|
43
|
+
<%- end -%>
|
44
|
+
<h3 class="facet_selected"><%= facet_field_labels[solr_fname] -%></h3>
|
45
|
+
<ul>
|
46
|
+
<% item_counter = 0 %>
|
47
|
+
<% display_facet.items.each do |item| -%>
|
48
|
+
<% if item.hits > 0 %>
|
49
|
+
<% facet_count_for_value = facet_value_hits(@facet_lookup, solr_fname, item.value) %>
|
50
|
+
<% if facet_in_params? solr_fname, item.value %>
|
51
|
+
<li>
|
52
|
+
<span class="selected"><%= h(item.value) %> (<%= format_num facet_count_for_value %>)</span>
|
53
|
+
<% link_options = remove_facet_params(solr_fname, item.value, params).merge!Hash["controller" =>"catalog", :action=> "index"] %>
|
54
|
+
[<%= link_to 'remove', url_for(link_options), :class=>'remove' %>]
|
55
|
+
</li>
|
56
|
+
<% else %>
|
57
|
+
<%- if item_counter > Blacklight.config[:facet_more_num]-1 -%>
|
58
|
+
<li class="more">
|
59
|
+
<%- else -%>
|
60
|
+
<li>
|
61
|
+
<%- end -%>
|
62
|
+
<% link_options = add_facet_params(solr_fname, item.value).merge!Hash["controller" =>"catalog", :action=> "index"] %>
|
63
|
+
<%= link_to h(item.value), url_for(link_options) %> (<%= format_num facet_count_for_value %>)
|
64
|
+
</li>
|
65
|
+
<% end -%>
|
66
|
+
<% end -%>
|
67
|
+
<% item_counter += 1 %>
|
68
|
+
<% end %>
|
69
|
+
<%= display_facet.items.length >
|
70
|
+
Blacklight.config[:facet_more_num] ? "<li class='more_li'><a href=''
|
71
|
+
class='more_link'
|
72
|
+
title='more
|
73
|
+
#{pluralize(2,
|
74
|
+
facet_field_labels[solr_fname])[2..-1].downcase}'>more<span class='off_screen'>
|
75
|
+
#{pluralize(2,
|
76
|
+
facet_field_labels[solr_fname])[2..-1].downcase}</span></a></li>"
|
77
|
+
: "" %>
|
78
|
+
<%= display_facet.items.length >
|
79
|
+
Blacklight.config[:facet_more_num] ? "<li class='less_li'
|
80
|
+
style='display:none;'><a href=''
|
81
|
+
class='more_link'
|
82
|
+
title='less
|
83
|
+
#{pluralize(2,
|
84
|
+
facet_field_labels[solr_fname])[2..-1].downcase}'>less<span class='off_screen'>
|
85
|
+
#{pluralize(2,
|
86
|
+
facet_field_labels[solr_fname])[2..-1].downcase}</span></a></li>"
|
87
|
+
: "" %>
|
88
|
+
</ul>
|
89
|
+
<% end %>
|
90
|
+
</div>
|
91
|
+
<% end %>
|
92
|
+
</div>
|
93
|
+
<script type="text/javascript">
|
94
|
+
$(".more").toggle();
|
95
|
+
$('.more_link').each(function(){
|
96
|
+
$(this).click(function(){
|
97
|
+
$(this).parent().parent().children("li.more").toggle();
|
98
|
+
$(this).parent().parent().children("li.more_li").toggle();
|
99
|
+
$(this).parent().parent().children("li.less_li").toggle();
|
100
|
+
return false;
|
101
|
+
});
|
102
|
+
});
|
103
|
+
</script>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<%#
|
2
|
+
Copyright © 2012 The Pennsylvania State University
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
%>
|
16
|
+
|
17
|
+
<div class="batch-info">
|
18
|
+
</div>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<!-- This was copied from https://github.com/projectblacklight/blacklight/blob/master/app/views/catalog/facet.html.erb
|
2
|
+
It implements the facets in the same manner as blacklight does for the main catalog for the individual's dashbord
|
3
|
+
-->
|
4
|
+
<% content_for :sidebar do %>
|
5
|
+
<p><%= link_back_to_catalog %></p>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<div class="facet_pagination top">
|
9
|
+
<%= render :partial=>'facet_pagination' %>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div class="modal-header">
|
13
|
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
14
|
+
<h3><%= facet_field_labels[params[:id]] %></h3>
|
15
|
+
</div>
|
16
|
+
<div class="modal-body">
|
17
|
+
<div class="facet_extended_list">
|
18
|
+
|
19
|
+
<ul class="facet_extended_list">
|
20
|
+
<% @pagination.items.each do |item| %>
|
21
|
+
<li>
|
22
|
+
<% if facet_in_params?( params[:id], item.value ) %>
|
23
|
+
<%= render_selected_facet_value(params[:id], item) %>
|
24
|
+
<% else %>
|
25
|
+
<%= render_facet_value(params[:id], item) %>
|
26
|
+
<% end -%>
|
27
|
+
</li>
|
28
|
+
<% end %>
|
29
|
+
</ul>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<div class="modal-footer">
|
34
|
+
|
35
|
+
<div class="facet_pagination bottom">
|
36
|
+
<%= render :partial=>'facet_pagination' %>
|
37
|
+
</div>
|
38
|
+
</div>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
<%#
|
2
|
+
Copyright © 2012 The Pennsylvania State University
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
%>
|
16
|
+
|
17
|
+
<% content_for :page_title, "#{application_name} Dashboard" %>
|
18
|
+
|
19
|
+
<% content_for :page_header do %>
|
20
|
+
|
21
|
+
<div class="row">
|
22
|
+
|
23
|
+
<div class="span8">
|
24
|
+
<h2>My Dashboard</h2>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<div class="span4 page-search">
|
28
|
+
<%= render 'search_form' %>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
<% content_for :sidebar do %>
|
36
|
+
|
37
|
+
<%= render 'facets' %>
|
38
|
+
|
39
|
+
<% end %>
|
40
|
+
|
41
|
+
<% extra_head_content << render_opensearch_response_metadata.html_safe %>
|
42
|
+
|
43
|
+
<% if params.has_key?("q") %>
|
44
|
+
<div class="alert alert-info">
|
45
|
+
<i class="icon-search icon-large"></i> You searched for: <strong><%= params[:q] %></strong>
|
46
|
+
</div>
|
47
|
+
<% end %>
|
48
|
+
|
49
|
+
<%= render 'did_you_mean' %>
|
50
|
+
<%= render 'facet_selected' %>
|
51
|
+
|
52
|
+
<%= render 'constraints', :localized_params=>params %>
|
53
|
+
|
54
|
+
<% render_pagination_info @response, :entry_name=>'item' %>
|
55
|
+
|
56
|
+
<%= render 'sort_and_per_page' %>
|
57
|
+
|
58
|
+
<%= render 'dashboard/document_list' %>
|
59
|
+
|
60
|
+
<%= render 'results_pagination' %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<% content_for :page_title, construct_page_title("#{response.status} #{action_name.humanize}") %>
|
2
|
+
<% content_for :page_header do %>
|
3
|
+
<h1>Page Not Found</h1>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<p>
|
7
|
+
The page you are looking for may have been removed, had its name changed, or is temporarily unavailable.
|
8
|
+
</p>
|
9
|
+
|
10
|
+
<h2>Please try the following:</h2>
|
11
|
+
<ul>
|
12
|
+
<li>If you typed the page address in the Address bar, make sure that it is spelled correctly. </li>
|
13
|
+
<li>Go to the <a href="/">homepage</a>, and then look for links to the information you want.</li>
|
14
|
+
<li>Click the Back button on your browser to try another link. </li>
|
15
|
+
<li>If you reached this page using a bookmark, the page you're looking for may have moved.</li>
|
16
|
+
</ul>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<% content_for :page_title, construct_page_title("#{response.status} Internal Server Error") %>
|
2
|
+
<% content_for :page_header do %>
|
3
|
+
<h1>Internal Server Error</h1>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<p>
|
7
|
+
CurateND has encountered a problem.
|
8
|
+
We have been notified of the problem and will be looking into it.
|
9
|
+
It is possible that the error was temporary so feel free to try again in a bit.
|
10
|
+
</p>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
<%= simple_form_for(help_request) do |f| %>
|
2
|
+
<fieldset class="with-side-padding">
|
3
|
+
<legend>What’s Going On?</legend>
|
4
|
+
<dl class="stacked">
|
5
|
+
<dt>Your Username</dt>
|
6
|
+
<dd id="help-username">
|
7
|
+
<%= current_user.user_key %>
|
8
|
+
</dd>
|
9
|
+
<dt>Screen Size</dt>
|
10
|
+
<dd id="help-resolution">
|
11
|
+
<%= help_request.resolution || 'Unknown' %>
|
12
|
+
</dd>
|
13
|
+
<dt>Browser Size</dt>
|
14
|
+
<dd id="help-viewport">
|
15
|
+
<%= help_request.view_port || 'Unknown' %>
|
16
|
+
</dd>
|
17
|
+
<dt>JavaScript</dt>
|
18
|
+
<dd id="help-js">
|
19
|
+
<% if help_request.javascript_enabled %>
|
20
|
+
is enabled
|
21
|
+
<% else %>
|
22
|
+
is <strong>NOT</strong> enabled
|
23
|
+
<% end %>
|
24
|
+
</dd>
|
25
|
+
<dt>Browser</dt>
|
26
|
+
<dd id="help-browser">
|
27
|
+
<%= help_request.browser_name %>
|
28
|
+
</dd>
|
29
|
+
<dt>Platform</dt>
|
30
|
+
<dd id="help-platfrom">
|
31
|
+
<%= help_request.platform %>
|
32
|
+
</dd>
|
33
|
+
<dt>CurateND Version</dt>
|
34
|
+
<dd id="help-platfrom">
|
35
|
+
<%= Rails.configuration.build_identifier %>
|
36
|
+
</dd>
|
37
|
+
<dt>Current URL</dt>
|
38
|
+
<dd id="help-url"<%= ' class="unset"'.html_safe if help_request.current_url? %>>
|
39
|
+
<%= help_request.current_url %>
|
40
|
+
</dd>
|
41
|
+
</dl>
|
42
|
+
</fieldset>
|
43
|
+
|
44
|
+
<fieldset class="required with-side-padding">
|
45
|
+
<legend>Describe Your Issue</legend>
|
46
|
+
<%= f.input :view_port, as: 'hidden' %>
|
47
|
+
<%= f.input :resolution, as: 'hidden' %>
|
48
|
+
<% if help_request.current_url.blank? %>
|
49
|
+
<%= f.input :current_url, as: 'hidden', input_html: { class: 'unset' } %>
|
50
|
+
<% else -%>
|
51
|
+
<%= f.input :current_url, as: 'hidden' %>
|
52
|
+
<% end -%>
|
53
|
+
<%= f.input :javascript_enabled, as: 'hidden' %>
|
54
|
+
<%= f.input :how_can_we_help_you, as: 'text', input_html: { class: 'input-xxxlarge', rows: '10' } %>
|
55
|
+
</fieldset>
|
56
|
+
|
57
|
+
<div class="form-actions">
|
58
|
+
<%= f.submit "Let Us Know", class: 'btn btn-primary' %> <a href="#" id="never-mind" class="btn btn-link" data-dismiss="modal">or never mind</a>
|
59
|
+
</div>
|
60
|
+
<% end %>
|