sufia 4.0.0.rc1 → 4.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.travis.yml +2 -2
- data/Gemfile +9 -17
- data/README.md +18 -9
- data/Rakefile +10 -5
- data/SUFIA_VERSION +1 -1
- data/app/assets/javascripts/jquery.blacklightTagCloud.js +1 -1
- data/app/assets/javascripts/sufia.js +5 -22
- data/app/assets/javascripts/sufia/batch.js +8 -0
- data/app/assets/javascripts/sufia/batch_edit.js +19 -3
- data/app/assets/javascripts/sufia/dashboard_actions.js +23 -10
- data/app/assets/javascripts/sufia/multiForm.js +2 -2
- data/app/assets/javascripts/sufia/permissions.js +10 -9
- data/app/assets/javascripts/sufia/tabs.js +20 -0
- data/app/assets/stylesheets/catalog.css.scss +5 -0
- data/app/assets/stylesheets/collections.css.scss +40 -0
- data/app/assets/stylesheets/file-listing.css.scss +37 -13
- data/app/assets/stylesheets/generic_files.css.erb +5 -0
- data/app/assets/stylesheets/header.css.scss +1 -4
- data/app/assets/stylesheets/settings.css.scss +6 -0
- data/app/assets/stylesheets/styles.css.scss +4 -3
- data/app/assets/stylesheets/sufia-audio-overrides.css +2 -2
- data/app/assets/stylesheets/sufia.css.scss +27 -5
- data/app/assets/stylesheets/tagcloud.css +5 -1
- data/app/controllers/batch_controller.rb +3 -3
- data/app/controllers/concerns/sufia/batch_edits_controller_behavior.rb +14 -1
- data/app/controllers/concerns/sufia/catalog.rb +0 -1
- data/app/controllers/concerns/sufia/controller.rb +5 -0
- data/app/controllers/concerns/sufia/dashboard_controller_behavior.rb +2 -9
- data/app/controllers/concerns/sufia/files_controller/browse_everything.rb +3 -3
- data/app/controllers/concerns/sufia/files_controller_behavior.rb +5 -1
- data/app/controllers/concerns/sufia/homepage_controller.rb +1 -1
- data/app/controllers/concerns/sufia/users_controller_behavior.rb +3 -2
- data/app/helpers/batch_edits_helper.rb +6 -0
- data/app/helpers/generic_file_helper.rb +15 -0
- data/app/helpers/sufia/blacklight_override.rb +19 -3
- data/app/helpers/sufia/dashboard_helper_behavior.rb +25 -3
- data/app/helpers/sufia/records_helper_behavior.rb +13 -5
- data/app/helpers/sufia/sufia_helper_behavior.rb +15 -12
- data/app/models/concerns/sufia/solr_document_behavior.rb +5 -36
- data/app/views/_masthead.html.erb +1 -1
- data/app/views/_user_util_links.html.erb +6 -4
- data/app/views/advanced/_advanced_search_fields.html.erb +4 -4
- data/app/views/advanced/_advanced_search_form.html.erb +14 -17
- data/app/views/advanced/index.html.erb +3 -3
- data/app/views/batch/_metadata.html.erb +22 -24
- data/app/views/batch/_more_metadata.html.erb +1 -1
- data/app/views/batch/edit.html.erb +2 -2
- data/app/views/batch_edits/_check_all.html.erb +7 -9
- data/app/views/batch_edits/_delete_selected.html.erb +1 -0
- data/app/views/batch_edits/edit.html.erb +25 -26
- data/app/views/batch_edits/update_edit.js.erb +1 -1
- data/app/views/catalog/_facet_limit.html.erb +4 -12
- data/app/views/catalog/_search_form.html.erb +8 -13
- data/app/views/collections/_action_menu.html.erb +2 -2
- data/app/views/collections/_collection.html.erb +10 -31
- data/app/views/collections/_document_list.html.erb +1 -1
- data/app/views/collections/_edit_actions.html.erb +2 -2
- data/app/views/collections/_edit_descriptions.html.erb +3 -5
- data/app/views/collections/_form.html.erb +8 -10
- data/app/views/collections/_media_display.html.erb +1 -1
- data/app/views/collections/_show_actions.html.erb +5 -5
- data/app/views/collections/_show_descriptions.html.erb +13 -8
- data/app/views/collections/_show_document_list.html.erb +17 -0
- data/app/views/collections/_show_document_list_menu.html.erb +24 -0
- data/app/views/collections/_show_document_list_row.html.erb +63 -0
- data/app/views/collections/edit.html.erb +2 -2
- data/app/views/collections/show.html.erb +28 -19
- data/app/views/contact_form/new.html.erb +21 -29
- data/app/views/dashboard/_index_partials/_contents.html.erb +14 -0
- data/app/views/dashboard/_index_partials/_heading_actions.html.erb +18 -0
- data/app/views/dashboard/_index_partials/_heading_greetings.html.erb +8 -0
- data/app/views/dashboard/_index_partials/_stats.html.erb +6 -2
- data/app/views/dashboard/index.html.erb +5 -37
- data/app/views/generic_files/_breadcrumbs.html.erb +2 -0
- data/app/views/generic_files/_browse_everything.html.erb +2 -2
- data/app/views/generic_files/_descriptions.html.erb +4 -6
- data/app/views/generic_files/_field_form.html.erb +2 -2
- data/app/views/generic_files/_generic_file.html.erb +8 -29
- data/app/views/generic_files/_groups_description.html.erb +5 -4
- data/app/views/generic_files/_permission.html.erb +2 -2
- data/app/views/generic_files/_permission_form.html.erb +62 -77
- data/app/views/generic_files/_rights_modal.html.erb +0 -2
- data/app/views/generic_files/_share_with.html.erb +14 -0
- data/app/views/generic_files/_show_actions.html.erb +1 -1
- data/app/views/generic_files/_show_collections.html.erb +17 -0
- data/app/views/generic_files/_show_descriptions.html.erb +2 -2
- data/app/views/generic_files/_versioning.html.erb +2 -2
- data/app/views/generic_files/_visibility.html.erb +17 -0
- data/app/views/generic_files/show.html.erb +39 -2
- data/app/views/generic_files/stats.html.erb +1 -1
- data/app/views/generic_files/upload/_form_fields.html.erb +2 -2
- data/app/views/generic_files/upload/_local_file_import_chooser.html.erb +1 -1
- data/app/views/generic_files/upload/_script_templates.html.erb +2 -2
- data/app/views/generic_files/upload/_tos_checkbox.html.erb +3 -3
- data/app/views/homepage/_home_content.html.erb +0 -9
- data/app/views/homepage/_home_header.html.erb +1 -1
- data/app/views/homepage/_recent_document.html.erb +2 -2
- data/app/views/layouts/_head_tag_content.html.erb +7 -1
- data/app/views/layouts/sufia-dashboard.html.erb +4 -2
- data/app/views/layouts/sufia-one-column.html.erb +1 -1
- data/app/views/my/_action_menu.html.erb +1 -1
- data/app/views/my/_collection_action_menu.html.erb +3 -3
- data/app/views/my/_constraints.html.erb +11 -0
- data/app/views/my/_document_list.html.erb +1 -1
- data/app/views/my/_facet_limit.html.erb +4 -12
- data/app/views/my/_facets.html.erb +1 -3
- data/app/views/my/_index_partials/_default_group.html.erb +2 -3
- data/app/views/my/_index_partials/_list_collections.html.erb +17 -11
- data/app/views/my/_index_partials/_list_files.html.erb +20 -24
- data/app/views/my/_search_header.html.erb +5 -0
- data/app/views/my/_sort_and_per_page.html.erb +11 -7
- data/app/views/my/index.html.erb +9 -15
- data/app/views/records/_edit_field.html.erb +14 -10
- data/app/views/records/edit_fields/_default.html.erb +6 -0
- data/app/views/records/edit_fields/_description.html.erb +3 -7
- data/app/views/records/edit_fields/_resource_type.html.erb +4 -6
- data/app/views/records/edit_fields/_rights.html.erb +4 -5
- data/app/views/records/edit_fields/_suffix.html.erb +6 -3
- data/app/views/records/edit_fields/_type.html.erb +7 -12
- data/app/views/{generic_files → records}/show_fields/_based_near.html.erb +1 -1
- data/app/views/{generic_files → records}/show_fields/_contributor.html.erb +2 -2
- data/app/views/records/show_fields/_creator.html.erb +6 -0
- data/app/views/{generic_files → records}/show_fields/_date_created.html.erb +1 -1
- data/app/views/records/show_fields/_default.html.erb +6 -0
- data/app/views/records/show_fields/_description.html.erb +6 -0
- data/app/views/records/show_fields/_identifier.html.erb +4 -0
- data/app/views/{generic_files → records}/show_fields/_language.html.erb +1 -1
- data/app/views/{generic_files → records}/show_fields/_publisher.html.erb +1 -1
- data/app/views/records/show_fields/_related_url.html.erb +6 -0
- data/app/views/{generic_files → records}/show_fields/_resource_type.html.erb +1 -1
- data/app/views/{generic_files → records}/show_fields/_rights.html.erb +1 -1
- data/app/views/{generic_files → records}/show_fields/_subject.html.erb +1 -1
- data/app/views/{generic_files → records}/show_fields/_tag.html.erb +1 -1
- data/app/views/records/show_fields/_title.html.erb +6 -0
- data/app/views/shared/_attributes.html.erb +27 -0
- data/app/views/static/agreement.html.erb +1 -1
- data/app/views/users/_activity_log.html.erb +0 -2
- data/app/views/users/_follower_modal.html.erb +27 -23
- data/app/views/users/_following_modal.html.erb +27 -23
- data/app/views/users/_social_media_info.html.erb +4 -4
- data/app/views/users/_trophy_edit.html.erb +5 -7
- data/app/views/users/_user_info.html.erb +3 -3
- data/app/views/users/_user_util_links_extra.html.erb +4 -0
- data/app/views/users/edit.html.erb +28 -33
- data/app/views/users/index.html.erb +1 -1
- data/app/views/users/show.html.erb +0 -4
- data/config/jetty.yml +1 -1
- data/config/locales/sufia.en.yml +53 -12
- data/lib/generators/sufia/install_generator.rb +89 -0
- data/lib/generators/sufia/templates/catalog_controller.rb +1 -1
- data/lib/generators/sufia/upgrade400_generator.rb +4 -0
- data/lib/sufia.rb +1 -10
- data/lib/sufia/version.rb +1 -1
- data/solr_conf/conf/solrconfig.xml +31 -17
- data/spec/actors/generic_file/actor_spec.rb +17 -0
- data/spec/controllers/batch_controller_spec.rb +2 -2
- data/spec/controllers/batch_edits_controller_spec.rb +24 -19
- data/spec/controllers/catalog_controller_spec.rb +23 -12
- data/spec/controllers/collections_controller_spec.rb +19 -17
- data/spec/controllers/dashboard_controller_spec.rb +5 -19
- data/spec/controllers/generic_files_controller_spec.rb +35 -20
- data/spec/controllers/homepage_controller_spec.rb +25 -2
- data/spec/controllers/users_controller_spec.rb +99 -102
- data/spec/factories/generic_files.rb +2 -2
- data/spec/factories/users.rb +32 -2
- data/spec/features/browse_dashboard_files_spec.rb +14 -2
- data/spec/features/browse_files_spec.rb +5 -1
- data/spec/features/catalog_search_spec.rb +7 -6
- data/spec/features/collection_spec.rb +43 -33
- data/spec/features/display_dashboard_spec.rb +25 -22
- data/spec/features/notifications_spec.rb +9 -4
- data/spec/features/users_spec.rb +34 -25
- data/spec/fixtures/1.5mb-avatar.jpg +0 -0
- data/spec/helpers/batch_edits_helper_spec.rb +38 -0
- data/spec/helpers/dashboard_helper_spec.rb +16 -5
- data/spec/helpers/generic_file_helper_spec.rb +41 -0
- data/spec/helpers/records_helper_spec.rb +12 -0
- data/spec/jobs/active_fedora_pid_based_job_spec.rb +1 -1
- data/spec/jobs/audit_job_spec.rb +2 -3
- data/spec/jobs/batch_update_job_spec.rb +39 -24
- data/spec/jobs/event_jobs_spec.rb +1 -1
- data/spec/lib/sufia/id_service_spec.rb +25 -7
- data/spec/lib/sufia/messages_spec.rb +60 -0
- data/spec/lib/sufia/readable_permissions_spec.rb +56 -0
- data/spec/lib/sufia/writable_permissions_spec.rb +20 -0
- data/spec/models/batch_spec.rb +1 -1
- data/spec/models/collection_spec.rb +24 -2
- data/spec/models/featured_work_spec.rb +2 -2
- data/spec/models/file_content_datastream_spec.rb +5 -5
- data/spec/models/generic_file_spec.rb +149 -133
- data/spec/models/local_authority_spec.rb +1 -1
- data/spec/models/user_spec.rb +33 -6
- data/spec/spec_helper.rb +7 -10
- data/spec/{support → test_app_templates}/lib/generators/test_app_generator.rb +11 -6
- data/spec/views/batch/edit.html.erb_spec.rb +8 -2
- data/spec/views/catalog/index.html.erb_spec.rb +34 -0
- data/spec/views/catalog/{sort_and_per_pange.html.erb_spec.rb → sort_and_per_page.html.erb_spec.rb} +0 -0
- data/spec/views/collections/_form.html.erb_spec.rb +32 -0
- data/spec/views/collections/_show_descriptions.html.erb_spec.rb +25 -0
- data/spec/views/dashboard/index_spec.rb +33 -4
- data/spec/views/generic_file/_breadcrumbs.html.erb_spec.rb +32 -0
- data/spec/views/generic_file/show.html.erb_spec.rb +273 -8
- data/spec/views/users/_user_util_links.html.erb_spec.rb +25 -0
- data/sufia-models/app/actors/sufia/generic_file/actor.rb +14 -5
- data/sufia-models/{lib/sufia/models → app}/jobs/active_fedora_pid_based_job.rb +0 -0
- data/sufia-models/{lib/sufia/models → app}/jobs/audit_job.rb +4 -10
- data/sufia-models/{lib/sufia/models → app}/jobs/batch_update_job.rb +22 -18
- data/sufia-models/{lib/sufia/models → app}/jobs/characterize_job.rb +0 -0
- data/sufia-models/{lib/sufia/models → app}/jobs/create_derivatives_job.rb +0 -0
- data/sufia-models/{lib/sufia/models → app}/jobs/import_url_job.rb +0 -0
- data/sufia-models/{lib/sufia/models → app}/jobs/resolrize_job.rb +0 -0
- data/sufia-models/app/models/collection.rb +1 -39
- data/sufia-models/{lib → app/models/concerns}/sufia/ability.rb +0 -0
- data/sufia-models/app/models/concerns/sufia/collection.rb +55 -0
- data/sufia-models/app/models/concerns/sufia/generic_file.rb +5 -11
- data/sufia-models/app/models/concerns/sufia/generic_file/audit.rb +1 -2
- data/sufia-models/app/models/concerns/sufia/generic_file/characterization.rb +4 -2
- data/sufia-models/app/models/concerns/sufia/generic_file/full_text_indexing.rb +27 -0
- data/sufia-models/app/models/concerns/sufia/generic_file/mime_types.rb +1 -0
- data/sufia-models/app/models/concerns/sufia/generic_file/permissions.rb +2 -49
- data/sufia-models/{lib/sufia/models → app/models/concerns/sufia}/model_methods.rb +0 -0
- data/sufia-models/app/models/concerns/sufia/user.rb +8 -1
- data/sufia-models/app/models/sufia/avatar_uploader.rb +2 -3
- data/sufia-models/app/services/sufia/noid.rb +9 -0
- data/sufia-models/config/locales/sufia.en.yml +1 -0
- data/sufia-models/lib/generators/sufia/models/fulltext_generator.rb +27 -0
- data/sufia-models/lib/generators/sufia/models/install_generator.rb +7 -0
- data/sufia-models/lib/generators/sufia/models/templates/config/analytics.yml +5 -5
- data/sufia-models/lib/generators/sufia/models/templates/config/solrconfig.xml +177 -0
- data/sufia-models/lib/generators/sufia/models/templates/config/sufia.rb +3 -1
- data/sufia-models/lib/generators/sufia/models/upgrade400_generator.rb +7 -0
- data/sufia-models/lib/sufia/messages.rb +67 -0
- data/sufia-models/lib/sufia/models.rb +2 -0
- data/sufia-models/lib/sufia/models/active_fedora/redis.rb +0 -6
- data/sufia-models/lib/sufia/models/engine.rb +1 -3
- data/sufia-models/lib/sufia/models/resque.rb +1 -1
- data/sufia-models/lib/sufia/models/version.rb +1 -1
- data/sufia-models/lib/sufia/permissions.rb +9 -0
- data/sufia-models/lib/sufia/permissions/readable.rb +20 -0
- data/sufia-models/lib/sufia/permissions/writable.rb +56 -0
- data/sufia-models/lib/tasks/sufia-models_tasks.rake +58 -2
- data/sufia-models/sufia-models.gemspec +11 -11
- data/sufia.gemspec +19 -9
- data/tasks/jetty.rake +6 -5
- data/tasks/sufia-dev.rake +4 -77
- metadata +235 -72
- data/app/assets/images/folder.png +0 -0
- data/app/views/collections/show_fields/_creator.html.erb +0 -11
- data/app/views/collections/show_fields/_description.html.erb +0 -8
- data/app/views/collections/show_fields/_title.html.erb +0 -8
- data/app/views/generic_files/edit_fields/_default.html.erb +0 -6
- data/app/views/generic_files/edit_fields/_description.html.erb +0 -5
- data/app/views/generic_files/edit_fields/_resource_type.html.erb +0 -6
- data/app/views/generic_files/edit_fields/_rights.html.erb +0 -6
- data/app/views/generic_files/edit_fields/_suffix.html.erb +0 -9
- data/app/views/generic_files/show_fields/_creator.html.erb +0 -7
- data/app/views/generic_files/show_fields/_default.html.erb +0 -6
- data/app/views/generic_files/show_fields/_description.html.erb +0 -7
- data/app/views/generic_files/show_fields/_identifier.html.erb +0 -4
- data/app/views/generic_files/show_fields/_related_url.html.erb +0 -6
- data/app/views/generic_files/show_fields/_title.html.erb +0 -7
- data/lib/generators/sufia/sufia_generator.rb +0 -89
- data/spec/active_fedora/unsaved_digital_object_spec.rb +0 -35
@@ -1,20 +1,20 @@
|
|
1
1
|
<% if !user.facebook_handle.blank?() %>
|
2
|
-
<dt><i class="
|
2
|
+
<dt><i class="fa fa-facebook"></i> Facebook Handle</dt>
|
3
3
|
<dd><%= link_to "http://facebook.com/#{user.facebook_handle}", "http://facebook.com/#{user.facebook_handle}", {target:'_blank'} %></dd>
|
4
4
|
<% end %>
|
5
5
|
|
6
6
|
<% if !user.twitter_handle.blank?() %>
|
7
|
-
<dt><i class="
|
7
|
+
<dt><i class="fa fa-twitter"></i> Twitter Handle</dt>
|
8
8
|
<dd><%= link_to "http://twitter.com/#{user.twitter_handle}", "http://twitter.com/#{user.twitter_handle}", {target:'_blank'} %></dd>
|
9
9
|
<% end %>
|
10
10
|
|
11
11
|
<!--
|
12
12
|
|
13
|
-
<dt><i class="
|
13
|
+
<dt><i class="fa fa-google-plus"></i> Google+ Handle</dt>
|
14
14
|
<dd><%# link_to user.googleplus_handle, "http://google.com/+#{user.googleplus_handle}", {target:'_blank'} %></dd>
|
15
15
|
-->
|
16
16
|
|
17
17
|
<% if !user.linkedin_handle.blank?() %>
|
18
|
-
<dt><i class="
|
18
|
+
<dt><i class="fa fa-linkedin"></i> Linked In</dt>
|
19
19
|
<dd><%= link_to "#{@linkedInUrl}", "#{@linkedInUrl}", {target:'_blank'} %></dd>
|
20
20
|
<% end %>
|
@@ -2,16 +2,14 @@
|
|
2
2
|
<i class="glyphicon glyphicon-star trophy-on" ></i> Remove Highlight Designation
|
3
3
|
<a href="#" id="remove_trophy_help" rel="popover" data-content="If you would like to remove a highlight designation, check the box and save your profile." data-original-title="Remove Highlight Designation"><i class="glyphicon glyphicon-question-sign"></i></a>
|
4
4
|
</div>
|
5
|
-
<div class="
|
5
|
+
<div class="form-group">
|
6
6
|
<dl>
|
7
7
|
<% trophies.each do |t| %>
|
8
8
|
<dd>
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
</label>
|
14
|
-
</div>
|
9
|
+
<%= link_to t, sufia.generic_file_path(t) %>
|
10
|
+
<label class="checkbox fleft">
|
11
|
+
<%= check_box_tag "remove_trophy_#{t.noid}" %> Yes
|
12
|
+
</label>
|
15
13
|
</dd>
|
16
14
|
<br/>
|
17
15
|
<% end %>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<dl id="user_info" class="row">
|
2
|
-
<dt class="col-xs-5"><i class="
|
2
|
+
<dt class="col-xs-5"><i class="fa fa-facebook"></i> Facebook Handle</dt>
|
3
3
|
<dd class="col-xs-7"><%= link_to user.facebook_handle, "http://facebook.com/#{user.facebook_handle}", {target:'_blank'} %></dd>
|
4
4
|
|
5
|
-
<dt class="col-xs-5"><i class="
|
5
|
+
<dt class="col-xs-5"><i class="fa fa-twitter"></i> Twitter Handle</dt>
|
6
6
|
<dd class="col-xs-7"><%= link_to user.twitter_handle, "http://twitter.com/#{user.twitter_handle}", {target:'_blank'} %></dd>
|
7
7
|
|
8
|
-
<dt class="col-xs-5"><i class="
|
8
|
+
<dt class="col-xs-5"><i class="fa fa-google-plus"></i> Google+ Handle</dt>
|
9
9
|
<dd class="col-xs-7"><%= link_to user.googleplus_handle, "http://google.com/+#{user.googleplus_handle}", {target:'_blank'} %></dd>
|
10
10
|
|
11
11
|
<dt class="col-xs-5"><i class="glyphicon glyphicon-envelope-alt"></i> Email</dt>
|
@@ -8,66 +8,61 @@
|
|
8
8
|
<%= f.file_field :avatar %>
|
9
9
|
<%= f.hidden_field :avatar_cache %>
|
10
10
|
<span class="help-block">JPG, GIF, or PNG (less than 2MB)</span>
|
11
|
-
</div
|
11
|
+
</div>
|
12
12
|
</div><!-- .form-group -->
|
13
13
|
|
14
|
-
<div class="
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
<div class="col-xs-offset-4 col-xs-8">
|
15
|
+
<div class="checkbox">
|
16
|
+
<%= f.label :remove_avatar do %>
|
17
|
+
<%= f.check_box :remove_avatar %>
|
18
|
+
Delete picture
|
19
19
|
<a href="#" id="delete_picture_help" rel="popover" data-content="If you would like to remove your picture entirely, check the box and save your profile." data-original-title="Delete Picture"><i class="glyphicon glyphicon-question-sign"></i></a>
|
20
|
-
|
21
|
-
</div
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
<div class="col-xs-8">
|
27
|
-
<label class="checkbox">
|
28
|
-
<%= check_box_tag 'update_directory' %> Yes
|
20
|
+
<% end %>
|
21
|
+
</div>
|
22
|
+
<div class="checkbox">
|
23
|
+
<%= f.label :update_directory do %>
|
24
|
+
<%= f.check_box :update_directory %>
|
25
|
+
Refresh directory info
|
29
26
|
<a href="#" id="refresh_directory_help" rel="popover" data-content="The information displayed in your profile comes from <%=t('sufia.institution_name') %>'s central directory (LDAP) and is cached by <%=t('sufia.product_name') %>. If you have updated that information and don't see those changes in your <%=t('sufia.product_name') %> profile, check the box and save your profile." data-original-title="Refresh Directory Info"><i class="glyphicon glyphicon-question-sign"></i></a>
|
30
|
-
|
31
|
-
</div
|
32
|
-
</div
|
27
|
+
<% end %>
|
28
|
+
</div>
|
29
|
+
</div>
|
33
30
|
|
34
31
|
<div class="form-group">
|
35
|
-
<%= f.label :twitter_handle, '<i class="
|
32
|
+
<%= f.label :twitter_handle, '<i class="fa fa-twitter"></i> Twitter Handle'.html_safe, class: 'col-xs-4 control-label' %>
|
36
33
|
<div class="col-xs-8">
|
37
|
-
<%= f.text_field :twitter_handle, class: "
|
38
|
-
</div
|
34
|
+
<%= f.text_field :twitter_handle, class: "form-control" %>
|
35
|
+
</div>
|
39
36
|
</div><!-- .form-group -->
|
40
37
|
|
41
38
|
<div class="form-group">
|
42
|
-
<%= f.label :facebook_handle, '<i class="
|
39
|
+
<%= f.label :facebook_handle, '<i class="fa fa-facebook"></i> Facebook Handle'.html_safe, class: 'col-xs-4 control-label' %>
|
43
40
|
<div class="col-xs-8">
|
44
|
-
<%= f.text_field :facebook_handle, class: "
|
45
|
-
</div
|
41
|
+
<%= f.text_field :facebook_handle, class: "form-control" %>
|
42
|
+
</div>
|
46
43
|
</div><!-- .form-group -->
|
47
44
|
|
48
45
|
<div class="form-group">
|
49
|
-
<%= f.label :googleplus_handle, '<i class="
|
46
|
+
<%= f.label :googleplus_handle, '<i class="fa fa-google-plus"></i> Google+ Handle'.html_safe, class: 'col-xs-4 control-label' %>
|
50
47
|
<div class="col-xs-8">
|
51
|
-
<%= f.text_field :googleplus_handle, class: "
|
52
|
-
</div
|
48
|
+
<%= f.text_field :googleplus_handle, class: "form-control" %>
|
49
|
+
</div>
|
53
50
|
</div><!-- .form-group -->
|
54
51
|
|
55
52
|
<%= render partial: 'trophy_edit', locals: {trophies: @trophies} %>
|
56
53
|
|
57
|
-
<
|
58
|
-
<%= f.button '<i class="glyphicon glyphicon-save"></i> Save Profile'.html_safe, type: 'submit', class: "btn-primary btn-large" %>
|
59
|
-
</div>
|
54
|
+
<%= f.button '<i class="glyphicon glyphicon-save"></i> Save Profile'.html_safe, type: 'submit', class: "btn btn-primary" %>
|
60
55
|
<% end %>
|
61
56
|
</div><!-- .col-xs-5 /well-->
|
62
57
|
|
63
|
-
<div class="col-xs-12 col-sm-offset-1 col-sm-6
|
58
|
+
<div class="col-xs-12 col-sm-offset-1 col-sm-6 well">
|
64
59
|
<h2><i class="glyphicon glyphicon-user"></i> Directory Info (LDAP) <%= link_to 'Edit Instructions', 'http://www.psu.edu/directory/#update', class: 'btn btn-mini btn-primary' %></h3>
|
65
60
|
<%= render partial: 'user_info', locals: {user: @user} %>
|
66
61
|
|
67
62
|
<hr />
|
68
63
|
|
69
|
-
<h2><i class="glyphicon glyphicon-group"></i> User Managed Groups Info (UMG) <%= link_to 'Manage UMG', 'http://umg.its.psu.edu/', class: 'btn btn-
|
64
|
+
<h2><i class="glyphicon glyphicon-group"></i> User Managed Groups Info (UMG) <%= link_to 'Manage UMG', 'http://umg.its.psu.edu/', class: 'btn btn-xs btn-primary' %> </h3>
|
70
65
|
<% current_user.groups.each do |g| %>
|
71
|
-
<i class="
|
66
|
+
<i class="glyphicon glyphicon-asterisk"></i> <%= g %><br />
|
72
67
|
<% end %>
|
73
68
|
</div>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<tbody>
|
17
17
|
<% @users.each do |user| %>
|
18
18
|
<tr class="<%= cycle("","zebra") %>">
|
19
|
-
<td><a href="<%= sufia.profile_path(user) %>" class="btn btn-
|
19
|
+
<td><a href="<%= sufia.profile_path(user) %>" class="btn btn-sm " ><%= image_tag user.avatar.url(:thumb), width: 30 %></a></td>
|
20
20
|
<td ><a href="<%= sufia.profile_path(user) %>" ><%= user.name %><a></td>
|
21
21
|
<td><a href="<%= sufia.profile_path(user) %>" ><%= user.user_key %><a></td>
|
22
22
|
<td><%= user.department %> </td>
|
data/config/jetty.yml
CHANGED
data/config/locales/sufia.en.yml
CHANGED
@@ -29,6 +29,9 @@ en:
|
|
29
29
|
my_shares:
|
30
30
|
label_short: "My Shares"
|
31
31
|
label_long: "My Shares"
|
32
|
+
button:
|
33
|
+
html: '<span class="glyphicon glyphicon-search"></span> Go'
|
34
|
+
text: "Search"
|
32
35
|
upload:
|
33
36
|
my_computer:
|
34
37
|
tab_label: "My Computer"
|
@@ -38,28 +41,59 @@ en:
|
|
38
41
|
files_selected: "files selected"
|
39
42
|
local_ingest:
|
40
43
|
tab_label: "Network/Server Location"
|
44
|
+
processing: "File is being processed; you may edit when processing has completed"
|
41
45
|
field_label:
|
42
46
|
based_near: "Location"
|
43
47
|
description: "Abstract or Summary"
|
44
48
|
tag: "Keyword"
|
45
49
|
date_created: "Date Created"
|
46
50
|
related_url: "Related URL"
|
51
|
+
total_items: "Total Items"
|
52
|
+
size: "Size"
|
47
53
|
homepage:
|
48
54
|
featured_works: 'Featured Works'
|
49
55
|
dashboard:
|
50
|
-
title:
|
51
|
-
greeting:
|
52
|
-
upload:
|
53
|
-
create_collection:
|
54
|
-
|
55
|
-
|
56
|
-
|
56
|
+
title: "My Dashboard"
|
57
|
+
greeting: "Hello, "
|
58
|
+
upload: "Upload"
|
59
|
+
create_collection: "Create Collection"
|
60
|
+
view_collections: "View Collections"
|
61
|
+
view_files: "View Files"
|
62
|
+
user_activity: "User Activity"
|
63
|
+
no_activity: "User has no recent activity"
|
64
|
+
user_notiticiations: "User Notifications"
|
65
|
+
no_notifications: "User has no notifications"
|
66
|
+
additional_notifications: "See all notifications"
|
57
67
|
stats:
|
58
|
-
heading:
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
68
|
+
heading: "Your Statistics"
|
69
|
+
files: "Files you've deposited"
|
70
|
+
collections: "Collections you've created"
|
71
|
+
following: "People you follow"
|
72
|
+
followers: "People who are following you"
|
73
|
+
my:
|
74
|
+
files: "My Files"
|
75
|
+
collections: "My Collections"
|
76
|
+
highlights: "My Highlights"
|
77
|
+
shares: "Files Shared with Me"
|
78
|
+
file:
|
79
|
+
collections_list:
|
80
|
+
heading: "This file is in the following collections:"
|
81
|
+
empty: "This file is not currently in any collections."
|
82
|
+
messages:
|
83
|
+
success:
|
84
|
+
single: "has been saved."
|
85
|
+
multiple:
|
86
|
+
link: "These files"
|
87
|
+
tag: "have been saved."
|
88
|
+
title: "Files uploaded successfully"
|
89
|
+
subject: "Batch upload complete"
|
90
|
+
failure:
|
91
|
+
single: "could not be updated. You do not have sufficient privileges to edit it."
|
92
|
+
multiple:
|
93
|
+
link: "These files"
|
94
|
+
tag: "could not be updated. You do not have sufficient privileges to edit them."
|
95
|
+
title: "Files failed"
|
96
|
+
subject: "Batch upload permission denied"
|
63
97
|
metadata_help:
|
64
98
|
resource_type: "Pre-defined categories to describe the type of file content being uploaded, such as \"article\" or \"dataset.\" More than one type may be selected."
|
65
99
|
title: "A name for the file to aid in identifying it. Defaults to the file name, though a more descriptive title is encouraged. <em>This is a required field</em>."
|
@@ -78,5 +112,12 @@ en:
|
|
78
112
|
background_attribution: "Background image courtesy of Penn State University"
|
79
113
|
bread_crumb:
|
80
114
|
file_list: "Your File Listing"
|
115
|
+
collections_list: "Your Collections"
|
81
116
|
previous: "Back to Previous"
|
82
117
|
search_results: "Back to search results"
|
118
|
+
visibility:
|
119
|
+
open: "Open Access"
|
120
|
+
private: "Private"
|
121
|
+
user_profile:
|
122
|
+
no_followers: "No one is following you."
|
123
|
+
no_following: "You are not following anyone."
|
@@ -0,0 +1,89 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
require 'rails/generators/migration'
|
3
|
+
|
4
|
+
module Sufia
|
5
|
+
class Install < Rails::Generators::Base
|
6
|
+
include Rails::Generators::Migration
|
7
|
+
|
8
|
+
source_root File.expand_path('../templates', __FILE__)
|
9
|
+
|
10
|
+
argument :model_name, type: :string , default: "user"
|
11
|
+
desc """
|
12
|
+
This generator makes the following changes to your application:
|
13
|
+
1. Runs sufia-models:install
|
14
|
+
2. Adds Sufia's abilities into the Ability class
|
15
|
+
3. Adds controller behavior to the application controller
|
16
|
+
4. Copies the catalog controller into the local app
|
17
|
+
5. Adds Sufia::SolrDocumentBehavior to app/models/solr_document.rb
|
18
|
+
"""
|
19
|
+
|
20
|
+
def run_required_generators
|
21
|
+
generate "blacklight:install --devise"
|
22
|
+
generate "hydra:head -f"
|
23
|
+
generate "sufia:models:install"
|
24
|
+
end
|
25
|
+
|
26
|
+
def insert_abilities
|
27
|
+
insert_into_file 'app/models/ability.rb', after: /Hydra::Ability/ do
|
28
|
+
"\n include Sufia::Ability\n"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# Add behaviors to the application controller
|
33
|
+
def inject_sufia_controller_behavior
|
34
|
+
controller_name = "ApplicationController"
|
35
|
+
file_path = "app/controllers/application_controller.rb"
|
36
|
+
if File.exists?(file_path)
|
37
|
+
insert_into_file file_path, after: 'include Blacklight::Controller' do
|
38
|
+
" \n# Adds Sufia behaviors into the application controller \n" +
|
39
|
+
" include Sufia::Controller\n"
|
40
|
+
end
|
41
|
+
gsub_file file_path, "layout 'blacklight'", "layout 'sufia-one-column'"
|
42
|
+
else
|
43
|
+
puts " \e[31mFailure\e[0m Could not find #{file_path}. To add Sufia behaviors to your Controllers, you must include the Sufia::Controller module in the Controller class definition."
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def catalog_controller
|
48
|
+
copy_file "catalog_controller.rb", "app/controllers/catalog_controller.rb"
|
49
|
+
end
|
50
|
+
|
51
|
+
def copy_helper
|
52
|
+
copy_file 'sufia_helper.rb', 'app/helpers/sufia_helper.rb'
|
53
|
+
end
|
54
|
+
|
55
|
+
def remove_blacklight_scss
|
56
|
+
remove_file 'app/assets/stylesheets/blacklight.css.scss'
|
57
|
+
end
|
58
|
+
|
59
|
+
def tinymce_config
|
60
|
+
copy_file "config/tinymce.yml", "config/tinymce.yml"
|
61
|
+
end
|
62
|
+
|
63
|
+
# The engine routes have to come after the devise routes so that /users/sign_in will work
|
64
|
+
def inject_routes
|
65
|
+
gsub_file 'config/routes.rb', 'root :to => "catalog#index"', ''
|
66
|
+
|
67
|
+
routing_code = "\n Hydra::BatchEdit.add_routes(self)\n" +
|
68
|
+
" # This must be the very last route in the file because it has a catch-all route for 404 errors.
|
69
|
+
# This behavior seems to show up only in production mode.
|
70
|
+
mount Sufia::Engine => '/'\n root to: 'homepage#index'\n"
|
71
|
+
|
72
|
+
sentinel = /devise_for :users/
|
73
|
+
inject_into_file 'config/routes.rb', routing_code, { after: sentinel, verbose: false }
|
74
|
+
end
|
75
|
+
|
76
|
+
# Add behaviors to the SolrDocument model
|
77
|
+
def inject_sufia_solr_document_behavior
|
78
|
+
file_path = "app/models/solr_document.rb"
|
79
|
+
if File.exists?(file_path)
|
80
|
+
inject_into_file file_path, after: /include Blacklight::Solr::Document.*$/ do
|
81
|
+
"\n # Adds Sufia behaviors to the SolrDocument.\n" +
|
82
|
+
" include Sufia::SolrDocumentBehavior\n"
|
83
|
+
end
|
84
|
+
else
|
85
|
+
puts " \e[31mFailure\e[0m Sufia requires a SolrDocument object. This generators assumes that the model is defined in the file #{file_path}, which does not exist."
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -120,7 +120,7 @@ class CatalogController < ApplicationController
|
|
120
120
|
all_names = config.show_fields.values.map{|val| val.field}.join(" ")
|
121
121
|
title_name = solr_name("desc_metadata__title", :stored_searchable)
|
122
122
|
field.solr_parameters = {
|
123
|
-
qf: "#{all_names} noid_tsi file_format_tesim",
|
123
|
+
qf: "#{all_names} noid_tsi file_format_tesim all_text_timv",
|
124
124
|
pf: "#{title_name}"
|
125
125
|
}
|
126
126
|
end
|
@@ -58,6 +58,10 @@ This generator for upgrading sufia from 3.7.2 to 4.0 makes the following changes
|
|
58
58
|
remove_file 'app/assets/stylesheets/blacklight.css.scss'
|
59
59
|
end
|
60
60
|
|
61
|
+
def install_blacklight_gallery
|
62
|
+
generate "blacklight_gallery:install"
|
63
|
+
end
|
64
|
+
|
61
65
|
def tinymce_config
|
62
66
|
copy_file "config/tinymce.yml", "config/tinymce.yml"
|
63
67
|
end
|
data/lib/sufia.rb
CHANGED
@@ -9,7 +9,7 @@ require 'browse-everything'
|
|
9
9
|
require 'sufia/models'
|
10
10
|
|
11
11
|
require 'rails_autolink'
|
12
|
-
require 'font-awesome-
|
12
|
+
require 'font-awesome-rails'
|
13
13
|
require 'tinymce-rails'
|
14
14
|
require 'tinymce-rails-imageupload'
|
15
15
|
|
@@ -29,13 +29,4 @@ module Sufia
|
|
29
29
|
config.assets.paths << config.root.join('vendor', 'assets', 'fonts')
|
30
30
|
config.assets.precompile << %r(vjs\.(?:eot|ttf|woff)$)
|
31
31
|
end
|
32
|
-
|
33
|
-
autoload :Controller
|
34
|
-
autoload :Ability
|
35
|
-
autoload :HttpHeaderAuth
|
36
|
-
autoload :FilesControllerBehavior
|
37
|
-
autoload :BatchEditsControllerBehavior
|
38
|
-
autoload :DownloadsControllerBehavior
|
39
|
-
autoload :HomepageController
|
40
|
-
autoload :MyControllerBehavior
|
41
32
|
end
|
data/lib/sufia/version.rb
CHANGED
@@ -3,9 +3,9 @@
|
|
3
3
|
<!-- NOTE: various comments and unused configuration possibilities have been purged
|
4
4
|
from this file. Please refer to http://wiki.apache.org/solr/SolrConfigXml,
|
5
5
|
as well as the default solrconfig file included with Solr -->
|
6
|
-
|
6
|
+
|
7
7
|
<abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
|
8
|
-
|
8
|
+
|
9
9
|
<luceneMatchVersion>LUCENE_40</luceneMatchVersion>
|
10
10
|
|
11
11
|
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
|
@@ -13,7 +13,9 @@
|
|
13
13
|
<!-- solr lib dirs -->
|
14
14
|
<lib dir="../lib/contrib/analysis-extras/lib" />
|
15
15
|
<lib dir="../lib/contrib/analysis-extras/lucene-libs" />
|
16
|
-
|
16
|
+
<!-- for full-text indexing -->
|
17
|
+
<lib dir="../lib/contrib/extraction/lib" regex=".*\.jar" />
|
18
|
+
|
17
19
|
<dataDir>${solr.data.dir:}</dataDir>
|
18
20
|
|
19
21
|
<requestHandler name="search" class="solr.SearchHandler" default="true">
|
@@ -30,7 +32,7 @@
|
|
30
32
|
<float name="tie">0.01</float>
|
31
33
|
<!-- this qf and pf are used by default, if not otherwise specified by
|
32
34
|
client. The default blacklight_config will use these for the
|
33
|
-
"keywords" search. See the author_qf/author_pf, title_qf, etc
|
35
|
+
"keywords" search. See the author_qf/author_pf, title_qf, etc
|
34
36
|
below, which the default blacklight_config will specify for
|
35
37
|
those searches. You may also be interested in:
|
36
38
|
http://wiki.apache.org/solr/LocalParams
|
@@ -57,9 +59,9 @@
|
|
57
59
|
</str>
|
58
60
|
<str name="subject_pf">
|
59
61
|
</str>
|
60
|
-
|
62
|
+
|
61
63
|
<str name="fl">
|
62
|
-
*,
|
64
|
+
*,
|
63
65
|
score
|
64
66
|
</str>
|
65
67
|
|
@@ -68,7 +70,7 @@
|
|
68
70
|
<str name="facet.limit">10</str>
|
69
71
|
<str name="facet.field">active_fedora_model_ssi</str>
|
70
72
|
<str name="facet.field">object_type_si</str>
|
71
|
-
|
73
|
+
|
72
74
|
<str name="spellcheck">true</str>
|
73
75
|
<str name="spellcheck.dictionary">default</str>
|
74
76
|
<str name="spellcheck.onlyMorePopular">true</str>
|
@@ -104,7 +106,20 @@
|
|
104
106
|
</str>
|
105
107
|
</lst>
|
106
108
|
</requestHandler>
|
107
|
-
|
109
|
+
|
110
|
+
<requestHandler name="/update/extract" startup="lazy" class="org.apache.solr.handler.extraction.ExtractingRequestHandler" >
|
111
|
+
<lst name="defaults">
|
112
|
+
<!-- All the main content goes into "text"... if you need to return the extracted text or do highlighting, use a stored field. -->
|
113
|
+
<str name="fmap.content">text</str>
|
114
|
+
<str name="lowernames">true</str>
|
115
|
+
<str name="uprefix">ignored_</str>
|
116
|
+
<!-- capture link hrefs but ignore div attributes -->
|
117
|
+
<str name="captureAttr">true</str>
|
118
|
+
<str name="fmap.a">links</str>
|
119
|
+
<str name="fmap.div">ignored_</str>
|
120
|
+
</lst>
|
121
|
+
</requestHandler>
|
122
|
+
|
108
123
|
<requestHandler name="standard" class="solr.SearchHandler">
|
109
124
|
<lst name="defaults">
|
110
125
|
<str name="echoParams">explicit</str>
|
@@ -122,7 +137,6 @@
|
|
122
137
|
</lst>
|
123
138
|
</requestHandler>
|
124
139
|
|
125
|
-
|
126
140
|
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
|
127
141
|
<str name="queryAnalyzerFieldType">textSpell</str>
|
128
142
|
<!-- Multiple "Spell Checkers" can be declared and used by this component
|
@@ -135,17 +149,17 @@
|
|
135
149
|
<str name="buildOnOptimize">true</str>
|
136
150
|
</lst>
|
137
151
|
</searchComponent>
|
138
|
-
|
139
|
-
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
140
|
-
|
152
|
+
|
153
|
+
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
154
|
+
|
141
155
|
<requestDispatcher handleSelect="true" >
|
142
156
|
<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048" />
|
143
157
|
</requestDispatcher>
|
144
|
-
|
158
|
+
|
145
159
|
<requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler" />
|
146
160
|
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
147
161
|
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
148
|
-
|
162
|
+
|
149
163
|
<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
|
150
164
|
<lst name="invariants">
|
151
165
|
<str name="q">solrpingquery</str>
|
@@ -154,10 +168,10 @@
|
|
154
168
|
<str name="echoParams">all</str>
|
155
169
|
</lst>
|
156
170
|
</requestHandler>
|
157
|
-
|
158
|
-
<!-- config for the admin interface -->
|
171
|
+
|
172
|
+
<!-- config for the admin interface -->
|
159
173
|
<admin>
|
160
174
|
<defaultQuery>search</defaultQuery>
|
161
175
|
</admin>
|
162
|
-
|
176
|
+
|
163
177
|
</config>
|