curation_concerns-models 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f40b99078f83355f035554d22016e711b0b0f379
|
|
4
|
+
data.tar.gz: 79c5dd9cafdd3fa8da3f3407ccd3e9a1ea672a03
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f807e2358bf89d3af2ffb667fbd5740e389f202b4ff7d85e908065871f66072870b6d82c006407ad564e3b491b9b197f471c4434ed9e3d96b185bc398403110f
|
|
7
|
+
data.tar.gz: 7cf972fb99dd8b58fb79ca6b4ccc12bcc8d60637aa0e50a5ace6178762644a7a110407ec8616b2344fab135ee90dfa9dca8a7c12f4e5f207aa095c62b8291b04
|
|
@@ -12,7 +12,7 @@ module CurationConcerns::WorkActorBehavior
|
|
|
12
12
|
|
|
13
13
|
def update
|
|
14
14
|
add_to_collections(attributes.delete(:collection_ids)) &&
|
|
15
|
-
interpret_visibility && super && attach_files
|
|
15
|
+
interpret_visibility && apply_order(attributes.delete(:ordered_member_ids)) && super && attach_files
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
delegate :visibility_changed?, to: :curation_concern
|
|
@@ -35,6 +35,20 @@ module CurationConcerns::WorkActorBehavior
|
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
+
def apply_order(new_order)
|
|
39
|
+
return true unless new_order
|
|
40
|
+
curation_concern.ordered_member_proxies.each_with_index do |proxy, index|
|
|
41
|
+
unless new_order[index]
|
|
42
|
+
proxy.prev.next = curation_concern.ordered_member_proxies.last.next
|
|
43
|
+
break
|
|
44
|
+
end
|
|
45
|
+
proxy.proxy_for = ActiveFedora::Base.id_to_uri(new_order[index])
|
|
46
|
+
proxy.target = nil
|
|
47
|
+
end
|
|
48
|
+
curation_concern.list_source.order_will_change!
|
|
49
|
+
true
|
|
50
|
+
end
|
|
51
|
+
|
|
38
52
|
# The default behavior of active_fedora's aggregates association,
|
|
39
53
|
# when assigning the id accessor (e.g. collection_ids = ['foo:1']) is to add
|
|
40
54
|
# to new collections, but not remove from old collections.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: curation_concerns-models
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Coyne
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-02-
|
|
11
|
+
date: 2016-02-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: active_attr
|