wco_models 3.4.0.5 → 3.4.0.6
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 +4 -4
- data/app/models/wco/report.rb +4 -0
- data/app/views/wco/reports/_form.haml +6 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7f85118ba510731af3b3371536213d34ec86a4e542e7b73cc526f5a3d83ba9cd
|
|
4
|
+
data.tar.gz: 263d6de8e8efdbf929cee0729bd19263ec27bafaf896522b311a7c37c4e45a16
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b8d394f91959a7e252f1459add6a6c12481adcb06145895d05413dc271cf3dd01f47824c3535d238fb6b2bb873bcdac14dcea532a916252a32fdee01c35893b9
|
|
7
|
+
data.tar.gz: a75b11c2553523528b6d1c458cbdd42aa0ff278dd2e5473bcbbb39f4603261b44e3350b393d3020745b1d0dcd749cdb2ab7421585fb34c150a0fe64e24841dcd
|
data/app/models/wco/report.rb
CHANGED
|
@@ -27,6 +27,10 @@ class Wco::Report
|
|
|
27
27
|
def body_json
|
|
28
28
|
body.gsub(/\r/, '').gsub(/\n\n+/, '<br /><br />').to_json
|
|
29
29
|
end
|
|
30
|
+
FORMAT_PLAINTEXT = 'format-plaintext'
|
|
31
|
+
FORMAT_FULLHTML = 'format-fullhtml'
|
|
32
|
+
FORMATS = [ FORMAT_PLAINTEXT, FORMAT_FULLHTML ]
|
|
33
|
+
field :body_format, type: :string, default: FORMAT_PLAINTEXT
|
|
30
34
|
|
|
31
35
|
field :x, :type => Float
|
|
32
36
|
field :y, :type => Float
|
|
@@ -19,7 +19,10 @@
|
|
|
19
19
|
%label Summary
|
|
20
20
|
= f.text_area :summary
|
|
21
21
|
|
|
22
|
-
.field
|
|
22
|
+
.field.d-flex.flex-column
|
|
23
|
+
%label body_format
|
|
24
|
+
= f.select :body_format, options_for_select(Wco::Report::FORMATS, selected: report.body_format)
|
|
25
|
+
|
|
23
26
|
%label Body
|
|
24
27
|
= f.text_area :body, class: 'tinymce'
|
|
25
28
|
|
|
@@ -33,9 +36,9 @@
|
|
|
33
36
|
%label image
|
|
34
37
|
= f.file_field :image_thumb
|
|
35
38
|
|
|
36
|
-
- if report.image_thumb
|
|
39
|
+
- if report.image_thumb
|
|
37
40
|
%p Current:
|
|
38
|
-
= image_tag report.image_thumb.
|
|
41
|
+
= image_tag report.image_thumb.photo.url(:thumb)
|
|
39
42
|
|
|
40
43
|
-# .field
|
|
41
44
|
-# %label Newsvideo:
|