sufia 6.0.0.rc2 → 6.0.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -5
- data/History.md +14 -0
- data/LICENSE +15 -0
- data/SUFIA_VERSION +1 -1
- data/app/assets/javascripts/sufia/batch_edit.js +1 -1
- data/app/assets/javascripts/sufia/permissions.js +8 -12
- data/app/assets/stylesheets/sufia.css.scss +1 -1
- data/app/assets/stylesheets/sufia/_multi_value_fields.css.scss +67 -0
- data/app/assets/stylesheets/sufia/_settings.scss +1 -0
- data/app/assets/stylesheets/sufia/_styles.scss +4 -0
- data/app/assets/stylesheets/sufia/_tinymce.scss +14 -0
- data/app/controllers/batch_controller.rb +11 -2
- data/app/controllers/concerns/sufia/breadcrumbs.rb +2 -3
- data/app/controllers/concerns/sufia/collections_controller_behavior.rb +0 -1
- data/app/controllers/concerns/sufia/contact_form_controller_behavior.rb +1 -2
- data/app/controllers/concerns/sufia/controller.rb +1 -7
- data/app/controllers/concerns/sufia/downloads_controller_behavior.rb +3 -8
- data/app/controllers/concerns/sufia/files_controller/local_ingest_behavior.rb +2 -3
- data/app/controllers/concerns/sufia/files_controller/upload_complete_behavior.rb +1 -2
- data/app/controllers/concerns/sufia/files_controller_behavior.rb +27 -14
- data/app/controllers/concerns/sufia/homepage_controller.rb +3 -2
- data/app/controllers/content_blocks_controller.rb +17 -1
- data/app/controllers/downloads_controller.rb +0 -1
- data/app/controllers/my/shares_controller.rb +1 -0
- data/app/controllers/single_use_links_controller.rb +0 -1
- data/app/controllers/single_use_links_viewer_controller.rb +3 -8
- data/app/forms/sufia/forms/generic_file_edit_form.rb +1 -8
- data/app/helpers/content_block_helper.rb +30 -10
- data/app/helpers/generic_file_helper.rb +4 -4
- data/app/helpers/sufia/dashboard_helper_behavior.rb +2 -2
- data/app/helpers/sufia/sufia_helper_behavior.rb +4 -4
- data/app/helpers/trophy_helper.rb +3 -3
- data/app/jobs/content_delete_event_job.rb +1 -2
- data/app/jobs/content_deposit_event_job.rb +1 -1
- data/app/jobs/content_depositor_change_event_job.rb +1 -1
- data/app/jobs/content_new_version_event_job.rb +1 -1
- data/app/jobs/content_restored_version_event_job.rb +1 -1
- data/app/jobs/content_update_event_job.rb +1 -1
- data/app/models/concerns/sufia/solr_document_behavior.rb +5 -9
- data/app/models/content_block.rb +20 -0
- data/app/models/featured_work_list.rb +4 -0
- data/app/presenters/sufia/collection_presenter.rb +14 -2
- data/app/presenters/sufia/generic_file_presenter.rb +16 -0
- data/app/presenters/sufia/version_list_presenter.rb +1 -1
- data/app/views/batch/_metadata.html.erb +4 -4
- data/app/views/batch_edits/edit.html.erb +1 -1
- data/app/views/collections/_action_menu.html.erb +4 -5
- data/app/views/collections/_show_descriptions.html.erb +1 -5
- data/app/views/collections/_show_document_list.html.erb +0 -2
- data/app/views/collections/_show_document_list_menu.html.erb +5 -6
- data/app/views/collections/_show_document_list_row.html.erb +9 -9
- data/app/views/collections/_sort_and_per_page.html.erb +1 -1
- data/app/views/collections/_view_type_group.html.erb +1 -1
- data/app/views/collections/show.html.erb +3 -3
- data/app/views/generic_files/_asset_permissions_denial_flash.html.erb +1 -1
- data/app/views/generic_files/_asset_saved_flash.html.erb +1 -1
- data/app/views/generic_files/_asset_updated_flash.html.erb +1 -1
- data/app/views/generic_files/_browse_everything.html.erb +4 -4
- data/app/views/generic_files/_media_display.html.erb +9 -9
- data/app/views/generic_files/_permission_form.html.erb +1 -1
- data/app/views/generic_files/_show_actions.html.erb +1 -1
- data/app/views/generic_files/_show_collections.html.erb +2 -2
- data/app/views/generic_files/_show_details.html.erb +1 -1
- data/app/views/generic_files/_versioning.html.erb +9 -5
- data/app/views/generic_files/jq_upload.json.jbuilder +1 -1
- data/app/views/generic_files/new.html.erb +2 -3
- data/app/views/generic_files/show.html.erb +13 -16
- data/app/views/generic_files/upload/_alerts.html.erb +2 -2
- data/app/views/generic_files/upload/_form_fields.html.erb +1 -1
- 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/homepage/_featured.html.erb +2 -4
- data/app/views/homepage/_featured_researcher.html.erb +1 -1
- data/app/views/homepage/_featured_works.html.erb +5 -3
- data/app/views/homepage/_home_content.html.erb +1 -1
- data/app/views/homepage/_recent_document.html.erb +2 -2
- data/app/views/homepage/_sortable_featured.html.erb +1 -2
- data/app/views/my/_action_menu.html.erb +8 -8
- data/app/views/my/_collection_action_menu.html.erb +4 -4
- data/app/views/my/_index_partials/_list_collections.html.erb +9 -12
- data/app/views/my/_index_partials/_list_files.html.erb +9 -9
- data/app/views/my/index.html.erb +0 -1
- data/app/views/records/_rights_modal.html.erb +1 -0
- data/app/views/users/_contributions.html.erb +2 -3
- data/app/views/users/_edit_primary.html.erb +68 -0
- data/app/views/users/_edit_secondary.html.erb +1 -0
- data/app/views/users/_trophy_edit.html.erb +1 -3
- data/app/views/users/edit.html.erb +4 -78
- data/config/initializers/simple_form.rb +167 -0
- data/config/initializers/simple_form_bootstrap.rb +137 -0
- data/config/locales/simple_form.en.yml +31 -0
- data/config/locales/sufia.en.yml +7 -4
- data/config/routes.rb +1 -1
- data/lib/generators/sufia/templates/catalog_controller.rb +1 -1
- data/lib/sufia/single_use_error.rb +1 -1
- data/lib/sufia/version.rb +1 -1
- data/spec/actors/generic_file/actor_spec.rb +5 -5
- data/spec/controllers/batch_controller_spec.rb +15 -0
- data/spec/controllers/collections_controller_spec.rb +1 -1
- data/spec/controllers/content_blocks_controller_spec.rb +23 -3
- data/spec/controllers/downloads_controller_spec.rb +5 -5
- data/spec/controllers/generic_files_controller_spec.rb +12 -12
- data/spec/controllers/homepage_controller_spec.rb +19 -6
- data/spec/controllers/my/files_controller_spec.rb +8 -10
- data/spec/controllers/my/shares_controller_spec.rb +34 -23
- data/spec/controllers/single_use_links_controller_spec.rb +2 -3
- data/spec/controllers/single_use_links_viewer_controller_spec.rb +19 -20
- data/spec/controllers/users_controller_spec.rb +8 -8
- data/spec/factories/generic_files.rb +4 -4
- data/spec/factories/users.rb +2 -3
- data/spec/features/browse_dashboard_files_spec.rb +8 -8
- data/spec/features/collection_spec.rb +15 -8
- data/spec/features/edit_file_spec.rb +26 -0
- data/spec/features/single_use_links_spec.rb +3 -3
- data/spec/forms/generic_file_edit_form_spec.rb +8 -1
- data/spec/helpers/content_block_helper_spec.rb +10 -0
- data/spec/helpers/dashboard_helper_spec.rb +42 -0
- data/spec/helpers/sufia_helper_spec.rb +34 -7
- data/spec/helpers/trophy_helper_spec.rb +6 -6
- data/spec/inputs/select_with_help_input_spec.rb +16 -0
- data/spec/jobs/audit_job_spec.rb +1 -1
- data/spec/jobs/characterize_job_spec.rb +2 -7
- data/spec/jobs/create_derivatives_job_spec.rb +27 -38
- data/spec/jobs/import_url_job_spec.rb +2 -2
- data/spec/jobs/ingest_local_file_job_spec.rb +6 -8
- data/spec/lib/sufia/id_service_spec.rb +0 -7
- data/spec/lib/sufia/messages_spec.rb +16 -13
- data/spec/models/ability_spec.rb +3 -0
- data/spec/models/checksum_audit_log_spec.rb +1 -1
- data/spec/models/content_block_spec.rb +41 -0
- data/spec/models/featured_work_list_spec.rb +23 -9
- data/spec/models/file_content_datastream_spec.rb +4 -4
- data/spec/models/file_usage_spec.rb +1 -1
- data/spec/models/fits_datastream_spec.rb +4 -4
- data/spec/models/generic_file_spec.rb +31 -15
- data/spec/models/single_use_link_spec.rb +2 -2
- data/spec/models/solr_document_spec.rb +8 -5
- data/spec/models/user_spec.rb +3 -3
- data/spec/presenters/sufia/collection_presenter_spec.rb +34 -0
- data/spec/presenters/sufia/generic_file_presenter_spec.rb +41 -1
- data/spec/presenters/sufia/version_list_presenter_spec.rb +12 -2
- data/spec/services/generic_file_audit_service_spec.rb +3 -3
- data/spec/services/noid_spec.rb +4 -11
- data/spec/services/repository_audit_service_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -0
- data/spec/support/fixture_helpers.rb +2 -3
- data/spec/support/selectors.rb +7 -7
- data/spec/test_app_templates/Gemfile.extra +1 -0
- data/spec/views/batch/edit.html.erb_spec.rb +14 -17
- data/spec/views/collections/_show_descriptions.html.erb_spec.rb +1 -1
- data/spec/views/generic_file/_permission_form.html.erb_spec.rb +29 -7
- data/spec/views/generic_file/edit.html.erb_spec.rb +1 -1
- data/spec/views/generic_file/show.html.erb_spec.rb +69 -151
- data/spec/views/generic_file/stats.html.erb_spec.rb +1 -1
- data/spec/views/homepage/_featured_works.html.erb_spec.rb +29 -0
- data/spec/views/users/show.html.erb_spec.rb +1 -1
- data/sufia-models/app/actors/sufia/generic_file/actor.rb +12 -8
- data/sufia-models/app/jobs/batch_update_job.rb +2 -2
- data/sufia-models/app/jobs/import_url_job.rb +5 -3
- data/sufia-models/app/jobs/ingest_local_file_job.rb +46 -0
- data/sufia-models/app/jobs/resolrize_job.rb +1 -8
- data/sufia-models/app/models/batch.rb +0 -7
- data/sufia-models/app/models/concerns/sufia/ability.rb +1 -1
- data/sufia-models/app/models/concerns/sufia/{collection.rb → collection_behavior.rb} +1 -13
- data/sufia-models/app/models/concerns/sufia/generic_file/batches.rb +3 -4
- data/sufia-models/app/models/concerns/sufia/generic_file/export.rb +1 -1
- data/sufia-models/app/models/concerns/sufia/generic_file/featured.rb +1 -4
- data/sufia-models/app/models/concerns/sufia/generic_file/metadata.rb +7 -7
- data/sufia-models/app/models/concerns/sufia/generic_file/trophies.rb +1 -2
- data/sufia-models/app/models/concerns/sufia/generic_file/virus_check.rb +16 -11
- data/sufia-models/app/models/concerns/sufia/model_methods.rb +1 -14
- data/sufia-models/app/models/concerns/sufia/user.rb +5 -0
- data/sufia-models/app/models/file_usage.rb +1 -1
- data/sufia-models/app/models/file_view_stat.rb +1 -1
- data/sufia-models/app/models/sufia/collection.rb +5 -0
- data/sufia-models/app/services/sufia/generic_file_indexing_service.rb +1 -1
- data/sufia-models/app/services/sufia/id_service.rb +1 -2
- data/sufia-models/app/services/sufia/noid.rb +4 -24
- data/sufia-models/lib/generators/sufia/models/install_generator.rb +6 -1
- data/sufia-models/lib/generators/sufia/models/templates/app/models/collection.rb +2 -0
- data/sufia-models/lib/generators/sufia/models/templates/config/resque_config.rb +1 -1
- data/sufia-models/lib/generators/sufia/models/templates/config/solrconfig.xml +46 -0
- data/sufia-models/lib/generators/sufia/models/templates/config/sufia.rb +9 -5
- data/sufia-models/lib/generators/sufia/models/templates/migrations/add_external_key_to_content_blocks.rb +6 -0
- data/sufia-models/lib/generators/sufia/models/update_content_blocks_generator.rb +18 -0
- data/sufia-models/lib/sufia/messages.rb +11 -12
- data/sufia-models/lib/sufia/models/engine.rb +2 -1
- data/sufia-models/lib/sufia/models/stats/user_stat_importer.rb +9 -5
- data/sufia-models/lib/sufia/models/version.rb +1 -1
- data/sufia-models/sufia-models.gemspec +5 -5
- data/sufia.gemspec +15 -15
- data/tasks/sufia-dev.rake +0 -16
- metadata +86 -64
- data/LICENSE.md +0 -14
- data/app/jobs/ingest_local_file_job.rb +0 -39
- data/sufia-models/app/models/collection.rb +0 -3
- data/sufia-models/app/services/sufia/indexing_service.rb +0 -15
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="alert alert-info hide" id="success">
|
2
2
|
You have successfully uploaded some of your files. Either continue to upload or edit use the links below to abandon the rest of your added files.
|
3
3
|
<p>
|
4
|
-
<%= link_to 'Add Descriptions', GenericFilesController.upload_complete_path(@
|
4
|
+
<%= link_to 'Add Descriptions', GenericFilesController.upload_complete_path(@batch_id), class: 'btn' %>
|
5
5
|
</p>
|
6
6
|
</div>
|
7
7
|
|
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
<div class="alert hide" id="partial_fail">
|
13
13
|
One or more files did not upload successfully. To continue using the files uploaded use one of the links below.<br />
|
14
|
-
<%= link_to 'Add Descriptions', GenericFilesController.upload_complete_path(@
|
14
|
+
<%= link_to 'Add Descriptions', GenericFilesController.upload_complete_path(@batch_id), class: 'btn' %>
|
15
15
|
</div>
|
16
16
|
|
17
17
|
<div class="alert hide" id="errmsg"> </div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<!-- The file upload form used as target for the file upload widget -->
|
2
2
|
<%= hidden_field_tag(:total_upload_size, 0) %>
|
3
3
|
<%= hidden_field_tag(:relative_path) %>
|
4
|
-
<%= hidden_field_tag(:batch_id, @
|
4
|
+
<%= hidden_field_tag(:batch_id, @batch_id) %>
|
5
5
|
<%= hidden_field_tag "file_coming_from", "local" %>
|
6
6
|
<%= render partial: 'generic_files/upload/tos_checkbox' %>
|
7
7
|
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<%end%>
|
18
18
|
</tbody>
|
19
19
|
</table>
|
20
|
-
<%= hidden_field_tag(:batch_id, @
|
20
|
+
<%= hidden_field_tag(:batch_id, @batch_id) %>
|
21
21
|
<button type="submit" class="activate-submit btn btn-primary start" id="main_upload_start">
|
22
22
|
<i class="glyphicon glyphicon-upload"></i>
|
23
23
|
<span>Deposit Selected Files</span>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="alert alert-info hide" id="redirect-loc" type="text/x-jquery-tmpl">
|
2
|
-
|
3
|
-
<%=GenericFilesController.upload_complete_path(@
|
2
|
+
<%# Script redirects here once the uploads are complete %>
|
3
|
+
<%= GenericFilesController.upload_complete_path(@batch_id) %>
|
4
4
|
</div>
|
5
5
|
|
6
6
|
<!-- The template to display files available for upload -->
|
@@ -1,10 +1,8 @@
|
|
1
1
|
<% solr_document = featured.generic_file_solr_document %>
|
2
|
-
<li class="featured-item" data-id="<%= solr_document.
|
2
|
+
<li class="featured-item" data-id="<%= solr_document.id %>">
|
3
3
|
<div class="main row">
|
4
4
|
<div class="col-sm-3">
|
5
|
-
<%=
|
6
|
-
<%= render_thumbnail_tag solr_document, {width: 90} %>
|
7
|
-
<% end %>
|
5
|
+
<%= render_thumbnail_tag solr_document, { width: 90 } %>
|
8
6
|
</div>
|
9
7
|
<div class="col-sm-9">
|
10
8
|
<%= render partial: 'homepage/featured_fields', locals: {featured: solr_document} %>
|
@@ -1,2 +1,2 @@
|
|
1
1
|
<h2>Featured Researcher</h2>
|
2
|
-
<%= editable_content_block @featured_researcher %>
|
2
|
+
<%= editable_content_block @featured_researcher, true %>
|
@@ -1,5 +1,7 @@
|
|
1
|
-
<h2
|
2
|
-
<% if
|
1
|
+
<h2><%= t('sufia.homepage.featured_works.title') %></h2>
|
2
|
+
<% if @featured_work_list.empty? %>
|
3
|
+
<p><%= t('sufia.homepage.featured_works.no_works') %></p>
|
4
|
+
<% elsif can? :update, FeaturedWork %>
|
3
5
|
<%= form_for [sufia, @featured_work_list] do |f| %>
|
4
6
|
<div class="panel-group dd" id="dd">
|
5
7
|
<ol id="featured_works">
|
@@ -8,7 +10,7 @@
|
|
8
10
|
<% end %>
|
9
11
|
</ol>
|
10
12
|
</div>
|
11
|
-
<%= f.submit
|
13
|
+
<%= f.submit("Save order", class: 'btn btn-default') %>
|
12
14
|
<% end %>
|
13
15
|
<% else %>
|
14
16
|
<ol id="featured_works">
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="col-xs-12 col-sm-6">
|
2
2
|
<ul id="homeTabs" class="nav nav-tabs">
|
3
|
-
<li><a href="#featured_container" data-toggle="tab" role="tab" id="featureTab"><%= t('sufia.homepage.featured_works') %></a></li>
|
3
|
+
<li><a href="#featured_container" data-toggle="tab" role="tab" id="featureTab"><%= t('sufia.homepage.featured_works.tab_label') %></a></li>
|
4
4
|
<li><a href="#recently_uploaded" data-toggle="tab" role="tab" id="recentTab"><%= t('sufia.homepage.recently_uploaded') %></a></li>
|
5
5
|
</ul>
|
6
6
|
<div class="tab-content">
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<% end %>
|
10
10
|
<td>
|
11
11
|
<h3>
|
12
|
-
<span class="sr-only">Title</span><%= link_to truncate(recent_document.title_or_label, length: 28, separator: ' '), sufia.generic_file_path(recent_document
|
12
|
+
<span class="sr-only">Title</span><%= link_to truncate(recent_document.title_or_label, length: 28, separator: ' '), sufia.generic_file_path(recent_document) %>
|
13
13
|
<% if display_access %>
|
14
14
|
<% if recent_document.registered? %>
|
15
15
|
<span class="label label-info" title="<%=t('sufia.institution_name') %>"><%=t('sufia.institution_name') %></span>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
</h3>
|
23
23
|
<p>
|
24
24
|
<span class="sr-only">Filename</span><%= link_to truncate(recent_document.label, length: 25),
|
25
|
-
sufia.generic_file_path(recent_document
|
25
|
+
sufia.generic_file_path(recent_document), title: recent_document.label %><br />
|
26
26
|
<span class="sr-only">Keywords</span><%= link_to_facet_list(recent_document.tags, 'tag', 'no keywords specified').html_safe %>
|
27
27
|
</p>
|
28
28
|
</td>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% featured = f.object.generic_file_solr_document %>
|
2
|
-
<li class="dd-item dd3-item featured-item" data-id="<%= featured.
|
2
|
+
<li class="dd-item dd3-item featured-item" data-id="<%= featured.id %>">
|
3
3
|
<div class="dd-handle dd3-handle"><%= t :drag %></div>
|
4
4
|
<div class="dd3-content panel panel-default">
|
5
5
|
<%= f.hidden_field :id %>
|
@@ -25,4 +25,3 @@
|
|
25
25
|
</div>
|
26
26
|
</div>
|
27
27
|
</li>
|
28
|
-
|
@@ -1,34 +1,34 @@
|
|
1
1
|
<div class="btn-group">
|
2
|
-
<button class="btn btn-sm dropdown-toggle" data-toggle="dropdown" type="button" id="dropdownMenu_<%=
|
2
|
+
<button class="btn btn-sm dropdown-toggle" data-toggle="dropdown" type="button" id="dropdownMenu_<%= id %>" aria-haspopup="true">
|
3
3
|
<span class="sr-only">Press to </span>
|
4
4
|
Select an action
|
5
5
|
<span class="caret" aria-hidden="true"></span>
|
6
6
|
</button>
|
7
|
-
<ul role="menu" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu_<%=
|
7
|
+
<ul role="menu" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu_<%= id %>">
|
8
8
|
<li role="menuitem" tabindex="-1">
|
9
9
|
<%= link_to raw('<i class="glyphicon glyphicon-link over" aria-hidden="true"></i> Single-Use Link to File'), '#',
|
10
|
-
class: "copypaste itemicon itemcode", title: "Single-Use Link to File", id: "copy_link_#{
|
10
|
+
class: "copypaste itemicon itemcode", title: "Single-Use Link to File", id: "copy_link_#{id}" %>
|
11
11
|
</li>
|
12
12
|
<li role="menuitem" tabindex="-1">
|
13
|
-
<%= link_to raw('<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i> Edit File'), sufia.edit_generic_file_path(
|
13
|
+
<%= link_to raw('<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i> Edit File'), sufia.edit_generic_file_path(id),
|
14
14
|
class: 'itemicon itemedit', title: 'Edit File' %>
|
15
15
|
</li>
|
16
16
|
<li role="menuitem" tabindex="-1">
|
17
|
-
<%= link_to raw('<i class="glyphicon glyphicon-download-alt" aria-hidden="true"></i> Download File'), sufia.download_path(
|
17
|
+
<%= link_to raw('<i class="glyphicon glyphicon-download-alt" aria-hidden="true"></i> Download File'), sufia.download_path(id),
|
18
18
|
class: 'itemicon itemdownload', title: 'Download File', target: '_new' %>
|
19
19
|
</li>
|
20
20
|
<li role="menuitem" tabindex="-1">
|
21
|
-
<%= link_to raw('<i class="glyphicon glyphicon-trash" aria-hidden="true"></i> Delete File'), sufia.generic_file_path(
|
21
|
+
<%= link_to raw('<i class="glyphicon glyphicon-trash" aria-hidden="true"></i> Delete File'), sufia.generic_file_path(id),
|
22
22
|
class: 'itemicon itemtrash', title: 'Delete File', method: :delete, data: {
|
23
23
|
confirm: "Deleting a file from #{t('sufia.product_name')} is permanent. Click OK to delete this file from #{t('sufia.product_name')}, or Cancel to cancel this operation" } %>
|
24
24
|
</li>
|
25
25
|
<li role="menuitem" tabindex="-1">
|
26
|
-
<%= display_trophy_link(@user,
|
26
|
+
<%= display_trophy_link(@user, id) do |text| %>
|
27
27
|
<i aria-hidden="true" class='glyphicon glyphicon-star'></i> <%= text %>
|
28
28
|
<% end %>
|
29
29
|
</li>
|
30
30
|
<li>
|
31
|
-
<%= link_to raw('<i class="glyphicon glyphicon-transfer" aria-hidden="true"></i> Transfer Ownership of File'), sufia.new_generic_file_transfer_path(
|
31
|
+
<%= link_to raw('<i class="glyphicon glyphicon-transfer" aria-hidden="true"></i> Transfer Ownership of File'), sufia.new_generic_file_transfer_path(id), class: 'itemicon itemtransfer', title: 'Transfer Ownership of File' if gf.depositor == @user.user_key %>
|
32
32
|
</li>
|
33
33
|
</ul>
|
34
34
|
</div>
|
@@ -1,15 +1,15 @@
|
|
1
1
|
<div class="btn-group">
|
2
|
-
<button class="btn btn-sm dropdown-toggle" data-toggle="dropdown" type="button" id="dropdownMenu_<%=
|
2
|
+
<button class="btn btn-sm dropdown-toggle" data-toggle="dropdown" type="button" id="dropdownMenu_<%= id %>" aria-haspopup="true">
|
3
3
|
<span class="sr-only">Press to </span>
|
4
4
|
Select an action <span class="caret" aria-hidden="true"></span>
|
5
5
|
</button>
|
6
|
-
<ul role="menu" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu_<%=
|
6
|
+
<ul role="menu" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu_<%= id %>">
|
7
7
|
<li role="menuitem" tabindex="-1">
|
8
|
-
<%= link_to raw('<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i> Edit Collection'), collections.edit_collection_path(
|
8
|
+
<%= link_to raw('<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i> Edit Collection'), collections.edit_collection_path(id),
|
9
9
|
class: 'itemicon itemedit', title: 'Edit Collection' %>
|
10
10
|
</li>
|
11
11
|
<li role="menuitem" tabindex="-1">
|
12
|
-
<%= link_to raw('<i class="glyphicon glyphicon-trash" aria-hidden="true"></i> Delete Collection'), collections.collection_path(
|
12
|
+
<%= link_to raw('<i class="glyphicon glyphicon-trash" aria-hidden="true"></i> Delete Collection'), collections.collection_path(id),
|
13
13
|
class: 'itemicon itemtrash', title: 'Delete Collection', method: :delete, data: {
|
14
14
|
confirm: "Deleting a collection from #{t('sufia.product_name')} is permanent. Click OK to delete this collection from #{t('sufia.product_name')}, or Cancel to cancel this operation" } %>
|
15
15
|
</li>
|
@@ -1,9 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
on element ids -->
|
5
|
-
<% noid = document.noid %>
|
6
|
-
<tr id="document_<%= noid %>" class="<%= cycle("","zebra") %>">
|
1
|
+
<!-- scholarsphere override -->
|
2
|
+
<% id = document.id %>
|
3
|
+
<tr id="document_<%= id %>" class="<%= cycle("","zebra") %>">
|
7
4
|
<td width="3%"></td>
|
8
5
|
<td width="41%">
|
9
6
|
<div class="media">
|
@@ -12,12 +9,12 @@ on element ids -->
|
|
12
9
|
<% end %>
|
13
10
|
<div class="media-body">
|
14
11
|
<div class="media-heading">
|
15
|
-
<%= link_to collections.collection_path(
|
12
|
+
<%= link_to collections.collection_path(id), id: "src_copy_link#{id}" do %>
|
16
13
|
<span class="sr-only"><%= t("sufia.dashboard.my.sr.show_label") %> </span>
|
17
14
|
<%= document.title_or_label %>
|
18
15
|
<% end %>
|
19
16
|
<a href="#" class="small" title="Click for more details">
|
20
|
-
<i id="expand_<%=
|
17
|
+
<i id="expand_<%= id %>" class="glyphicon glyphicon-chevron-right" aria-hidden="true"></i>
|
21
18
|
<span class="sr-only"> <%= "#{t("sufia.dashboard.my.sr.detail_label")} #{document.title_or_label}" %></span>
|
22
19
|
</a>
|
23
20
|
</div>
|
@@ -27,19 +24,19 @@ on element ids -->
|
|
27
24
|
<td width="17%"><%= document.date_uploaded %> </td>
|
28
25
|
<td width="5%" class="text-center">
|
29
26
|
<% if document.registered? %>
|
30
|
-
<span class="label label-info" title="<%=t('sufia.institution_name') %>"><%=t('sufia.institution_name') %></span></a>
|
27
|
+
<span class="label label-info" title="<%=t('sufia.institution_name') %>"><%=t('sufia.institution_name') %></span></a>
|
31
28
|
<% elsif document.public? %>
|
32
29
|
<span class="label label-success" title="Open Access">Open Access</span></a>
|
33
30
|
<% else %>
|
34
31
|
<span class="label label-danger" title="Private">Private</span></a>
|
35
32
|
<% end %>
|
36
|
-
|
33
|
+
|
37
34
|
</td>
|
38
35
|
<td class="text-center">
|
39
|
-
<%= render partial:'collection_action_menu', locals:{
|
36
|
+
<%= render partial:'collection_action_menu', locals: { id: id } %>
|
40
37
|
</td>
|
41
38
|
</tr>
|
42
|
-
<tr id="detail_<%=
|
39
|
+
<tr id="detail_<%= id %>"> <!-- collection detail"> -->
|
43
40
|
<td colspan="6">
|
44
41
|
<dl class="expanded-details row">
|
45
42
|
<dt class="col-xs-3 col-lg-2">Description:</dt>
|
@@ -1,12 +1,12 @@
|
|
1
|
-
<%
|
2
|
-
<tr id="document_<%=
|
1
|
+
<% id = document.id %>
|
2
|
+
<tr id="document_<%= id %>" class="<%= cycle("", "zebra") %>">
|
3
3
|
<% gf = document.to_model %>
|
4
4
|
<td>
|
5
|
-
<label for="batch_document_<%=
|
5
|
+
<label for="batch_document_<%= id %>" class="sr-only"><%=t("sufia.dashboard.my.sr.batch_checkbox")%></label>
|
6
6
|
<%= batch_edit_select(document) %>
|
7
7
|
<%# This block is for adding/removing the magic wand while batch updates are processing %>
|
8
8
|
<% if gf.processing? %>
|
9
|
-
<i class="glyphicon glyphicon-time <%= 'ss-'+gf.batch.
|
9
|
+
<i class="glyphicon glyphicon-time <%= 'ss-'+gf.batch.id %>"/>
|
10
10
|
<% elsif gf.depositor != @user.user_key %>
|
11
11
|
<i class="glyphicon glyphicon-share-alt"/>
|
12
12
|
<% end %>
|
@@ -18,12 +18,12 @@
|
|
18
18
|
<% end %>
|
19
19
|
<div class="media-body">
|
20
20
|
<div class="media-heading">
|
21
|
-
<%= link_to
|
21
|
+
<%= link_to sufia.generic_file_path(document), id: "src_copy_link#{id}", class: "#{'document-title' if document.title_or_label == document.label}" do %>
|
22
22
|
<span class="sr-only"><%= t("sufia.dashboard.my.sr.show_label") %> </span>
|
23
23
|
<%= document.title_or_label %>
|
24
24
|
<% end %>
|
25
25
|
<a href="#" class="small" title="Click for more details">
|
26
|
-
<i id="expand_<%=
|
26
|
+
<i id="expand_<%= id %>" class="glyphicon glyphicon-chevron-right" aria-hidden="true"></i>
|
27
27
|
<span class="sr-only"> <%= "#{t("sufia.dashboard.my.sr.detail_label")} #{document.title_or_label}" %></span>
|
28
28
|
</a>
|
29
29
|
</div>
|
@@ -36,14 +36,14 @@
|
|
36
36
|
<%= render_visibility_link document %>
|
37
37
|
</td>
|
38
38
|
<td class="text-center">
|
39
|
-
<%= render partial: 'action_menu', locals: {
|
39
|
+
<%= render partial: 'action_menu', locals: { id: id, gf: gf } %>
|
40
40
|
</td>
|
41
41
|
</tr>
|
42
|
-
<tr id="detail_<%=
|
42
|
+
<tr id="detail_<%= id %>"> <!-- document detail"> -->
|
43
43
|
<td colspan="6">
|
44
44
|
<dl class="expanded-details row">
|
45
45
|
<dt class="col-xs-3 col-lg-2">File Name:</dt>
|
46
|
-
<dd class="col-xs-9 col-lg-4"><%= link_to document.label, sufia.generic_file_path(
|
46
|
+
<dd class="col-xs-9 col-lg-4"><%= link_to document.label, sufia.generic_file_path(id) %></dd>
|
47
47
|
<dt class="col-xs-3 col-lg-2">File Format:</dt>
|
48
48
|
<dd class="col-xs-9 col-lg-4"><%= document.file_format %>JPG</dd>
|
49
49
|
<dt class="col-xs-3 col-lg-2">Creator:</dt>
|
data/app/views/my/index.html.erb
CHANGED
@@ -10,7 +10,6 @@
|
|
10
10
|
|
11
11
|
<% @page_title = "#{current_tab.capitalize} listing" %>
|
12
12
|
|
13
|
-
|
14
13
|
<ul class="nav nav-tabs" id="my_nav">
|
15
14
|
<h1 class="sr-only">Listing Navigation Bar</h1>
|
16
15
|
<span class="sr-only">You are currently listing your <%= current_tab.pluralize %> . You have <%= @response.docs.count %> <%= current_tab.pluralize(@response.docs.count)%> </span>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render partial: "generic_files/rights_modal" %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% if @trophies.count > 0 %>
|
4
4
|
<table>
|
5
5
|
<% @trophies.each do |t| %>
|
6
|
-
<tr id="trophyrow_<%= t.
|
6
|
+
<tr id="trophyrow_<%= t.id %>">
|
7
7
|
<td>
|
8
8
|
<%= link_to sufia.generic_file_path(t) do %>
|
9
9
|
<%= render_thumbnail_tag t, { width: 90 } %>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<td>
|
13
13
|
<%= link_to display_title(t), sufia.generic_file_path(t) %>
|
14
14
|
<% if current_user == @user %>
|
15
|
-
<%= display_trophy_link current_user, t.
|
15
|
+
<%= display_trophy_link current_user, t.id, class: 'glyphicon glyphicon-star', data: {removerow: true} do %>
|
16
16
|
<i class='trophy-on glyphicon glyphicon-remove'></i>
|
17
17
|
<% end %>
|
18
18
|
<% end %>
|
@@ -24,4 +24,3 @@
|
|
24
24
|
<%= @user.name %> has no highlighted files.
|
25
25
|
<% end %>
|
26
26
|
</div>
|
27
|
-
|
@@ -0,0 +1,68 @@
|
|
1
|
+
<div class="well">
|
2
|
+
<%= form_for @user, url: sufia.profile_path(@user.to_param), html: {multipart: true, class: 'form-horizontal' } do |f| %>
|
3
|
+
<div class="form-group">
|
4
|
+
<%= f.label :avatar, '<i class="glyphicon glyphicon-camera"></i> Change picture'.html_safe, class: "col-xs-4 control-label" %>
|
5
|
+
<div class="col-xs-8">
|
6
|
+
<%= image_tag @user.avatar.url(:thumb) if @user.avatar? %>
|
7
|
+
<%= f.file_field :avatar %>
|
8
|
+
<%= f.hidden_field :avatar_cache %>
|
9
|
+
<span class="help-block">JPG, GIF, or PNG (less than 2MB)</span>
|
10
|
+
</div>
|
11
|
+
</div><!-- .form-group -->
|
12
|
+
|
13
|
+
<div class="col-xs-offset-4 col-xs-8">
|
14
|
+
<div class="checkbox">
|
15
|
+
<%= f.label :remove_avatar do %>
|
16
|
+
<%= f.check_box :remove_avatar %>
|
17
|
+
Delete picture
|
18
|
+
<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>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
21
|
+
<div class="checkbox">
|
22
|
+
<%= f.label :update_directory do %>
|
23
|
+
<%= f.check_box :update_directory %>
|
24
|
+
Refresh directory info
|
25
|
+
<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>
|
26
|
+
<% end %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<div class="form-group">
|
31
|
+
<%= f.label :orcid, class: 'col-xs-4 control-label' do %>
|
32
|
+
<%= orcid_label %>
|
33
|
+
<% end %>
|
34
|
+
<div class="col-xs-8">
|
35
|
+
<%= f.text_field :orcid, class: "form-control" %>
|
36
|
+
</div>
|
37
|
+
</div><!-- .form-group -->
|
38
|
+
|
39
|
+
<div class="form-group">
|
40
|
+
<%= f.label :twitter_handle, '<i class="fa fa-twitter"></i> Twitter Handle'.html_safe, class: 'col-xs-4 control-label' %>
|
41
|
+
<div class="col-xs-8">
|
42
|
+
<%= f.text_field :twitter_handle, class: "form-control" %>
|
43
|
+
</div>
|
44
|
+
</div><!-- .form-group -->
|
45
|
+
|
46
|
+
<div class="form-group">
|
47
|
+
<%= f.label :facebook_handle, '<i class="fa fa-facebook"></i> Facebook Handle'.html_safe, class: 'col-xs-4 control-label' %>
|
48
|
+
<div class="col-xs-8">
|
49
|
+
<%= f.text_field :facebook_handle, class: "form-control" %>
|
50
|
+
</div>
|
51
|
+
</div><!-- .form-group -->
|
52
|
+
|
53
|
+
<div class="form-group">
|
54
|
+
<%= f.label :googleplus_handle, '<i class="fa fa-google-plus"></i> Google+ Handle'.html_safe, class: 'col-xs-4 control-label' %>
|
55
|
+
<div class="col-xs-8">
|
56
|
+
<%= f.text_field :googleplus_handle, class: "form-control" %>
|
57
|
+
</div>
|
58
|
+
</div><!-- .form-group -->
|
59
|
+
|
60
|
+
<%= render partial: 'trophy_edit', locals: {trophies: @trophies} %>
|
61
|
+
|
62
|
+
<%= f.button '<i class="glyphicon glyphicon-save"></i> Save Profile'.html_safe, type: 'submit', class: "btn btn-primary" %>
|
63
|
+
<% end %>
|
64
|
+
</div>
|
65
|
+
<div class="well">
|
66
|
+
<%= render 'dashboard/_index_partials/proxy_rights' %>
|
67
|
+
</div>
|
68
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
<% # override this view to show group membership %>
|
@@ -8,12 +8,10 @@
|
|
8
8
|
<dd>
|
9
9
|
<%= link_to t, sufia.generic_file_path(t) %>
|
10
10
|
<label class="checkbox fleft">
|
11
|
-
<%= check_box_tag "remove_trophy_#{t.
|
11
|
+
<%= check_box_tag "remove_trophy_#{t.id}" %> Yes
|
12
12
|
</label>
|
13
13
|
</dd>
|
14
14
|
<br/>
|
15
15
|
<% end %>
|
16
16
|
</dl>
|
17
17
|
</div>
|
18
|
-
|
19
|
-
|
@@ -1,82 +1,8 @@
|
|
1
|
-
<h1>Edit Profile</h1>
|
1
|
+
<h1 class="col-sm-12">Edit Profile</h1>
|
2
2
|
<div class="col-xs-12 col-sm-5 profile">
|
3
|
-
|
4
|
-
|
5
|
-
<div class="form-group">
|
6
|
-
<%= f.label :avatar, '<i class="glyphicon glyphicon-camera"></i> Change picture'.html_safe, class: "col-xs-4 control-label" %>
|
7
|
-
<div class="col-xs-8">
|
8
|
-
<%= image_tag @user.avatar.url(:thumb) if @user.avatar? %>
|
9
|
-
<%= f.file_field :avatar %>
|
10
|
-
<%= f.hidden_field :avatar_cache %>
|
11
|
-
<span class="help-block">JPG, GIF, or PNG (less than 2MB)</span>
|
12
|
-
</div>
|
13
|
-
</div><!-- .form-group -->
|
14
|
-
|
15
|
-
<div class="col-xs-offset-4 col-xs-8">
|
16
|
-
<div class="checkbox">
|
17
|
-
<%= f.label :remove_avatar do %>
|
18
|
-
<%= f.check_box :remove_avatar %>
|
19
|
-
Delete picture
|
20
|
-
<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>
|
21
|
-
<% end %>
|
22
|
-
</div>
|
23
|
-
<div class="checkbox">
|
24
|
-
<%= f.label :update_directory do %>
|
25
|
-
<%= f.check_box :update_directory %>
|
26
|
-
Refresh directory info
|
27
|
-
<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>
|
28
|
-
<% end %>
|
29
|
-
</div>
|
30
|
-
</div>
|
31
|
-
|
32
|
-
<div class="form-group">
|
33
|
-
<%= f.label :orcid, class: 'col-xs-4 control-label' do %>
|
34
|
-
<%= orcid_label %>
|
35
|
-
<% end %>
|
36
|
-
<div class="col-xs-8">
|
37
|
-
<%= f.text_field :orcid, class: "form-control" %>
|
38
|
-
</div>
|
39
|
-
</div><!-- .form-group -->
|
40
|
-
|
41
|
-
<div class="form-group">
|
42
|
-
<%= f.label :twitter_handle, '<i class="fa fa-twitter"></i> Twitter Handle'.html_safe, class: 'col-xs-4 control-label' %>
|
43
|
-
<div class="col-xs-8">
|
44
|
-
<%= f.text_field :twitter_handle, class: "form-control" %>
|
45
|
-
</div>
|
46
|
-
</div><!-- .form-group -->
|
47
|
-
|
48
|
-
<div class="form-group">
|
49
|
-
<%= f.label :facebook_handle, '<i class="fa fa-facebook"></i> Facebook Handle'.html_safe, class: 'col-xs-4 control-label' %>
|
50
|
-
<div class="col-xs-8">
|
51
|
-
<%= f.text_field :facebook_handle, class: "form-control" %>
|
52
|
-
</div>
|
53
|
-
</div><!-- .form-group -->
|
54
|
-
|
55
|
-
<div class="form-group">
|
56
|
-
<%= f.label :googleplus_handle, '<i class="fa fa-google-plus"></i> Google+ Handle'.html_safe, class: 'col-xs-4 control-label' %>
|
57
|
-
<div class="col-xs-8">
|
58
|
-
<%= f.text_field :googleplus_handle, class: "form-control" %>
|
59
|
-
</div>
|
60
|
-
</div><!-- .form-group -->
|
61
|
-
|
62
|
-
<%= render partial: 'trophy_edit', locals: {trophies: @trophies} %>
|
63
|
-
|
64
|
-
<%= f.button '<i class="glyphicon glyphicon-save"></i> Save Profile'.html_safe, type: 'submit', class: "btn btn-primary" %>
|
65
|
-
<% end %>
|
66
|
-
</div>
|
67
|
-
<div class="well">
|
68
|
-
<%= render partial: 'dashboard/_index_partials/proxy_rights' %>
|
69
|
-
</div>
|
70
|
-
</div><!-- .col-xs-5 /well-->
|
3
|
+
<%= render 'edit_primary' %>
|
4
|
+
</div>
|
71
5
|
|
72
6
|
<div class="col-xs-12 col-sm-offset-1 col-sm-6 well profile">
|
73
|
-
|
74
|
-
<%= render partial: 'user_info', locals: {user: @user} %>
|
75
|
-
|
76
|
-
<hr />
|
77
|
-
|
78
|
-
<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>
|
79
|
-
<% current_user.groups.each do |g| %>
|
80
|
-
<i class="glyphicon glyphicon-asterisk"></i> <%= g %><br />
|
81
|
-
<% end %>
|
7
|
+
<%= render 'edit_secondary' %>
|
82
8
|
</div>
|