Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

Commit

Permalink
Merge pull request #607 from pulibrary/save_notification
Browse files Browse the repository at this point in the history
Add save notifications to File Manager
  • Loading branch information
escowles committed May 19, 2016
2 parents 14d0094 + 784ac71 commit 2f01af2
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ GIT

GIT
remote: git://github.com/projecthydra-labs/curation_concerns.git
revision: d0479c1d9b61bb48a031b395ca40696c6c221e06
revision: 41ce741d4c6175c85cd42eabcf900f80269aef3b
branch: master
specs:
curation_concerns (1.0.0.beta2)
curation_concerns (1.0.0.beta3)
active_attr
active_fedora-noid (~> 1.0)
awesome_nested_set (~> 3.0)
Expand Down
28 changes: 28 additions & 0 deletions app/assets/stylesheets/components/plum_file_manager.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
*[data-action='file-manager'] {
@extend .clearfix;
ul {
.alert-success, .alert-info, .alert-danger {
display: none;
}
&.success {
.alert-success {
display: block;
}
}
&.pending {
.alert-info {
display: block;
}
}
&.failure {
.alert-danger {
display: block;
}
}
li.pending {
.panel {
@extend .panel-info;
}
}
li.failure {
.panel {
@extend .panel-danger;
}
}
&.grid li {
.edit_scanned_resource {
margin-bottom: 114px;
Expand Down
3 changes: 2 additions & 1 deletion app/jobs/ingest_file_job.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class IngestFileJob < ActiveJob::Base
queue_as :ingest
queue_as CurationConcerns.config.ingest_queue_name

# @param [FileSet] file_set
# @param [String] filename
Expand Down Expand Up @@ -27,5 +27,6 @@ def perform(file_set, filename, mime_type, user, relation = 'original_file')

# Do post file ingest actions
CurationConcerns::VersioningService.create(file_set.send(relation.to_sym), user)
CharacterizeJob.perform_later(file_set, filename)
end
end
14 changes: 14 additions & 0 deletions app/views/curation_concerns/base/_file_manager_members.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<ul id="sortable" data-id="<%= @presenter.id %>" data-class-name="<%= @presenter.model_name.plural %>" data-singular-class-name="<%= @presenter.model_name.singular %>" class="list-unstyled grid clearfix">
<div class="alert alert-success" role="alert">
Reordered Successfully
</div>
<div class="alert alert-info" role="alert">
Reordering...
</div>
<div class="alert alert-danger" role="alert">
Reordering Failed. Please save again.
</div>
<% @presenter.file_presenters.each do |member| %>
<%= render "file_manager_member", node: member %>
<% end %>
</ul>
2 changes: 1 addition & 1 deletion app/views/curation_concerns/base/_iiif_fields.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="well">
<%= simple_form_for [main_app, @presenter], remote: true, html: { id: 'resource-form' } do |f| %>
<%= simple_form_for [main_app, @presenter], remote: true, html: { id: 'resource-form', 'data-type': 'json' } do |f| %>
<% directions = ['left-to-right', 'right-to-left', 'top-to-bottom', 'bottom-to-top'] %>
<% selected_direction = @presenter.viewing_direction || directions.first %>
<div>
Expand Down

0 comments on commit 2f01af2

Please sign in to comment.