abstractor 2.1.0 → 2.1.01
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YmUyMzBmNjgwNGM2MGZhMjBiMjI2YzQ4ODIyYjM2YzRlMWVlMWM1Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YmM5ZWE3ZDhhMTY1NzEzMjM0NjQyODEzMzNmNWZmYmU2NTQyYzU1NA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjMwNjNhMGQzNjY4MGQwZThmZDVkZjhiMTBjMWM1NGI1ZmFkMGYzZjFmNWU5
|
10
|
+
OTgyMzUzMjFiZjE0YjRkMTQwNzdmMzU0NTdmZTQwOTYwOTU5ZWVmNjA0YTk2
|
11
|
+
NzAwMjNmNWFmMWU2MDdhMzUxOTk5ZjQ2Mzc0MzAzYjhjOTViYjY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjZmMjA3MDQ4NDUzZWFlMDA0Mjc1NzcwZmFhOTBiNGUxYjQ4YmY5YzVkNDg2
|
14
|
+
N2RmYzU0YTg2ZWY2NGEzYjFmYWEzNTdkMjZmMDdkNDkwZDY5OTQ4N2NiNTAy
|
15
|
+
ZGY4MzRkMGQzZmZkYTY2MDIyNzFhZjBjNjBiNjllZDRhOGM0M2E=
|
@@ -46,12 +46,13 @@
|
|
46
46
|
- abstraction_sources = abstractor_abstraction.abstractor_subject.abstractor_abstraction_sources.select { |s| s.abstractor_abstraction_source_type.name != 'indirect' }
|
47
47
|
- abstraction_sources.each do |abstraction_source|
|
48
48
|
- abstraction_source.normalize_from_method_to_sources(abstractor_abstraction.about).each do |source|
|
49
|
-
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
49
|
+
- if source[:source_type] && source[:source_id] && source[:source_method]
|
50
|
+
- dom_id = "#{abstraction_source.id}_#{source[:source_type]}_#{source[:source_id]}_#{source[:source_method]}"
|
51
|
+
%span{ :class => 'abstractor_abstraction_source_tooltip_img label', :rel =>"#abstraction_text_#{dom_id}", :title => "#{source[:source_type].to_s} #{source[:source_method]}"}
|
52
|
+
= image_tag('abstractor/page.png', :id => "abstraction_text_link_#{dom_id}")
|
53
|
+
%br
|
54
|
+
%div{ :id => "abstraction_text_#{dom_id}", :class => 'tooltip'}
|
55
|
+
= simple_format(source[:source_type].find(source[:source_id]).send(source[:source_method]))
|
55
56
|
.column-4
|
56
57
|
= f.submit 'Save', :class => 'button positive'
|
57
58
|
= link_to 'Cancel', abstractor_abstraction, :class => 'button negative', :remote => true
|
@@ -60,9 +60,9 @@ module Abstractor
|
|
60
60
|
def abstractor_abstractions_by_abstractor_abstraction_status(abstractor_abstraction_status)
|
61
61
|
case abstractor_abstraction_status
|
62
62
|
when 'needs_review'
|
63
|
-
abstractor_abstractions.select { |abstractor_abstraction| abstractor_abstraction.value.blank? && abstractor_abstraction.unknown.blank? && abstractor_abstraction.not_applicable.blank? }
|
63
|
+
abstractor_abstractions.not_deleted.select { |abstractor_abstraction| abstractor_abstraction.value.blank? && abstractor_abstraction.unknown.blank? && abstractor_abstraction.not_applicable.blank? }
|
64
64
|
when 'reviewed'
|
65
|
-
abstractor_abstractions.select { |abstractor_abstraction| !abstractor_abstraction.value.blank? || !abstractor_abstraction.unknown.blank? || !abstractor_abstraction.not_applicable.blank? }
|
65
|
+
abstractor_abstractions.not_deleted.select { |abstractor_abstraction| !abstractor_abstraction.value.blank? || !abstractor_abstraction.unknown.blank? || !abstractor_abstraction.not_applicable.blank? }
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
@@ -100,9 +100,9 @@ module Abstractor
|
|
100
100
|
def by_abstractor_abstraction_status(abstractor_abstraction_status)
|
101
101
|
case abstractor_abstraction_status
|
102
102
|
when 'needs_review'
|
103
|
-
where(["EXISTS (SELECT 1 FROM abstractor_abstractions aa WHERE aa.about_type = '#{self.to_s}' AND #{self.table_name}.id = aa.about_id AND (aa.value IS NULL OR aa.value = '') AND (aa.unknown IS NULL OR aa.unknown = ?) AND (aa.not_applicable IS NULL OR aa.not_applicable = ?))", false, false])
|
103
|
+
where(["EXISTS (SELECT 1 FROM abstractor_abstractions aa WHERE aa.deleted_at IS NULL AND aa.about_type = '#{self.to_s}' AND #{self.table_name}.id = aa.about_id AND (aa.value IS NULL OR aa.value = '') AND (aa.unknown IS NULL OR aa.unknown = ?) AND (aa.not_applicable IS NULL OR aa.not_applicable = ?))", false, false])
|
104
104
|
when 'reviewed'
|
105
|
-
where(["EXISTS (SELECT 1 FROM abstractor_abstractions aa WHERE aa.about_type = '#{self.to_s}' AND #{self.table_name}.id = aa.about_id) AND NOT EXISTS (SELECT 1 FROM abstractor_abstractions aa WHERE aa.about_type = '#{self.to_s}' AND #{self.table_name}.id = aa.about_id AND COALESCE(aa.value, '') = '' AND COALESCE(aa.unknown, ?) != ? AND COALESCE(aa.not_applicable, ?) != ?)", false, true, false, true])
|
105
|
+
where(["EXISTS (SELECT 1 FROM abstractor_abstractions aa WHERE aa.deleted_at IS NULL AND aa.about_type = '#{self.to_s}' AND #{self.table_name}.id = aa.about_id) AND NOT EXISTS (SELECT 1 FROM abstractor_abstractions aa WHERE aa.deleted_at IS NULL AND aa.about_type = '#{self.to_s}' AND #{self.table_name}.id = aa.about_id AND COALESCE(aa.value, '') = '' AND COALESCE(aa.unknown, ?) != ? AND COALESCE(aa.not_applicable, ?) != ?)", false, true, false, true])
|
106
106
|
else
|
107
107
|
where(nil)
|
108
108
|
end
|
data/lib/abstractor/version.rb
CHANGED