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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0bb6771d05e882c4932770f8c12855ae9963030689e18ec2f5395d357e1d045
4
- data.tar.gz: 623682dbcff63dabe928ae7c2783e793ae341c5a54957d60a703b74b8598abbc
3
+ metadata.gz: 7f85118ba510731af3b3371536213d34ec86a4e542e7b73cc526f5a3d83ba9cd
4
+ data.tar.gz: 263d6de8e8efdbf929cee0729bd19263ec27bafaf896522b311a7c37c4e45a16
5
5
  SHA512:
6
- metadata.gz: 314511fdd0abade9ea2466385f22703173b2ddaa6526efb5f88844697b762fd483d51014fbee9bc6c0e2e76a3d6833f29bf0ed008efe8f58952f971fd229ff45
7
- data.tar.gz: 638e823d9431c1235c8db0d24538780fb96d272328380854c5e572023baaddee1a87d584de8a36d001bec665de939ea5329876a65e34443321c24969f30a3a34
6
+ metadata.gz: b8d394f91959a7e252f1459add6a6c12481adcb06145895d05413dc271cf3dd01f47824c3535d238fb6b2bb873bcdac14dcea532a916252a32fdee01c35893b9
7
+ data.tar.gz: a75b11c2553523528b6d1c458cbdd42aa0ff278dd2e5473bcbbb39f4603261b44e3350b393d3020745b1d0dcd749cdb2ab7421585fb34c150a0fe64e24841dcd
@@ -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&.image?
39
+ - if report.image_thumb
37
40
  %p Current:
38
- = image_tag report.image_thumb.image.url(:thumb)
41
+ = image_tag report.image_thumb.photo.url(:thumb)
39
42
 
40
43
  -# .field
41
44
  -# %label Newsvideo:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0.5
4
+ version: 3.4.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev