abstractor 4.0.1 → 4.0.2

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
- ODI2YTMwYzQzYWNkM2RkYmMwNDQyNTVlMzJhMWM5ZGVlYTRiN2NmNw==
4
+ NmFjZjhkYzhlZWVkZGI1M2Q2YWZkNmUxNTk2OGZjMDljMzc5NWNjNA==
5
5
  data.tar.gz: !binary |-
6
- ZjE0MDk4NzdkNzE2YjM2MjUyM2VjODgxMzAzZGE5Y2U4MzI3OGQwMw==
6
+ NzNmMzg2ZTI1Mjc3ZTU2MjI1YmEyNjE3NjVlMTRhMmU0YWIzZjI2Mw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2EzZDU0N2ZhNWRhMWQwYjk4NmM4MjI3MzE0M2Y3Mjc3MTc3ZWRkYTY4NDM5
10
- MzgxZGU0YWIwMmEwZDQxM2FhMjE0Njc0NjE0N2Y3NjM1ODk5YmNjYjRkMzFl
11
- MDEwNjYzYjBlYWZmMmZhYTVhZWM1YWI3MGI3MWI0MzQ3MDJlOWI=
9
+ MDEwYzc1NWM5MDZjMDYwMGIxZjY1OGQ2NGU2ZGU4MzUxYmE4MTllYTkwYTg3
10
+ ZWYzNjE3YTBkNTVmMzY2MjczZGZiMGMxZTQ1MzVhNjljMjA1MjQwNWIyMTVm
11
+ ZTg3OGI4YWU0YjA3OGE5NzkxYjI2YjZlZTFkNGY2ZGNhYjM1YzA=
12
12
  data.tar.gz: !binary |-
13
- NzJmMjZiMjc5ZDkwMDg5ZDkxNmI5YzYwMGRlYjFlNDc2OTk3OTYyNGM5ZTg5
14
- MzkzYzcyMzg2MDMwOTZhMzA1NzNhMzNmZDU5MGVhZmFjNDkwMDIzODhhZTEz
15
- OGFlZGFmYmUxYTc5MTllMDkyZGQ2OGZhNjE4M2NiNmU5NDNiMGE=
13
+ NDMyM2FkYTAwYjQ4ZDc2MGY5NmU4OTM1MzQxNDhhNWEyZmZiZTE3MTFmOTQx
14
+ NmRmOGZiNTQzOGI4YTVmMWQ2MDg5YWM4MWQyNmYzMWRjYTQxZDg1ODI0NWYx
15
+ YzQ4MTlmNmQyMzI4NTI3ZThkNjk0YTQ0ODI1MDQzOTk3NjgxMGM=
@@ -51,146 +51,53 @@
51
51
  margin: 0.1em 0 0.25em !important;
52
52
  }
53
53
 
54
- .abstractor_abstractions fieldset .column-1-5 {
55
- display: inline;
56
- float: left;
57
- margin-right: 10px;
58
- width: 62.625px;
59
- }
60
-
61
- * html .abstractor_abstractions fieldset .column-1-5 {
62
- overflow-x: hidden;
63
- }
64
-
65
- .abstractor_abstractions fieldset .column-1 {
66
- display: inline;
67
- float: left;
68
- margin-right: 10px;
69
- width: 38.41667px;
70
- }
71
-
72
- * html .abstractor_abstractions fieldset .column-1 {
73
- overflow-x: hidden;
74
- }
75
-
76
- .abstractor_abstractions fieldset .column-2 {
77
- display: inline;
78
- float: left;
79
- margin-right: 10px;
80
- width: 86.83333px;
81
- }
82
-
83
- * html .abstractor_abstractions fieldset .column-2 {
84
- overflow-x: hidden;
85
- }
86
-
87
- .abstractor_abstractions fieldset .column-3 {
54
+ .abstractor_abstractions fieldset .abstractor_abstraction_schema_name,
55
+ .abstractor_abstractions fieldset .abstractor_suggestion_status,
56
+ .abstractor_abstractions fieldset .abstractor_suggestion_sources {
88
57
  display: inline;
89
58
  float: left;
90
59
  margin-right: 10px;
91
60
  width: 135.25px;
92
61
  }
93
62
 
94
- * html .abstractor_abstractions fieldset .column-3 {
95
- overflow-x: hidden;
96
- }
97
-
98
- .abstractor_abstractions fieldset .column-4 {
63
+ .abstractor_abstractions fieldset .abstraction_edit_abstraction_actions {
99
64
  display: inline;
100
65
  float: left;
101
66
  margin-right: 10px;
102
67
  width: 183.66667px;
103
68
  }
104
69
 
105
- * html .abstractor_abstractions fieldset .column-4 {
106
- overflow-x: hidden;
107
- }
108
-
109
- .abstractor_abstractions fieldset .column-5 {
70
+ .abstractor_abstractions fieldset .abstractor_abstraction_value,
71
+ .abstractor_abstractions fieldset .abstractor_suggestion_values {
110
72
  display: inline;
111
73
  float: left;
112
74
  margin-right: 10px;
113
75
  width: 232.08333px;
114
76
  }
115
77
 
116
- * html .abstractor_abstractions fieldset .column-5 {
117
- overflow-x: hidden;
118
- }
119
78
 
120
- .abstractor_abstractions fieldset .column-6 {
121
- display: inline;
122
- float: left;
123
- margin-right: 10px;
124
- width: 280.5px;
125
- }
126
-
127
- * html .abstractor_abstractions fieldset .column-6 {
128
- overflow-x: hidden;
129
- }
130
-
131
- .abstractor_abstractions fieldset .column-7 {
79
+ .abstractor_abstractions fieldset .abstraction_edit_abstraction_value {
132
80
  display: inline;
133
81
  float: left;
134
82
  margin-right: 10px;
135
83
  width: 328.91667px;
136
84
  }
137
85
 
138
- * html .abstractor_abstractions fieldset .column-7 {
139
- overflow-x: hidden;
140
- }
141
-
142
- .abstractor_abstractions fieldset .column-8 {
143
- display: inline;
144
- float: left;
145
- margin-right: 10px;
146
- width: 377.33333px;
147
- }
148
-
149
- * html .abstractor_abstractions fieldset .column-8 {
150
- overflow-x: hidden;
151
- }
152
-
153
- .abstractor_abstractions fieldset .column-9 {
86
+ .abstractor_abstractions fieldset .abstractor_suggestions {
154
87
  display: inline;
155
88
  float: left;
156
89
  margin-right: 10px;
157
90
  width: 425.75px;
158
91
  }
159
92
 
160
- * html .abstractor_abstractions fieldset .column-9 {
161
- overflow-x: hidden;
162
- }
163
-
164
- .abstractor_abstractions fieldset .column-10 {
165
- display: inline;
166
- float: left;
167
- margin-right: 10px;
168
- width: 474.16667px;
169
- }
170
-
171
- * html .abstractor_abstractions fieldset .column-10 {
172
- overflow-x: hidden;
173
- }
174
-
175
- .abstractor_abstractions fieldset .column-11 {
176
- display: inline;
177
- float: left;
178
- margin-right: 10px;
179
- width: 522.58333px;
180
- }
181
-
182
- * html .abstractor_abstractions fieldset .column-11 {
183
- overflow-x: hidden;
184
- }
185
-
186
- .abstractor_abstractions fieldset .column-12 {
187
- display: inline;
188
- float: left;
189
- margin-right: 10px;
190
- width: 571px;
191
- }
192
-
193
- * html .abstractor_abstractions fieldset .column-12 {
93
+ * html .abstractor_abstractions fieldset .abstractor_abstraction_schema_name,
94
+ * html .abstractor_abstractions fieldset .abstractor_suggestion_status,
95
+ * html .abstractor_abstractions fieldset .abstractor_suggestion_sources,
96
+ * html .abstractor_abstractions fieldset .abstraction_edit_abstraction_actions,
97
+ * html .abstractor_abstractions fieldset .abstractor_abstraction_value,
98
+ * html .abstractor_abstractions fieldset .abstractor_suggestion_values,
99
+ * html .abstractor_abstractions fieldset .abstraction_edit_abstraction_value,
100
+ * html .abstractor_abstractions fieldset .abstractor_suggestions {
194
101
  overflow-x: hidden;
195
102
  }
196
103
 
@@ -198,7 +105,7 @@
198
105
  clear: both;
199
106
  }
200
107
 
201
- .abstractor_abstractions fieldset .abstraction_schema_name {
108
+ .abstractor_abstractions fieldset .abstractor_abstraction_schema_name {
202
109
  font-weight: bold;
203
110
  margin-bottom: 0.3em;
204
111
  }
@@ -230,8 +137,18 @@
230
137
  margin-right: .5em;
231
138
  }
232
139
 
233
- .abstractor_abstractions fieldset .abstractor_abstraction_source_tooltip_img img {
140
+ .abstractor_abstractions fieldset .abstractor_abstraction_source_tooltip_img {
141
+ margin-left: 5px;
142
+ }
143
+ .abstractor_abstractions fieldset .abstractor_abstraction_source_tooltip_img i {
144
+ background: url('page.png') no-repeat;
234
145
  vertical-align: text-bottom;
146
+ padding: 2px 10px;
147
+ vertical-align: middle;
148
+ }
149
+
150
+ .abstractor_abstractions fieldset .abstractor_abstraction_source_tooltip_img i.abstraction_text_link_match {
151
+ background: url('page_green.png') no-repeat;
235
152
  }
236
153
 
237
154
  .abstractor_abstractions fieldset .hidden {
@@ -253,15 +170,9 @@
253
170
  ul.ui-autocomplete, .ui-dialog {
254
171
  z-index: 1000 !important;
255
172
  }
256
- .abstractor_abstractions hr {
257
- background: #dddddd;
258
- color: #dddddd;
259
- clear: both;
260
- float: none;
261
- width: 100%;
262
- height: 0.1em;
263
- margin: 0 0 1.45em;
264
- border: none;
173
+ .abstractor_bottom_border {
174
+ border-bottom: 1px solid #dddddd;
175
+ overflow: auto;
265
176
  }
266
177
 
267
178
  /* Tooltips */
@@ -324,7 +235,7 @@ span.tooltip_img {
324
235
  font-style:italic
325
236
  }
326
237
 
327
- .abstractor_abstraction_actions {
238
+ .abstractor_abstraction_actions a{
328
239
  float: right;
329
240
  }
330
241
  .abstractor_abstraction_actions a {
@@ -357,4 +268,16 @@ span.tooltip_img {
357
268
 
358
269
  .abstractor_suggestion_values .custom_explanation label {
359
270
  font-weight: bold !important;
360
- }
271
+ }
272
+ ul.abstractor_suggestion_status_group {
273
+ list-style: none;
274
+ margin: 0;
275
+ padding: 0;
276
+ }
277
+ .abstractor_abstractions_header,
278
+ .abstractor_abstraction_group_member,
279
+ .abstractor_abstraction_group_actions {
280
+ border-bottom: 1px solid #dddddd;
281
+ overflow: auto;
282
+ padding-bottom: 0.25em;
283
+ }
@@ -1,13 +1,13 @@
1
1
  - abstractor_abstraction_group ||= @abstractor_abstraction_group
2
2
 
3
3
  .abstractor_abstraction_group
4
- - abstractor_abstraction_group.abstractor_abstractions.not_deleted.joins(:abstractor_subject => :abstractor_subject_group_member).order('abstractor_subject_group_members.display_order').each do |abstractor_abstraction|
5
- %div{ class: "abstractor_abstraction #{Abstractor::Utility.dehumanize(abstractor_abstraction.abstractor_subject.abstractor_abstraction_schema.predicate)}" }
6
- = render :partial => 'abstractor/abstractor_abstractions/fields', :locals => {:abstractor_abstraction => abstractor_abstraction}
7
-
8
- .abstractor_abstraction_actions
4
+ .abstractor_abstraction_group_member
5
+ - abstractor_abstractions = abstractor_abstraction_group.abstractor_abstractions.not_deleted.joins(:abstractor_subject => :abstractor_subject_group_member).order('abstractor_subject_group_members.display_order')
6
+ - abstractor_abstractions.each_with_index do |abstractor_abstraction, index|
7
+ %div{ class: "abstractor_abstraction #{Abstractor::Utility.dehumanize(abstractor_abstraction.abstractor_subject.abstractor_abstraction_schema.predicate)} #{'abstractor_bottom_border' if index < abstractor_abstractions.length - 1}" }
8
+ = render :partial => 'abstractor/abstractor_abstractions/fields', :locals => {:abstractor_abstraction => abstractor_abstraction}
9
+ .abstractor_abstraction_group_actions.abstractor_abstraction_actions
9
10
  = link_to 'Not applicable group ', Abstractor::UserInterface.abstractor_relative_path(abstractor.abstractor_abstraction_group_path(abstractor_abstraction_group, abstractor_abstraction_value: 'not applicable')), data: { confirm: 'Are you sure?'} , method: :put, class: "abstractor_group_not_applicable_all_link", remote: true
10
11
  = link_to 'Unknown group ', Abstractor::UserInterface.abstractor_relative_path(abstractor.abstractor_abstraction_group_path(abstractor_abstraction_group, abstractor_abstraction_value: 'unknown')), data: { confirm: 'Are you sure?'}, method: :put, class: 'abstractor_group_unknown_all_link', remote: true
11
12
  - if abstractor_abstraction_group.removable?
12
- = link_to 'Delete group', Abstractor::UserInterface.abstractor_relative_path(abstractor.abstractor_abstraction_group_path(abstractor_abstraction_group)), data: { confirm: 'Are you sure?'}, method: :delete, class: "abstractor_group_delete_link", remote: true
13
- %hr
13
+ = link_to 'Delete group', Abstractor::UserInterface.abstractor_relative_path(abstractor.abstractor_abstraction_group_path(abstractor_abstraction_group)), data: { confirm: 'Are you sure?'}, method: :delete, class: "abstractor_group_delete_link", remote: true
@@ -0,0 +1,17 @@
1
+ - if versions.any?
2
+ %br
3
+ %b History:
4
+ - versions.each do |version|
5
+ .version
6
+ .version_date
7
+ %i
8
+ Date:
9
+ = version.created_at.to_date.to_s(:date)
10
+ .version_value
11
+ %i
12
+ Value:
13
+ = version.reify.display_value
14
+ .version_user
15
+ %i
16
+ User:
17
+ = version.originator
@@ -6,41 +6,23 @@
6
6
  - about = abstractor_abstraction.about
7
7
 
8
8
  .abstractor_abstraction_display
9
- .column-3
10
- .abstraction_schema_name
11
- = abstractor_abstraction_schema.display_name
12
- .column-5
13
- .abstractor_abstraction_value
14
- - if rejected_suggestions.length == abstractor_suggestions.length
15
- %span.editable_abstraction
16
- = abstractor_abstraction.display_value
17
- = link_to 'edit', Abstractor::UserInterface.abstractor_relative_path(abstractor.edit_abstractor_abstraction_path(abstractor_abstraction)), :class=>'icon_link edit_link'
18
- - else
9
+ .abstractor_abstraction_schema_name
10
+ = abstractor_abstraction_schema.display_name
11
+ .abstractor_abstraction_value
12
+ - if rejected_suggestions.length == abstractor_suggestions.length
13
+ %span.editable_abstraction
19
14
  = abstractor_abstraction.display_value
20
- - versions = abstractor_abstraction.versions.sort{|a,b| b.created_at <=> a.created_at}.reject{|v| v.reify.blank? || v.reify.display_value =~ /not set/i}
21
- - if versions.any?
22
- %br
23
- %b History:
24
- - versions.each do |version|
25
- .version
26
- .version_date
27
- %i
28
- Date:
29
- = "#{version.created_at.to_date.to_s(:date)}"
30
- .version_value
31
- %i
32
- Value:
33
- = "#{version.reify.display_value}"
34
- .version_user
35
- %i
36
- User:
37
- = "#{version.originator}"
38
- - if abstractor_suggestions.any?
39
- .column-9
40
- - abstractor_suggestions.each do |abstractor_suggestion|
41
- = form_for [abstractor_abstraction, abstractor_suggestion], url: Abstractor::UserInterface.abstractor_relative_path(abstractor.abstractor_abstraction_abstractor_suggestion_path(abstractor_abstraction, abstractor_suggestion)), method: :put, remote: true, html: { class: 'edit_abstractor_suggestion' } do |f|
42
- = render 'abstractor/shared/error_messages', :object => f.object
43
- .column-5
15
+ = link_to 'edit', Abstractor::UserInterface.abstractor_relative_path(abstractor.edit_abstractor_abstraction_path(abstractor_abstraction)), :class=>'icon_link edit_link'
16
+ - else
17
+ = abstractor_abstraction.display_value
18
+ - versions = abstractor_abstraction.versions.sort{|a,b| b.created_at <=> a.created_at}.reject{|v| v.reify.blank? || v.reify.display_value =~ /not set/i}
19
+ = render partial: 'abstractor/abstractor_abstractions/abstraction_history', locals: { versions: versions }
20
+ .abstractor_suggestions
21
+ - if abstractor_suggestions.any?
22
+ - abstractor_suggestions.each_with_index do |abstractor_suggestion, index|
23
+ .abstractor_suggestion{ class: "#{'abstractor_bottom_border' if index < abstractor_suggestions.length - 1}"}
24
+ = form_for [abstractor_abstraction, abstractor_suggestion], url: Abstractor::UserInterface.abstractor_relative_path(abstractor.abstractor_abstraction_abstractor_suggestion_path(abstractor_abstraction, abstractor_suggestion)), method: :put, remote: true, html: { class: 'edit_abstractor_suggestion' } do |f|
25
+ = render 'abstractor/shared/error_messages', object: f.object
44
26
  .abstractor_suggestion_values
45
27
  = abstractor_suggestion.display_value
46
28
  - if abstractor_suggestion.abstractor_suggestion_sources.any?
@@ -48,38 +30,37 @@
48
30
  - source_about = abstractor_suggestion_source.source_type.constantize.find(abstractor_suggestion_source.source_id)
49
31
  - from_method = abstractor_suggestion_source.source_method
50
32
  - if from_method && source_about.respond_to?(from_method)
51
- %span{ :class => 'abstractor_abstraction_source_tooltip_img', :rel => "#abstraction_text_#{abstractor_suggestion_source.id}", :title => "#{source_about.class.to_s} #{from_method}"}
52
- = image_tag('abstractor/page.png', :id => "abstraction_text_link_#{abstractor_suggestion_source.id}")
53
- %div{ :id => "abstraction_text_#{abstractor_suggestion_source.id}", :class => 'abstractor_abstraction_source_tooltip'}
54
- - abstractable_from_column = source_about.send(from_method)
55
- - unless abstractable_from_column.nil?
56
- - if abstractor_suggestion_source.sentence_match_value
57
- = Abstractor::UserInterface.highlight(simple_format(abstractable_from_column.clone), abstractor_suggestion_source.sentence_match_value.strip)
58
- - else
59
- = simple_format(abstractable_from_column.clone)
33
+ - abstractable_from_column = source_about.send(from_method)
34
+ - has_text_match = abstractable_from_column && abstractor_suggestion_source.sentence_match_value
35
+ %span{ class: 'abstractor_abstraction_source_tooltip_img', rel: "#abstraction_text_#{abstractor_suggestion_source.id}", title: "#{source_about.class.to_s} #{from_method}"}
36
+ %i{ id: "abstraction_text_link_#{abstractor_suggestion_source.id}", class: "#{'abstraction_text_link_match' if has_text_match}" }
37
+ %div{ id: "abstraction_text_#{abstractor_suggestion_source.id}", class: 'abstractor_abstraction_source_tooltip'}
38
+ - if has_text_match
39
+ = Abstractor::UserInterface.highlight(simple_format(abstractable_from_column.clone), abstractor_suggestion_source.sentence_match_value.strip)
40
+ - else
41
+ = simple_format(abstractable_from_column.clone)
60
42
  - if abstractor_suggestion_source.custom_explanation
61
43
  .custom_explanation
62
44
  %label
63
45
  Explanation:
64
46
  .explanation_text
65
47
  = abstractor_suggestion_source.custom_explanation
66
- .column-3
67
- - values = Abstractor::AbstractorSuggestionStatus.all.sort_by(&:name).map{|s| [s.name, s.id] }
68
- - values.each do |value|
69
- - id = "abstractor_suggestion_abstractor_suggestion_status_id_#{value.last}_#{abstractor_suggestion.id}"
70
- = f.radio_button :abstractor_suggestion_status_id, value.last, id: id, class: 'abstractor_suggestion_status_selection'
71
- = f.label :abstractor_suggestion_status_id, value.first, value: value.last, for: id
72
- %br
73
- = f.radio_button :abstractor_suggestion_status_id, '', {:style => 'display:none;' }
74
- %hr
75
- - else
76
- .column-9
48
+ .abstractor_suggestion_status
49
+ %ul.abstractor_suggestion_status_group
50
+ - values = Abstractor::AbstractorSuggestionStatus.all.sort_by(&:name).map{|s| [s.name, s.id] }
51
+ - values.each do |value|
52
+ - id = "abstractor_suggestion_abstractor_suggestion_status_id_#{value.last}_#{abstractor_suggestion.id}"
53
+ %li
54
+ = f.radio_button :abstractor_suggestion_status_id, value.last, id: id, class: 'abstractor_suggestion_status_selection'
55
+ = f.label :abstractor_suggestion_status_id, value.first, value: value.last, for: id, class: "abstractor_suggestion_status_selection_label #{f.object.abstractor_suggestion_status_id == value.last ? 'abstractor_suggestion_status_selection_label_active' : 'abstractor_suggestion_status_selection_label_inactive' }"
56
+ = f.radio_button :abstractor_suggestion_status_id, '', { style: 'display:none;' }
57
+ - else
77
58
  - abstractor_abstraction.abstractor_subject.abstractor_abstraction_sources.select { |s| s.abstractor_abstraction_source_type.name == 'nlp suggestion' }.each do |abstractor_abstraction_source|
78
59
  - abstractor_abstraction_source.normalize_from_method_to_sources(abstractor_abstraction.about).each do |source|
79
60
  - dom_id = "#{abstractor_abstraction_source.id}_#{source[:source_type]}_#{source[:source_id]}_#{source[:source_method]}"
80
- %span{ :class => 'abstractor_abstraction_source_tooltip_img', :rel =>"#abstraction_text_#{dom_id}", :title => "#{source[:source_type].to_s} #{source[:source_method]}"}
81
- = image_tag('abstractor/page.png', :id => "abstraction_text_link_#{dom_id}")
61
+ %span{ class: 'abstractor_abstraction_source_tooltip_img', rel: "#abstraction_text_#{dom_id}", title: "#{source[:source_type].to_s} #{source[:source_method]}"}
62
+ %i{ id: "abstraction_text_link_#{dom_id}" }
82
63
  %br
83
- %div{ :id => "abstraction_text_#{dom_id}", :class => 'tooltip'}
64
+ %div{ id: "abstraction_text_#{dom_id}", class: 'tooltip'}
84
65
  = simple_format(source[:source_type].find(source[:source_id]).send(source[:source_method]))
85
66
  .clear
@@ -0,0 +1,23 @@
1
+ .abstractor_abstractions_grouped
2
+ - abstractor_subject_groups = about.class.abstractor_subject_groups(namespace_type: namespace_type, namespace_id: namespace_id)
3
+ - abstractor_subject_groups.each do |abstractor_subject_group|
4
+ .abstractor_subject_groups_container
5
+ %b= abstractor_subject_group.name
6
+ %fieldset
7
+ .abstractor_abstractions_header
8
+ .abstractor_abstraction_schema_name
9
+ %b Name
10
+ .abstractor_abstraction_value
11
+ %b Value
12
+ .abstractor_suggestions
13
+ .abstractor_suggestion_values
14
+ %b Suggestions
15
+ .abstractor_suggestion_status
16
+ %b Status
17
+ .clear
18
+ .abstractor_abstractions_body.abstractor_subject_groups
19
+ - abstractor_abstraction_groups = about.abstractor_abstraction_groups_by_namespace(namespace_type: namespace_type, namespace_id: namespace_id, abstractor_subject_group_id: abstractor_subject_group.id)
20
+ - abstractor_abstraction_groups.each do |abstractor_abstraction_group|
21
+ = render partial: 'abstractor/abstractor_abstraction_groups/form', locals: {abstractor_abstraction_group: abstractor_abstraction_group}
22
+ = link_to 'Add group', Abstractor::UserInterface.abstractor_relative_path(abstractor.abstractor_abstraction_groups_path(about_id: about.id, about_type: about.class.name, abstractor_subject_group_id: abstractor_subject_group.id)), data: { confirm: 'Are you sure?'}, method: :post, class: 'abstractor_group_add_link', remote: true
23
+ .clear
@@ -1,43 +1,12 @@
1
1
  - about ||= @about
2
2
  - namespace_type ||= @namespace_type
3
3
  - namespace_id ||= @namespace_id
4
+
4
5
  .abstractor_abstractions
5
6
  = link_to 'Not applicable all', Abstractor::UserInterface.abstractor_relative_path(abstractor.update_all_abstractor_abstractions_path(about_type: about.class, about_id: about.id, abstractor_abstraction_value: 'not applicable')), data: { confirm: 'Are you sure?'}, method: :put, class: 'abstractor_not_applicable_all_link'
6
7
  = link_to 'Unknown all', Abstractor::UserInterface.abstractor_relative_path(abstractor.update_all_abstractor_abstractions_path(about_type: about.class, about_id: about.id, abstractor_abstraction_value: 'unknown')), data: { confirm: 'Are you sure?'}, method: :put, class: 'abstractor_unknown_all_link'
7
- - abstractor_subject_groups = about.class.abstractor_subject_groups(namespace_type: namespace_type, namespace_id: namespace_id)
8
- - abstractor_subject_groups.each do |abstractor_subject_group|
9
- .abstractor_subject_groups_container
10
- %b= abstractor_subject_group.name
11
- %fieldset
12
- .column-3
13
- %b Name
14
- .column-5
15
- %b Value
16
- .column-5
17
- %b Suggestions
18
- .column-3
19
- %b Status
20
- %hr
21
- .abstractor_subject_groups
22
- - abstractor_abstraction_groups = about.abstractor_abstraction_groups_by_namespace(namespace_type: namespace_type, namespace_id: namespace_id, abstractor_subject_group_id: abstractor_subject_group.id)
23
- - abstractor_abstraction_groups.each_with_index do |abstractor_abstraction_group, index|
24
- = render partial: 'abstractor/abstractor_abstraction_groups/form', locals: {abstractor_abstraction_group: abstractor_abstraction_group}
25
- = link_to 'Add group', Abstractor::UserInterface.abstractor_relative_path(abstractor.abstractor_abstraction_groups_path(about_id: about.id, about_type: about.class.name, abstractor_subject_group_id: abstractor_subject_group.id)), data: { confirm: 'Are you sure?'}, method: :post, class: 'abstractor_group_add_link', remote: true
26
- .clear
27
- - ungrouped_subjects = about.class.abstractor_subjects(grouped: false, namespace_type: namespace_type, namespace_id: namespace_id)
28
- - if ungrouped_subjects.any?
29
- %fieldset
30
- .column-3
31
- %b Name
32
- .column-5
33
- %b Value
34
- .column-5
35
- %b Suggestions
36
- .column-3
37
- %b Status
38
- %hr
39
- - ungrouped_subjects.each do |ungrouped_subject|
40
- - ungrouped_subject.abstractor_abstractions.not_deleted.where(:about_id => about.id).each do |abstractor_abstraction|
41
- %div{ class: "abstractor_abstraction #{Abstractor::Utility.dehumanize(abstractor_abstraction.abstractor_subject.abstractor_abstraction_schema.predicate)}" }
42
- = render :partial => 'abstractor/abstractor_abstractions/fields', :locals => {:abstractor_abstraction => abstractor_abstraction}
8
+
9
+ = render partial: 'abstractor/abstractor_abstractions/grouped_abstractions_list', locals: { about: about, namespace_type: namespace_type, namespace_id: namespace_id}
10
+ = render partial: 'abstractor/abstractor_abstractions/ungrouped_abstractions_list', locals: { about: about, namespace_type: namespace_type, namespace_id: namespace_id}
11
+
43
12
  #abstractor_abstraction_dialog_tooltip
@@ -0,0 +1,22 @@
1
+ .abstractor_abstractions_ungrouped
2
+ - ungrouped_subjects = about.class.abstractor_subjects(grouped: false, namespace_type: namespace_type, namespace_id: namespace_id)
3
+ - if ungrouped_subjects.any?
4
+ %fieldset
5
+ .abstractor_abstractions_header
6
+ .abstractor_abstraction_schema_name
7
+ %b Name
8
+ .abstractor_abstraction_value
9
+ %b Value
10
+ .abstractor_suggestions
11
+ .abstractor_suggestion_values
12
+ %b Suggestions
13
+ .abstractor_suggestion_status
14
+ %b Status
15
+ .clear
16
+ .abstractor_abstractions_body
17
+ - ungrouped_subjects.each_with_index do |ungrouped_subject, index|
18
+ - abstractor_abstractions = ungrouped_subject.abstractor_abstractions.not_deleted.where(:about_id => about.id)
19
+ - abstractor_abstractions.each do |abstractor_abstraction|
20
+ %div{ class: "abstractor_abstraction #{Abstractor::Utility.dehumanize(abstractor_abstraction.abstractor_subject.abstractor_abstraction_schema.predicate)} #{'abstractor_bottom_border' if index < ungrouped_subjects.length - 1}" }
21
+ = render :partial => 'abstractor/abstractor_abstractions/fields', :locals => {:abstractor_abstraction => abstractor_abstraction}
22
+ .clear
@@ -3,10 +3,9 @@
3
3
 
4
4
  .abstractor_abstraction_edit
5
5
  = form_for abstractor_abstraction, url: Abstractor::UserInterface.abstractor_relative_path(abstractor.abstractor_abstraction_path(abstractor_abstraction)), method: :put, :remote => true do |f|
6
- .column-3
7
- .abstraction_schema_name
8
- = abstraction_schema.display_name
9
- .column-7
6
+ .abstractor_abstraction_schema_name
7
+ = abstraction_schema.display_name
8
+ .abstraction_edit_abstraction_value
10
9
  - case abstraction_schema.abstractor_object_type.value
11
10
  - when 'date'
12
11
  = f.text_field :value, class: 'abstractor_datepicker'
@@ -41,7 +40,7 @@
41
40
  &nbsp;
42
41
  = f.check_box :unknown
43
42
  = f.label :unknown, 'unknown'
44
- .column-3
43
+ .abstractor_suggestion_sources
45
44
  - abstractor_abstraction = f.object
46
45
  - abstraction_sources = abstractor_abstraction.abstractor_subject.abstractor_abstraction_sources.select { |s| s.abstractor_abstraction_source_type.name != 'indirect' }
47
46
  - abstraction_sources.each do |abstraction_source|
@@ -53,7 +52,7 @@
53
52
  %br
54
53
  %div{ :id => "abstraction_text_#{dom_id}", :class => 'tooltip'}
55
54
  = simple_format(source[:source_type].find(source[:source_id]).send(source[:source_method]))
56
- .column-4
55
+ .abstraction_edit_abstraction_actions
57
56
  = f.submit 'Save'
58
57
  = link_to 'Cancel', abstractor_abstraction, :remote => true
59
58
  .clear
@@ -156,11 +156,10 @@ module Abstractor
156
156
  at = nil
157
157
  at = abstractor_text.downcase unless abstractor_text.blank?
158
158
  target_abstractor_object_value_variants.each do |abstractor_object_value_variant|
159
- re = Regexp.new(Regexp.escape(abstractor_object_value_variant.value.downcase))
159
+ re = Regexp.new('\b' + Regexp.escape(abstractor_object_value_variant.value.downcase) + '\b')
160
160
  if re =~ at
161
161
  abstractor_object_value_variants << abstractor_object_value_variant
162
162
  abstractor_object_values << abstractor_object_value_variant.abstractor_object_value
163
- target_abstractor_object_value_variants.delete_if { |aovv| aovv.abstractor_object_value.id == abstractor_object_value_variant.abstractor_object_value.id }
164
163
  end
165
164
  end
166
165
 
@@ -168,7 +167,7 @@ module Abstractor
168
167
  target_abstractor_object_values = target_abstractor_object_values - abstractor_object_values
169
168
 
170
169
  target_abstractor_object_values.each do |abstractor_object_value|
171
- re = Regexp.new(Regexp.escape(abstractor_object_value.value.downcase))
170
+ re = Regexp.new('\b' + Regexp.escape(abstractor_object_value.value.downcase) + '\b')
172
171
  if re =~ at
173
172
  abstractor_object_values << abstractor_object_value
174
173
  end
@@ -1,3 +1,3 @@
1
1
  module Abstractor
2
- VERSION = '4.0.1'
2
+ VERSION = '4.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abstractor
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Gurley, Yulia Bushmanova
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-29 00:00:00.000000000 Z
11
+ date: 2014-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -432,6 +432,7 @@ files:
432
432
  - app/assets/images/abstractor/nu_logo.jpg
433
433
  - app/assets/images/abstractor/nubic_logo.png
434
434
  - app/assets/images/abstractor/page.png
435
+ - app/assets/images/abstractor/page_green.png
435
436
  - app/assets/images/abstractor/rails.png
436
437
  - app/assets/images/abstractor/robert_h_lurie.jpg
437
438
  - app/assets/images/abstractor/show.png
@@ -474,8 +475,11 @@ files:
474
475
  - app/models/abstractor/abstractor_suggestion_status.rb
475
476
  - app/views/abstractor/abstractor_abstraction_groups/_form.html.haml
476
477
  - app/views/abstractor/abstractor_abstraction_groups/edit.html.haml
478
+ - app/views/abstractor/abstractor_abstractions/_abstraction_history.html.haml
477
479
  - app/views/abstractor/abstractor_abstractions/_fields.html.haml
480
+ - app/views/abstractor/abstractor_abstractions/_grouped_abstractions_list.html.haml
478
481
  - app/views/abstractor/abstractor_abstractions/_list.html.haml
482
+ - app/views/abstractor/abstractor_abstractions/_ungrouped_abstractions_list.html.haml
479
483
  - app/views/abstractor/abstractor_abstractions/edit.html.haml
480
484
  - app/views/abstractor/abstractor_abstractions/show.html.haml
481
485
  - app/views/abstractor/shared/_error_messages.html.haml
@@ -786,7 +790,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
786
790
  version: '0'
787
791
  requirements: []
788
792
  rubyforge_project:
789
- rubygems_version: 2.2.2
793
+ rubygems_version: 2.4.2
790
794
  signing_key:
791
795
  specification_version: 4
792
796
  summary: A Rails engine gem for deriving discrete data points from narrative text