sufia 3.7.2 → 4.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/Gemfile +3 -0
- data/README.md +88 -11
- data/SUFIA_VERSION +1 -1
- data/app/assets/images/old_main_tulips.jpg +0 -0
- data/app/assets/javascripts/contact_form.js +0 -16
- data/app/assets/javascripts/jquery.blacklightTagCloud.js +44 -0
- data/app/assets/javascripts/jquery.tagcloud.js +116 -0
- data/app/assets/javascripts/jquery.tinysort.min.js +7 -0
- data/app/assets/javascripts/sufia.js +41 -44
- data/app/assets/javascripts/sufia/edit_metadata.js +1 -1
- data/app/assets/javascripts/sufia/editor.js +12 -0
- data/app/assets/javascripts/sufia/featured_works.js +64 -0
- data/app/assets/javascripts/sufia/fileupload.js +1 -1
- data/app/assets/javascripts/sufia/multiForm.js +1 -1
- data/app/assets/javascripts/sufia/permissions.js +4 -8
- data/app/assets/javascripts/sufia/single_use_link.js +1 -2
- data/app/assets/javascripts/sufia/trophy.js +42 -27
- data/app/assets/javascripts/terms_of_service.js +1 -1
- data/app/assets/stylesheets/dashboard.css.scss +81 -40
- data/app/assets/stylesheets/featured.css.scss +16 -0
- data/app/assets/stylesheets/fileupload/{jquery.fileupload-ui.css → jquery.fileupload-ui.css.erb} +2 -2
- data/app/assets/stylesheets/{generic_files.css → generic_files.css.erb} +6 -7
- data/app/assets/stylesheets/header.css.scss +93 -0
- data/app/assets/stylesheets/home-page.css.scss +50 -0
- data/app/assets/stylesheets/nestable.css.scss +111 -0
- data/app/assets/stylesheets/styles.css.scss +106 -0
- data/app/assets/stylesheets/sufia.css.scss +13 -8
- data/app/assets/stylesheets/tagcloud.css +83 -0
- data/app/assets/stylesheets/usage-stats.css +30 -0
- data/app/controllers/batch_controller.rb +0 -1
- data/app/controllers/concerns/sufia/catalog.rb +64 -0
- data/app/controllers/concerns/sufia/dashboard_controller_behavior.rb +16 -13
- data/app/controllers/content_blocks_controller.rb +8 -0
- data/app/controllers/featured_work_lists_controller.rb +16 -0
- data/app/controllers/featured_works_controller.rb +26 -0
- data/app/controllers/mailbox_controller.rb +1 -1
- data/app/controllers/pages_controller.rb +7 -0
- data/app/controllers/single_use_links_viewer_controller.rb +2 -5
- data/app/controllers/tinymce_assets_controller.rb +12 -0
- data/app/helpers/content_block_helper.rb +21 -0
- data/app/helpers/generic_file_helper.rb +2 -2
- data/app/helpers/sufia_helper.rb +8 -4
- data/app/helpers/trophy_helper.rb +15 -7
- data/app/models/content_block.rb +2 -0
- data/app/models/featured_work_list.rb +42 -0
- data/app/models/tinymce_asset.rb +3 -0
- data/app/uploaders/tinymce_asset_uploader.rb +51 -0
- data/app/views/_add_assets_links.html.erb +0 -16
- data/app/views/_controls.html.erb +17 -0
- data/app/views/_flash_msg.html.erb +2 -18
- data/app/views/_footer.html.erb +10 -15
- data/app/views/_ga.html.erb +0 -16
- data/app/views/_logo.html.erb +2 -2
- data/app/views/_masthead.html.erb +9 -36
- data/app/views/_user_util_links.html.erb +16 -11
- data/app/views/advanced/_advanced_search_facets.html.erb +0 -16
- data/app/views/advanced/_advanced_search_fields.html.erb +0 -16
- data/app/views/advanced/_advanced_search_help.html.erb +0 -16
- data/app/views/advanced/_facet_layout.html.erb +0 -16
- data/app/views/advanced/_facet_limit.html.erb +0 -16
- data/app/views/advanced/index.html.erb +2 -18
- data/app/views/batch/_metadata.html.erb +3 -3
- data/app/views/batch/edit.html.erb +4 -21
- data/app/views/catalog/_facet_limit.html.erb +11 -12
- data/app/views/catalog/_featured_researcher.html.erb +2 -0
- data/app/views/catalog/_home.html.erb +6 -2
- data/app/views/catalog/_home_content.html.erb +36 -0
- data/app/views/catalog/_home_header.html.erb +15 -0
- data/app/views/catalog/_recent_document.html.erb +1 -1
- data/app/views/catalog/_recents.html.erb +3 -4
- data/app/views/catalog/_search_form.html.erb +13 -9
- data/app/views/catalog/_tagcloud.html.erb +7 -0
- data/app/views/catalog/index.html.erb +4 -10
- data/app/views/contact_form/create.html.erb +0 -16
- data/app/views/contact_form/new.html.erb +0 -16
- data/app/views/dashboard/_constraints.html.erb +3 -19
- data/app/views/dashboard/_did_you_mean.html.erb +0 -16
- data/app/views/dashboard/_document_list.html.erb +0 -16
- data/app/views/dashboard/_facet_layout.html.erb +1 -17
- data/app/views/dashboard/_facet_limit.html.erb +5 -5
- data/app/views/dashboard/_facet_selected.html.erb +1 -17
- data/app/views/dashboard/_facets.html.erb +0 -18
- data/app/views/dashboard/_heading.html.erb +1 -1
- data/app/views/dashboard/_index_partials/_default_group.html.erb +7 -23
- data/app/views/dashboard/_index_partials/_list_files.html.erb +62 -57
- data/app/views/dashboard/_search_form.html.erb +10 -7
- data/app/views/dashboard/_show_partials/_default.html.erb +0 -18
- data/app/views/dashboard/_show_partials/_default_details.html.erb +0 -16
- data/app/views/dashboard/_show_partials/_facets.html.erb +0 -16
- data/app/views/dashboard/_sort_and_per_page.html.erb +10 -9
- data/app/views/dashboard/facet.html.erb +4 -19
- data/app/views/dashboard/index.html.erb +27 -49
- data/app/views/error/401.html.erb +1 -17
- data/app/views/error/404.html.erb +0 -16
- data/app/views/error/500.html.erb +0 -16
- data/app/views/error/single_use_error.html.erb +1 -17
- data/app/views/generic_files/_asset_deleted_flash.html.erb +0 -16
- data/app/views/generic_files/_asset_permissions_denial_flash.html.erb +0 -16
- data/app/views/generic_files/_asset_saved_flash.html.erb +0 -16
- data/app/views/generic_files/_asset_updated_flash.html.erb +0 -16
- data/app/views/generic_files/_breadcrumbs.html.erb +0 -16
- data/app/views/generic_files/_browse_everything.html.erb +24 -0
- data/app/views/generic_files/_descriptions.html.erb +1 -1
- data/app/views/generic_files/_field_form.html.erb +5 -5
- data/app/views/generic_files/_media_display.html.erb +3 -3
- data/app/views/generic_files/_permission_form.html.erb +5 -5
- data/app/views/generic_files/_rights_modal.html.erb +13 -29
- data/app/views/generic_files/_show_actions.html.erb +13 -1
- data/app/views/generic_files/_versioning.html.erb +14 -10
- data/app/views/generic_files/citation.html.erb +0 -16
- data/app/views/generic_files/edit.html.erb +10 -12
- data/app/views/generic_files/edit_fields/_default.html.erb +1 -1
- data/app/views/generic_files/edit_fields/_description.html.erb +1 -1
- data/app/views/generic_files/edit_fields/_resource_type.html.erb +2 -3
- data/app/views/generic_files/edit_fields/_rights.html.erb +1 -1
- data/app/views/generic_files/new.html.erb +11 -26
- data/app/views/generic_files/show.html.erb +7 -25
- data/app/views/generic_files/stats.html.erb +141 -0
- data/app/views/homepage/_featured.html.erb +11 -0
- data/app/views/homepage/_featured_fields.html.erb +18 -0
- data/app/views/homepage/_featured_works.html.erb +17 -0
- data/app/views/homepage/_sortable_featured.html.erb +26 -0
- data/app/views/layouts/_head_tag_content.html.erb +1 -1
- data/app/views/layouts/_homepage_sidebar2.html.erb +14 -0
- data/app/views/layouts/error.html.erb +3 -21
- data/app/views/layouts/homepage.html.erb +8 -37
- data/app/views/layouts/sufia-dashboard.html.erb +46 -0
- data/app/views/layouts/sufia-one-column.html.erb +8 -24
- data/app/views/layouts/sufia-two-column.html.erb +9 -8
- data/app/views/pages/show.html.erb +4 -0
- data/app/views/single_use_links_viewer/show.html.erb +2 -2
- data/app/views/static/agreement.html.erb +0 -17
- data/app/views/static/help.html.erb +0 -17
- data/app/views/static/mendeley.html.erb +0 -16
- data/app/views/static/subject_libraries.html.erb +0 -17
- data/app/views/static/terms.html.erb +0 -16
- data/app/views/static/zotero.html.erb +0 -16
- data/app/views/users/_activity_log.html.erb +2 -2
- data/app/views/users/_contributions.html.erb +6 -2
- data/app/views/users/_follower_modal.html.erb +2 -2
- data/app/views/users/_following_modal.html.erb +2 -2
- data/app/views/users/_left_sidebar.html.erb +1 -1
- data/app/views/users/_notify_link.html.erb +1 -1
- data/app/views/users/_notify_number.html.erb +1 -1
- data/app/views/users/_profile_actions.html.erb +3 -3
- data/app/views/users/_profile_tabs.html.erb +1 -1
- data/app/views/users/_search_form.html.erb +3 -2
- data/app/views/users/_social_media_info.html.erb +3 -3
- data/app/views/users/_trophy_edit.html.erb +2 -2
- data/app/views/users/_user_info.html.erb +27 -27
- data/app/views/users/_vitals.html.erb +2 -2
- data/app/views/users/edit.html.erb +39 -39
- data/app/views/users/index.html.erb +3 -3
- data/app/views/users/show.html.erb +7 -9
- data/config/locales/sufia.en.yml +15 -7
- data/config/routes.rb +12 -9
- data/lib/generators/sufia/sufia_generator.rb +18 -15
- data/lib/generators/sufia/templates/catalog_controller.rb +11 -73
- data/lib/generators/sufia/templates/config/tinymce.yml +7 -0
- data/lib/sufia.rb +7 -0
- data/lib/sufia/downloads_controller_behavior.rb +3 -4
- data/lib/sufia/files_controller_behavior.rb +38 -27
- data/lib/sufia/version.rb +1 -1
- data/spec/controllers/batch_controller_spec.rb +1 -1
- data/spec/controllers/batch_edits_controller_spec.rb +5 -5
- data/spec/controllers/catalog_controller_spec.rb +37 -58
- data/spec/controllers/content_blocks_controller_spec.rb +37 -0
- data/spec/controllers/downloads_controller_spec.rb +3 -11
- data/spec/controllers/featured_work_lists_controller_spec.rb +20 -0
- data/spec/controllers/featured_works_controller_spec.rb +50 -0
- data/spec/controllers/generic_files_controller_spec.rb +74 -9
- data/spec/controllers/mailbox_controller_spec.rb +1 -1
- data/spec/controllers/pages_controller_spec.rb +25 -0
- data/spec/controllers/single_use_links_controller_spec.rb +1 -1
- data/spec/controllers/single_use_links_viewer_controller_spec.rb +1 -1
- data/spec/controllers/tinymce_assets_controller_spec.rb +39 -0
- data/spec/controllers/users_controller_spec.rb +3 -8
- data/spec/factories/content_blocks.rb +4 -0
- data/spec/factories/featured_works.rb +4 -0
- data/spec/factories/generic_files.rb +46 -39
- data/spec/factories/users.rb +18 -18
- data/spec/features/browse_dashboard_files_spec.rb +6 -7
- data/spec/features/browse_files_spec.rb +9 -6
- data/spec/features/cloud_upload_spec.rb +18 -0
- data/spec/features/single_use_links_spec.rb +2 -3
- data/spec/helpers/content_block_helper_spec.rb +31 -0
- data/spec/helpers/generic_file_helper_spec.rb +3 -3
- data/spec/helpers/sufia_helper_spec.rb +13 -81
- data/spec/helpers/trophy_helper_spec.rb +39 -0
- data/spec/jobs/import_url_job_spec.rb +1 -1
- data/spec/jobs/ingest_local_file_job_spec.rb +1 -1
- data/spec/lib/sufia/usage_statistics_spec.rb +75 -0
- data/spec/models/ability_spec.rb +31 -0
- data/spec/models/active_fedora_pid_based_job_spec.rb +1 -1
- data/spec/models/audit_job_spec.rb +1 -1
- data/spec/models/batch_spec.rb +1 -1
- data/spec/models/batch_update_job_spec.rb +1 -1
- data/spec/models/event_jobs_spec.rb +1 -1
- data/spec/models/featured_work_list_spec.rb +23 -0
- data/spec/models/featured_work_spec.rb +42 -0
- data/spec/models/fits_datastream_spec.rb +2 -2
- data/spec/models/generic_file/reload_on_save_spec.rb +1 -1
- data/spec/models/generic_file/web_form_spec.rb +4 -4
- data/spec/models/generic_file_spec.rb +41 -40
- data/spec/models/pageview.rb +19 -0
- data/spec/models/properties_datastream_spec.rb +2 -2
- data/spec/models/solr_document_spec.rb +9 -0
- data/spec/models/user_spec.rb +2 -2
- data/spec/routing/featured_works_route_spec.rb +16 -0
- data/spec/routing/route_spec.rb +10 -15
- data/spec/spec_helper.rb +3 -0
- data/spec/support/lib/generators/test_app_generator.rb +19 -8
- data/spec/views/dashboard/facet_limit.html.erb_spec.rb +2 -2
- data/spec/views/generic_file/show.html.erb_spec.rb +44 -0
- data/spec/views/generic_file/stats.html.erb_spec.rb +47 -0
- data/spec/views/users/_follower_modal.html.erb_spec.rb +18 -0
- data/spec/views/users/_following_modal.html.erb_spec.rb +18 -0
- data/spec/views/users/index.html.erb_spec.rb +1 -1
- data/sufia-models/app/models/batch.rb +1 -1
- data/sufia-models/app/models/concerns/sufia/properties_datastream_behavior.rb +30 -0
- data/sufia-models/app/models/concerns/sufia/user.rb +1 -1
- data/sufia-models/app/models/datastreams/batch_rdf_datastream.rb +4 -7
- data/sufia-models/app/models/datastreams/fits_datastream.rb +3 -0
- data/sufia-models/app/models/datastreams/generic_file_rdf_datastream.rb +53 -51
- data/sufia-models/app/models/datastreams/properties_datastream.rb +1 -15
- data/sufia-models/app/models/featured_work.rb +22 -0
- data/sufia-models/app/models/sufia/pageview.rb +9 -0
- data/sufia-models/{lib/sufia/models → app/services/sufia}/id_service.rb +0 -0
- data/sufia-models/{lib/sufia/models → app/services/sufia}/noid.rb +0 -0
- data/sufia-models/app/services/sufia/usage_statistics.rb +73 -0
- data/sufia-models/config/locales/sufia.en.yml +3 -4
- data/sufia-models/lib/generators/sufia/models/install_generator.rb +23 -8
- data/sufia-models/lib/generators/sufia/models/templates/config/analytics.yml +9 -0
- data/sufia-models/lib/generators/sufia/models/templates/config/mime_types.rb +6 -0
- data/sufia-models/lib/generators/sufia/models/templates/config/sufia.rb +11 -2
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_content_blocks.rb +10 -0
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_featured_works.rb +12 -0
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_tinymce_assets.rb +8 -0
- data/sufia-models/lib/generators/sufia/models/usagestats_generator.rb +19 -0
- data/sufia-models/lib/sufia/ability.rb +34 -0
- data/sufia-models/lib/sufia/models/engine.rb +5 -3
- data/sufia-models/lib/sufia/models/generic_file.rb +4 -2
- data/sufia-models/lib/sufia/models/generic_file/export.rb +3 -3
- data/sufia-models/lib/sufia/models/generic_file/featured.rb +14 -0
- data/sufia-models/lib/sufia/models/solr_document_behavior.rb +11 -4
- data/sufia-models/lib/sufia/models/version.rb +1 -1
- data/sufia-models/sufia-models.gemspec +6 -5
- data/sufia.gemspec +6 -4
- data/tasks/release.rake +1 -0
- data/tasks/sufia-dev.rake +5 -1
- data/vendor/assets/javascripts/flot/excanvas.js +1428 -0
- data/vendor/assets/javascripts/flot/jquery.flot.js +3137 -0
- data/vendor/assets/javascripts/flot/jquery.flot.selection.js +360 -0
- data/vendor/assets/javascripts/flot/jquery.flot.time.js +431 -0
- data/vendor/assets/javascripts/nestable.js +647 -0
- data/vendor/assets/javascripts/video.js +135 -126
- data/{app → vendor}/assets/stylesheets/video-js.css.erb +7 -6
- metadata +155 -33
- data/app/assets/stylesheets/application-bootstrap.css.erb +0 -295
- data/app/assets/stylesheets/audio-js.css +0 -3
- data/app/assets/stylesheets/blacklight_more_facets.css +0 -427
- data/app/assets/stylesheets/bootstrap.min.css.erb +0 -1433
- data/app/assets/stylesheets/contact_form.css +0 -4
- data/app/assets/stylesheets/reset_body.css +0 -4
- data/app/assets/stylesheets/trophy.css +0 -7
- data/app/helpers/blacklight/render_constraints_helper_behavior.rb +0 -84
- data/app/helpers/facets_helper.rb +0 -3
- data/app/helpers/sufia/facets_helper_behavior.rb +0 -23
- data/app/views/catalog/_home_text.html.erb +0 -10
- data/app/views/generic_files/_dropbox_import.html.erb +0 -3
- data/app/views/generic_files/upload/_dropbox_chooser.html.erb +0 -39
- data/app/views/static/about.html.erb +0 -21
- data/spec/helpers/render_constraints_helper_behavior_spec.rb +0 -42
@@ -0,0 +1,51 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
class TinymceAssetUploader < CarrierWave::Uploader::Base
|
4
|
+
|
5
|
+
# Include RMagick or MiniMagick support:
|
6
|
+
# include CarrierWave::RMagick
|
7
|
+
# include CarrierWave::MiniMagick
|
8
|
+
|
9
|
+
# Choose what kind of storage to use for this uploader:
|
10
|
+
storage :file
|
11
|
+
# storage :fog
|
12
|
+
|
13
|
+
# Override the directory where uploaded files will be stored.
|
14
|
+
# This is a sensible default for uploaders that are meant to be mounted:
|
15
|
+
def store_dir
|
16
|
+
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
|
17
|
+
end
|
18
|
+
|
19
|
+
# Provide a default URL as a default if there hasn't been a file uploaded:
|
20
|
+
# def default_url
|
21
|
+
# # For Rails 3.1+ asset pipeline compatibility:
|
22
|
+
# # ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
|
23
|
+
#
|
24
|
+
# "/images/fallback/" + [version_name, "default.png"].compact.join('_')
|
25
|
+
# end
|
26
|
+
|
27
|
+
# Process files as they are uploaded:
|
28
|
+
# process :scale => [200, 300]
|
29
|
+
#
|
30
|
+
# def scale(width, height)
|
31
|
+
# # do something
|
32
|
+
# end
|
33
|
+
|
34
|
+
# Create different versions of your uploaded files:
|
35
|
+
# version :thumb do
|
36
|
+
# process :scale => [50, 50]
|
37
|
+
# end
|
38
|
+
|
39
|
+
# Add a white list of extensions which are allowed to be uploaded.
|
40
|
+
# For images you might use something like this:
|
41
|
+
# def extension_white_list
|
42
|
+
# %w(jpg jpeg gif png)
|
43
|
+
# end
|
44
|
+
|
45
|
+
# Override the filename of the uploaded files:
|
46
|
+
# Avoid using model.id or version_name here, see uploader/store.rb for details.
|
47
|
+
# def filename
|
48
|
+
# "something.jpg" if original_filename
|
49
|
+
# end
|
50
|
+
|
51
|
+
end
|
@@ -1,19 +1,3 @@
|
|
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
1
|
<div class="">
|
18
2
|
<%= link_to "Upload", sufia.new_generic_file_path %>
|
19
3
|
</div>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div id="masthead_controls" class="container-fluid">
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-xs-12 col-sm-5 col-md-6">
|
4
|
+
<nav class="navbar navbar-default" role="navigation">
|
5
|
+
<ul class="nav navbar-nav">
|
6
|
+
<li <%= 'class=active' if current_page?(root_path) %>><a href="/" >Home</a></li>
|
7
|
+
<li <%= 'class=active' if current_page?(sufia.about_path) %>><a href="/about/" >About</a></li>
|
8
|
+
<li <%= 'class=active' if action_name == "help" %>><a href="/help/" >Help</a></li>
|
9
|
+
<li <%= 'class=active' if current_page?(sufia.contact_path) %>><a href="<%= sufia.contact_form_index_path %>" >Contact</a></li>
|
10
|
+
</ul><!-- /.nav -->
|
11
|
+
</nav><!-- /.navbar -->
|
12
|
+
</div>
|
13
|
+
<div class="col-xs-12 col-sm-7 col-md-6">
|
14
|
+
<%= render :partial => 'catalog/search_form' %>
|
15
|
+
</div>
|
16
|
+
</div> <!-- /.row -->
|
17
|
+
</div><!-- /#masthead_controls -->
|
@@ -1,19 +1,3 @@
|
|
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
1
|
<%
|
18
2
|
flash_types_to_classes = {
|
19
3
|
:notice => 'alert-success',
|
@@ -23,8 +7,8 @@ flash_types_to_classes = {
|
|
23
7
|
%>
|
24
8
|
<% [:notice, :error, :alert].each do |type| %>
|
25
9
|
<% if flash[type] %>
|
26
|
-
<div class="alert <%= flash_types_to_classes[type] rescue '' %> ui-corner-all <%= type.to_s %>">
|
27
|
-
<a class="close" data-dismiss="alert" href="#"
|
10
|
+
<div class="alert alert-dismissable <%= flash_types_to_classes[type] rescue '' %> ui-corner-all <%= type.to_s %>">
|
11
|
+
<a class="close" data-dismiss="alert" href="#">×</a>
|
28
12
|
<% if flash[type].respond_to? :join %>
|
29
13
|
<%= flash[type].join("<br/>").html_safe %>
|
30
14
|
<% else %>
|
data/app/views/_footer.html.erb
CHANGED
@@ -1,19 +1,14 @@
|
|
1
|
-
<div id="footer
|
2
|
-
<div
|
3
|
-
|
4
|
-
<p class="
|
5
|
-
<p>
|
6
|
-
|
7
|
-
<div class="
|
1
|
+
<div id="footer" class="container-fluid">
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-xs-12 col-sm-5">
|
4
|
+
<p class="pull-left">A service of Project Hydra.</p>
|
5
|
+
<p>v.<%= Sufia::VERSION %></p>
|
6
|
+
</div>
|
7
|
+
<div class="col-xs-12 col-sm-7">
|
8
8
|
<p><strong>Copyright © 2013 Project Hydra</strong> Licensed under the Apache License, Version 2.0</p>
|
9
|
-
<
|
10
|
-
<li><a href="">One</a></li>
|
11
|
-
<li><a href="">Two</a></li>
|
12
|
-
<li><a href="">Three</a></li>
|
13
|
-
<li><a href="">Four</a></li>
|
14
|
-
</ul>
|
9
|
+
<p><%= t('sufia.background_attribution') %></p>
|
15
10
|
</div>
|
16
|
-
<div class="clearfix"></div>
|
17
11
|
</div><!-- /footer -->
|
18
|
-
</div><!--
|
12
|
+
</div><!-- /.row -->
|
13
|
+
</div><!-- /footer -->
|
19
14
|
|
data/app/views/_ga.html.erb
CHANGED
@@ -1,19 +1,3 @@
|
|
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
1
|
<%
|
18
2
|
if Sufia.config.respond_to? :google_analytics_id
|
19
3
|
tracking_id = Sufia.config.google_analytics_id
|
data/app/views/_logo.html.erb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
<a id="logo" href="/"><span class="glyphicon glyphicon-globe"></span></a><a href="/" class="institution_name"><%=t('sufia.product_name') %></a>
|
2
|
+
|
3
3
|
|
@@ -1,38 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
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 id="masthead">
|
18
|
-
<%= render partial: '/logo' %>
|
19
|
-
<div class="navbar">
|
20
|
-
<div class="nav-inner">
|
21
|
-
<div class="container">
|
22
|
-
<ul class="nav pull-right">
|
23
|
-
<li <%= 'class=active' if params[:controller] == "catalog" and action_name == "index" %>><a href="/" class="top_nav">Home</a></li>
|
24
|
-
<li <%= 'class=active' if action_name == "about" %>><a href="/about/" class="top_nav">About</a></li>
|
25
|
-
<li <%= 'class=active' if action_name == "help" %>><a href="/help/" class="top_nav">Help</a></li>
|
26
|
-
<li <%= 'class=active' if params[:controller] == "contact_form" %>><a href="<%= sufia.contact_form_index_path %>" class="top_nav">Contact</a></li>
|
27
|
-
<li>
|
28
|
-
<div class="btn-group">
|
29
|
-
<%= render partial: '/user_util_links' %>
|
30
|
-
</div><!-- /.btn-group -->
|
31
|
-
</li>
|
32
|
-
</ul><!-- /.nav /.pull-right -->
|
33
|
-
</div><!-- /.container -->
|
34
|
-
</div><!-- /.nav-inner -->
|
35
|
-
</div><!-- /.navbar -->
|
36
|
-
<%= render :partial => 'catalog/search_form' %>
|
1
|
+
<div id="masthead" class="container-fluid">
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-xs-6 col-sm-7">
|
4
|
+
<%= render partial: '/logo' %>
|
5
|
+
</div><!-- /.col-xs-5 -->
|
6
|
+
<div class="col-xs-6 col-sm-5">
|
7
|
+
<%= render partial: '/user_util_links' %>
|
8
|
+
</div><!-- /.col-xs-7 -->
|
9
|
+
</div><!-- /.row -->
|
37
10
|
</div> <!-- /masthead -->
|
38
11
|
|
@@ -1,14 +1,19 @@
|
|
1
1
|
<% if user_signed_in? %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<
|
7
|
-
<
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
2
|
+
<div class="btn-group" id="user_utility_links">
|
3
|
+
<%= render :partial => 'users/notify_link' %>
|
4
|
+
<a href="<%= sufia.profile_path(current_user) %>" class="btn btn-default " id="profile_link" title="click for User Profile"><i class="glyphicon glyphicon-user"> </i><%= current_user.name %>
|
5
|
+
</a>
|
6
|
+
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#"><span class="icon-caret-down" title="click for additional menu options"></span></a>
|
7
|
+
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
8
|
+
<li><%= link_to raw('<i class="glyphicon glyphicon-dashboard"></i> my dashboard'), sufia.dashboard_index_path, :id => 'dashboard_nav_link' %></li>
|
9
|
+
<li><%= link_to raw('<i class="glyphicon glyphicon-upload"></i> upload'), sufia.new_generic_file_path, :id => 'upload_nav_link' %></li>
|
10
|
+
<li><%= link_to raw('<i class="glyphicon glyphicon-cog"></i> edit profile'), sufia.edit_profile_path(current_user), :id => 'upload_nav_link' %></li>
|
11
|
+
<li class="divider"></li>
|
12
|
+
<li><%= link_to raw('<i class="glyphicon glyphicon-signout"></i> log out'), destroy_user_session_path, :id => 'logout_nav_link' %></li>
|
13
|
+
</ul>
|
14
|
+
</div><!-- /.btn-group -->
|
12
15
|
<% else %>
|
13
|
-
|
16
|
+
<div class="btn-group login_button pull-right">
|
17
|
+
<%= link_to raw('<span class="glyphicon glyphicon-log-in"></span> Login'), new_user_session_path, :class => "btn btn-default btn-group" %>
|
18
|
+
</div>
|
14
19
|
<% end %>
|
@@ -1,17 +1 @@
|
|
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
1
|
<%= render_facet_partials facet_field_names, :partial => 'facet_limit' %>
|
@@ -1,19 +1,3 @@
|
|
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
1
|
<%- search_fields_for_advanced_search.each do |key, field_def| -%>
|
18
2
|
<div class="control-group">
|
19
3
|
<%= label_tag key, "#{field_def.label }:", :class => 'control-label' %>
|
@@ -1,19 +1,3 @@
|
|
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
1
|
<div>
|
18
2
|
<h2>Search tips</h2>
|
19
3
|
<ul class="advanced_help">
|
@@ -1,19 +1,3 @@
|
|
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
1
|
<div class="facet_item blacklight-<%= facet_field.field.parameterize %>">
|
18
2
|
<h3><%= facet_field.label -%> <span class="adv_facet_selections" style="display:none;"></span></h3>
|
19
3
|
|
@@ -1,19 +1,3 @@
|
|
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
1
|
<ul>
|
18
2
|
<% display_facet.items.each do |item| -%>
|
19
3
|
<li>
|
@@ -1,19 +1,3 @@
|
|
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
1
|
<% @page_title = "More Search Options - #{application_name}" %>
|
18
2
|
<% content_for :local_js do %>
|
19
3
|
$(document).ready(function(){$("form.advanced input:first").focus();});
|
@@ -28,8 +12,8 @@ limitations under the License.
|
|
28
12
|
<div class="well">
|
29
13
|
<ul id="advanced_search_tips">
|
30
14
|
<li><i class="icon-caret-right"></i> Select "match all" to require all fields.</li>
|
31
|
-
<li><i class="icon-caret-right"></i> Select "match any" to find at least one field.</li>
|
32
|
-
<li><i class="icon-caret-right"></i> Combine keywords and attributes to find specific items.</li>
|
15
|
+
<li><i class="icon-caret-right"></i> Select "match any" to find at least one field.</li>
|
16
|
+
<li><i class="icon-caret-right"></i> Combine keywords and attributes to find specific items.</li>
|
33
17
|
<li><i class="icon-caret-right"></i> Use quotation marks to search as a phrase. </li>
|
34
18
|
<li><i class="icon-caret-right"></i> Use "+" before a term to make it required. (Otherwise results matching only some of your terms may be included).</li>
|
35
19
|
<li><i class="icon-caret-right"></i> Use "-" before a word or phrase to exclude. </li>
|
@@ -40,7 +40,7 @@
|
|
40
40
|
<%= f.label :tag, "<span class='error'>*</span> Keyword".html_safe, :class=>"control-label" %>
|
41
41
|
<div class="controls" id="additional_tag_clone">
|
42
42
|
<%= f.text_field :tag, :name=>"generic_file[tag][]", :value=>"", :required=> true %>
|
43
|
-
<button class="adder btn" name="additional_tag" id="additional_tag_submit">+<span class="
|
43
|
+
<button class="adder btn" name="additional_tag" id="additional_tag_submit">+<span class="sr-only">add another Tag</span></button>
|
44
44
|
|
45
45
|
<%= help_icon(:tag) %>
|
46
46
|
</div>
|
@@ -51,7 +51,7 @@
|
|
51
51
|
<%= f.label :creator, "<span class='error'>*</span> Creator".html_safe, :class=>"control-label" %>
|
52
52
|
<div class="controls" id="additional_creator_clone">
|
53
53
|
<%= f.text_field :creator, :name=>"generic_file[creator][]", :value=>"", :required=> true %>
|
54
|
-
<button class="adder btn" name="additional_creator" id="additional_creator_submit">+<span class="
|
54
|
+
<button class="adder btn" name="additional_creator" id="additional_creator_submit">+<span class="sr-only">add another Creator</span></button>
|
55
55
|
|
56
56
|
<%= help_icon(:creator) %>
|
57
57
|
</div>
|
@@ -62,7 +62,7 @@
|
|
62
62
|
<%= f.label :rights, '<span class="error">*</span> Rights'.html_safe, :class=>"control-label" %>
|
63
63
|
<div class="controls" id="additional_rights_clone">
|
64
64
|
<%= f.select "rights", options_for_select(Sufia::Engine::config.cc_licenses, 'http://creativecommons.org/licenses/by-nc-nd/3.0/us/'), :required => true %>
|
65
|
-
<button class="adder btn" name="additional_rights" id="additional_rights_submit">+<span class="
|
65
|
+
<button class="adder btn" name="additional_rights" id="additional_rights_submit">+<span class="sr-only">add another Rights</span></button>
|
66
66
|
|
67
67
|
<%= help_icon(:rights) %>
|
68
68
|
<%= render :partial => "generic_files/rights_modal" %>
|
@@ -1,25 +1,8 @@
|
|
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
1
|
<% content_for :local_js do %>
|
18
2
|
if (navigator.userAgent.match("MSIE")){
|
19
3
|
$("#new_generic_file").validate();
|
20
4
|
}
|
21
5
|
|
22
|
-
|
23
6
|
$('#permissions_display').show();
|
24
7
|
|
25
8
|
// initialize popover helpers
|
@@ -28,18 +11,18 @@ $("a[rel=popover]").popover({ html: true });
|
|
28
11
|
confirmation_needed = true;
|
29
12
|
window.onbeforeunload = confirmExit;
|
30
13
|
function confirmExit(){
|
31
|
-
if(confirmation_needed){
|
14
|
+
if(confirmation_needed){
|
32
15
|
// if you return a string it will be displayed in between "don't navigate away"
|
33
16
|
// and "click Ok to navigate away or cancel to stay put" in the confirm dialog
|
34
17
|
return "Your metadata has not been saved.";
|
35
18
|
}
|
36
|
-
}
|
19
|
+
}
|
37
20
|
<% end %>
|
38
21
|
|
39
22
|
<h1>Apply Metadata</h1>
|
40
23
|
<br />
|
41
|
-
<div class="alert">The information you provide for Title will be applied to the corresponding file only; however all other
|
42
|
-
information you provide will be applied <em>to the entire batch of files</em> you have just deposited into <%= t('sufia.product_name') %>.
|
24
|
+
<div class="alert">The information you provide for Title will be applied to the corresponding file only; however all other
|
25
|
+
information you provide will be applied <em>to the entire batch of files</em> you have just deposited into <%= t('sufia.product_name') %>.
|
43
26
|
You may edit individual files from <%= link_to '<i class="icon-dashboard"></i> my dashboard'.html_safe, sufia.dashboard_index_path %> once
|
44
27
|
this step is finished.
|
45
28
|
</div>
|