wco_models 3.5.0.7 → 3.5.0.10

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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/wco/main.scss +7 -3
  3. data/app/assets/stylesheets/wco/photos.scss +2 -1
  4. data/app/controllers/wco/office_action_templates_controller.rb +3 -0
  5. data/app/controllers/wco/publishers_controller.rb +6 -16
  6. data/app/controllers/wco/reports_controller.rb +6 -5
  7. data/app/controllers/wco/sitemap_paths_controller.rb +14 -2
  8. data/app/controllers/wco/sites_controller.rb +1 -1
  9. data/app/controllers/wco/tags_controller.rb +1 -1
  10. data/app/models/iro/option.rb +37 -4
  11. data/app/models/iro/priceitem.rb +62 -4
  12. data/app/models/tda/option.rb +39 -41
  13. data/app/models/wco/newspartial.rb +3 -2
  14. data/app/models/wco/publisher.rb +29 -8
  15. data/app/models/wco/publisher_d10.rb +50 -0
  16. data/app/models/wco/report.rb +12 -2
  17. data/app/models/wco/site.rb +1 -67
  18. data/app/models/wco/sitemap_path.rb +19 -13
  19. data/app/models/wco/tag.rb +15 -8
  20. data/app/models/wco/utils.rb +1 -1
  21. data/app/views/wco/api/newsproducer/README.txt +4 -0
  22. data/app/views/wco/api/newsproducer/_studio_blue2.js-bk +606 -0
  23. data/app/views/wco/api/newsproducer/_studio_blue2.js-bk2 +898 -0
  24. data/app/views/wco/api/newsproducer/studio_blue2.html.erb-bk +151 -0
  25. data/app/views/wco/office_action_templates/index.haml +1 -1
  26. data/app/views/wco/office_actions/_actions.haml +1 -1
  27. data/app/views/wco/publishers/_form.haml +11 -2
  28. data/app/views/wco/publishers/_post_with.haml +1 -1
  29. data/app/views/wco/reports/_form.haml +13 -2
  30. data/app/views/wco/reports/_index.haml +18 -11
  31. data/app/views/wco/reports/show.haml +6 -1
  32. data/app/views/wco/sitemap_paths/_index.haml +1 -0
  33. data/app/views/wco/sitemap_paths/show.haml +14 -0
  34. data/app/views/wco/sites/index.haml +6 -0
  35. data/app/views/wco/sites/show.haml +1 -1
  36. data/app/views/wco/tags/_form.haml +3 -0
  37. data/config/routes.rb +5 -5
  38. data/lib/shortcuts.rb +1 -1
  39. data/lib/wco_models.rb +1 -1
  40. metadata +8 -3
  41. data/app/views/wco/sitemap_paths/check.haml +0 -13
@@ -0,0 +1,151 @@
1
+ <html>
2
+ <head>
3
+ <title>Studio Any</title>
4
+ <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet" >
5
+
6
+ <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
7
+ <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
8
+ <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
9
+
10
+ <%= stylesheet_link_tag "wco/application", media: "all" %>
11
+ <%= stylesheet_link_tag "wco/studio", media: "all" %>
12
+ </head>
13
+ <body>
14
+
15
+ <script async src="https://unpkg.com/es-module-shims@1.3.6/dist/es-module-shims.js"></script>
16
+ <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
17
+ <script src="https://cdn.jsdelivr.net/npm/ccapture.js@2/build/ccapture.umd.min.js"></script>
18
+ <script src="/tmp-utils.js"></script>
19
+ <script src="/tmp-utils-avatar.js"></script>
20
+ <script src="/tmp-utils-camera.js"></script>
21
+ <script src="/tmp-utils-light.js"></script>
22
+
23
+ <script type="importmap">
24
+ { "imports":
25
+ {
26
+ "three": "https://cdn.jsdelivr.net/npm/three@0.180.0/build/three.module.js/+esm",
27
+ "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.180.0/examples/jsm/",
28
+ "talkinghead": "https://cdn.jsdelivr.net/gh/wasya-co/TalkingHead@1.7.1/modules/talkinghead.mjs",
29
+ "TouchControls": "https://cdn.jsdelivr.net/gh/wasya-co/ishlib3js@0.4.8/public/2026/js/touch_controls.js"
30
+ }
31
+ }
32
+ </script>
33
+
34
+ <div class='position-absolute'>
35
+ <%= render 'wco/newspartials/timeline', newspartial: @newspartial %>
36
+ </div>
37
+
38
+ <div class='StudioW1'>
39
+ <div class='StudioW0'>
40
+
41
+ <div class='d-flex ctrl-row header-row'>
42
+ <div class='item'>
43
+ <select class='studio'></select>
44
+ <em>Status:</em><span id='status'>pending</span>
45
+ </div>
46
+ </div>
47
+ <div class='d-flex ctrl-row header-row'>
48
+ <div class='item'>
49
+ <label>
50
+ <input type="radio" name="head" value="1" checked>
51
+ head 1
52
+ </label>
53
+ </div>
54
+ <div class='item'>
55
+ <label>
56
+ <input type="radio" name="head" value="2">
57
+ head 2
58
+ </label>
59
+ </div>
60
+ <div class='item'>
61
+ <label>
62
+ <input type="radio" name="head" value="3">
63
+ head 3
64
+ </label>
65
+ </div>
66
+ <div class='item'>
67
+ <button id='speak'>Speak</button>
68
+ </div>
69
+ <div class='item'>
70
+ <select class='gestures' ><option></option></select>
71
+ <button id='jesture'>Jesture</button>
72
+ </div>
73
+ </div>
74
+
75
+ <div id='avatar_1'></div><div id='avatar_2'></div><div id='avatar_3'></div>
76
+ <div id='loading'>&nbsp;</div>
77
+ <div id="rotatingC" class="r2" style="width: 854px;
78
+ height: 480px;
79
+ border: 1px solid red;
80
+ text-align: center; " >
81
+ </div>
82
+
83
+ <div class='d-flex heads ctrl-row'>
84
+ <div class='item'>
85
+ spot 1
86
+ <select class='spots' data-spot_id="spot_1" ><option></option></select>
87
+ </div>
88
+ <div class='item'>
89
+ spot 2
90
+ <select class='spots' data-spot_id='spot_2' ><option></option></select>
91
+ </div>
92
+ <div class='item'>
93
+ spot 3
94
+ <select class='spots' data-spot_id=spot_'3' ><option></option></select>
95
+ </div>
96
+ </div>
97
+
98
+ <div class='d-flex cameras ctrl-row'>
99
+ <label>
100
+ <input type="radio" name="camera" value="wide" checked>
101
+ cam wide
102
+ </label>
103
+ <label>
104
+ <input type="radio" name="camera" value="av_1">
105
+ cam 1
106
+ </label>
107
+ <label>
108
+ <input type="radio" name="camera" value="av_2">
109
+ cam 2
110
+ </label>
111
+ <label>
112
+ <input type="radio" name="camera" value="av_3">
113
+ cam 3
114
+ </label>
115
+
116
+ </div>
117
+
118
+ <div class='d-flex lights ctrl-row'>
119
+ <label>
120
+ <input type="checkbox" class='light-ctrl' name="ambientLight" value="on" checked>
121
+ ambientLight
122
+ </label>
123
+ <label>
124
+ <input type="checkbox" class='light-ctrl' name="hemiLight" value="on" checked>
125
+ hemiLight
126
+ </label>
127
+ <label>
128
+ <input type="checkbox" class='light-ctrl' name="keyLight" value="on" checked>
129
+ keyLight
130
+ </label>
131
+ <label class='border-yellow'>
132
+ <input type="checkbox" id='is_shadows' name="shadows" value="on" checked>
133
+ cast shadows
134
+ </label>
135
+ <label>
136
+ <input type="checkbox" class='light-ctrl' name="fillLight" value="on" checked>
137
+ fillLight
138
+ </label>
139
+ <label>
140
+ <input type="checkbox" class='light-ctrl' name="rimLight" value="on" checked>
141
+ rimLight
142
+ </label>
143
+ </div>
144
+
145
+
146
+ </div>
147
+ </div>
148
+
149
+ <script type="module"><%= render 'studio_blue2.js' %></script>
150
+
151
+ </body></html>
@@ -15,7 +15,7 @@
15
15
  &nbsp;
16
16
  = link_to oat.slug, office_action_template_path(oat)
17
17
  &nbsp;
18
- = button_to 'Run w/convos', oat_perform_with_conversations_path(oat), data: { confirm: 'Are you sure?' }
18
+ = button_to 'Perform', oat_perform_path(oat), data: { confirm: 'Are you sure?' }
19
19
  .col-6
20
20
  = render '/wco/office_action_templates/ties', ties: oat.ties, oat: oat
21
21
 
@@ -3,5 +3,5 @@
3
3
  %h5 Office Action
4
4
  .d-inline-block
5
5
  = select_tag :office_action_template, options_for_select(@office_action_templates_list), class: 'select2'
6
- %a.btn.office-action-templates-perform-btn{ href: "javascript: void(0)", data: { url: wco.oat_perform_with_conversations_path } }
6
+ %a.btn.office-action-templates-perform-btn{ href: "javascript: void(0)", data: { url: wco.oats_perform_path } }
7
7
  Perform
@@ -20,14 +20,23 @@
20
20
  .d-flex
21
21
  %label post_path
22
22
  = f.text_field :post_path, class: 'w-100'
23
- .field
23
+ .field.d-flex.flex-column
24
24
  %label.d-block context_eval
25
+ .descr
26
+ @abort, @headers, @props, @publisher, @site
25
27
  = f.text_area :context_eval, class: 'monospace'
26
- .field
28
+ .field.d-flex.flex-column
27
29
  %label.d-block post_body_tmpl
30
+ .descr
31
+ @headers, @props and #context_eval
28
32
  = f.text_area :post_body_tmpl, class: 'monospace'
29
33
  .field
30
34
  %label.d-block after_eval
31
35
  = f.text_area :after_eval, class: 'monospace'
36
+
37
+ .field
38
+ %label Tags (#{publisher.tags.length}):
39
+ = f.select :tag_ids, options_for_select(@tags_list, selected: publisher.tag_ids), {}, { multiple: true, class: 'select2' }
40
+
32
41
  .actions
33
42
  = f.submit
@@ -1,7 +1,7 @@
1
1
 
2
2
  .publishers--post-with
3
3
  = form_tag run_any_publisher_path do
4
- .d-flex
4
+ .d-flex.w-500px
5
5
  = select_tag :id, options_for_select(@publishers_list), class: 'select2'
6
6
  = hidden_field_tag :props, props.to_json
7
7
  = submit_tag 'Go', data: { confirm: 'Are you sure?' }
@@ -11,7 +11,18 @@
11
11
  %label Slug
12
12
  = f.text_field :slug, class: 'w-100'
13
13
 
14
+ .field.flex-row
15
+ %label source_url
16
+ = f.text_field :source_url, class: 'w-100'
17
+
14
18
  .field
19
+ %label Summary
20
+ = f.text_area :summary
21
+
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
+
15
26
  %label Body
16
27
  = f.text_area :body, class: 'tinymce'
17
28
 
@@ -25,9 +36,9 @@
25
36
  %label image
26
37
  = f.file_field :image_thumb
27
38
 
28
- - if report.image_thumb&.image?
39
+ - if report.image_thumb
29
40
  %p Current:
30
- = image_tag report.image_thumb.image.url(:thumb)
41
+ = image_tag report.image_thumb.photo.url(:thumb)
31
42
 
32
43
  -# .field
33
44
  -# %label Newsvideo:
@@ -3,17 +3,24 @@
3
3
 
4
4
  .reports--index
5
5
  = paginate reports, :param_name => :reports_page, :views_prefix => 'wco'
6
- - reports.each do |ttt|
6
+ - reports.each do |report|
7
7
  .Card
8
- .flex-row
9
- = button_to '[x]', report_path(ttt), method: :delete, data: { confirm: 'Are you sure?' }
10
- = link_to '[~]', edit_report_path(ttt)
11
- .a
12
- = link_to ttt.title, report_path(ttt)
13
- %br
14
- `#{ttt.slug}`
15
- .gray.mini= ttt.id
16
- - if !config[:skip_tags]
8
+ .d-flex.no-align
9
+ .thumb
10
+ - if report.image_thumb
11
+ = image_tag report.image_thumb.photo.url(:thumb)
12
+
13
+
17
14
  .flex-row
18
- = render '/wco/tags/list_chips', tags: ttt.tags
15
+ = button_to '[x]', report_path(report), method: :delete, data: { confirm: 'Are you sure?' }
16
+ = link_to '[~]', edit_report_path(report)
17
+ .a
18
+ = link_to report.title, report_path(report)
19
+ %br
20
+ .gray slug: `#{report.slug}`
21
+ .gray.mini= report.id
22
+ - if !config[:skip_tags]
23
+ .flex-row
24
+ = render '/wco/tags/list_chips', tags: report.tags
25
+
19
26
  = paginate reports, :param_name => :reports_page, :views_prefix => 'wco'
@@ -21,7 +21,12 @@
21
21
  %hr
22
22
  - if @report.image_thumb
23
23
  = image_tag @report.image_thumb.photo.url(:thumb)
24
- .descr= raw @report.body
24
+ = @report.body_format
25
+ .descr
26
+ - if @report.body_format == 'format-plaintext'
27
+ %pre= @report.body
28
+ - if @report.body_format == 'format-fullhtml'
29
+ = raw @report.body
25
30
  %hr
26
31
 
27
32
  .actions
@@ -11,6 +11,7 @@
11
11
  %tr
12
12
  %td
13
13
  = link_to '[~]', edit_spath_path(spath)
14
+ .d-inline-block= button_to 'X', spath_path(spath), method: :delete, data: { confirm: 'Are you sure?' }
14
15
  .d-inline-block= button_to 'check', check_spath_path(spath), method: :get
15
16
  = link_to "#{@site.origin}#{spath.path}","#{@site.origin}#{spath.path}", target: :_blank
16
17
  - if spath.redirect_to
@@ -0,0 +1,14 @@
1
+
2
+ .sitemap-paths-show.maxwidth
3
+
4
+ .d-flex
5
+ = link_to '[back to Site]', site_path(@spath.site)
6
+ %b.ml-3.mr-3= link_to @spath.path, spath_path(@spath)
7
+ = link_to '[~]', edit_spath_path(@spath)
8
+ = button_to 'check', check_spath_path(@spath), data: { confirm: 'Are you sure?' }
9
+ = button_to 'clear', clear_spath_path(@spath), data: { confirm: 'Are you sure?' }
10
+
11
+ .spaths-check
12
+ %ul
13
+ - @spath.results.each do |result|
14
+ %li= result
@@ -11,6 +11,7 @@
11
11
  -# %th kind
12
12
  %th origin
13
13
  -# %th post_path
14
+ %th tags
14
15
  - @sites.each do |site|
15
16
  %tr
16
17
  %td
@@ -22,3 +23,8 @@
22
23
  -# %td= site.kind
23
24
  %td= site.origin
24
25
  -# %td= site.post_path
26
+ %td
27
+ - site.tags.map do |t|
28
+ = link_to t.slug, tag_path(t)
29
+ ,
30
+
@@ -9,7 +9,7 @@
9
9
  .Sitemaps.col-md-9
10
10
 
11
11
  %h5.d-flex
12
- Sitemap Paths &nbsp;
12
+ Sitemap Paths (#{@site.sitemap_paths.length})&nbsp;
13
13
  = link_to '[+]', new_spath_path( site_id: @site.id )
14
14
  &nbsp;
15
15
  = button_to 'check', check_sitemap_path( site: @site ), data: { confirm: 'Are you sure?' }
@@ -8,6 +8,9 @@
8
8
  .field
9
9
  %label slug
10
10
  = f.text_field :slug
11
+ .field
12
+ %label external_id
13
+ = f.text_field :external_id
11
14
 
12
15
  .field.d-flex
13
16
  %label parent
data/config/routes.rb CHANGED
@@ -97,7 +97,7 @@ Wco::Engine.routes.draw do
97
97
  resources :obfuscated_redirects
98
98
 
99
99
  post 'office_action_templates', to: 'office_action_templates#update'
100
- post 'office_action_templates/perform', to: 'office_action_templates#perform', as: :oat_perform_with_conversations ## from the mailbox, the oat_id is passed as a body param.
100
+ post 'office_action_templates/perform', to: 'office_action_templates#perform', as: :oats_perform ## from the mailbox, the oat id is passed as a body param.
101
101
  post 'office_action_templates/:id/perform', to: 'office_action_templates#perform', as: :oat_perform
102
102
  get 'office_action_templates/:id/perform', to: 'office_action_templates#perform'
103
103
  resources :office_action_templates
@@ -109,8 +109,8 @@ Wco::Engine.routes.draw do
109
109
  resources :prices
110
110
  resources :products
111
111
  resources :profiles
112
- post 'publishers/:id/do-run', to: 'publishers#do_run', as: :run_publisher
113
- post 'publishers/do-run', to: 'publishers#do_run_any', as: :run_any_publisher
112
+ post 'publishers/:id/do-run', to: 'publishers#do_run_any', as: :run_publisher
113
+ post 'publishers/do-run', to: 'publishers#do_run_any', as: :run_any_publisher
114
114
  resources :publishers
115
115
 
116
116
  post 'photos/update-ordering', to: 'galleries#update_ordering', as: :update_ordering_photos
@@ -129,8 +129,8 @@ Wco::Engine.routes.draw do
129
129
 
130
130
  post 'sites/:id/check_sitemap', to: 'sites#check_sitemap', as: :check_sitemap
131
131
  resources :sites
132
- get 'sitemap_paths/:id/check', to: 'sitemap_paths#check', as: :check_spath
133
- post 'sitemap_paths/:id/clear', to: 'sitemap_paths#clear', as: :clear_spath
132
+ match 'sitemap_paths/:id/check', to: 'sitemap_paths#check', as: :check_spath, via: [ :get, :post ]
133
+ post 'sitemap_paths/:id/clear', to: 'sitemap_paths#clear', as: :clear_spath
134
134
  resources :sitemap_paths, as: :spaths
135
135
  resources :subscriptions
136
136
 
data/lib/shortcuts.rb CHANGED
@@ -7,6 +7,6 @@ EMS ||= WcoEmail::MessageStub
7
7
  OA ||= Wco::OfficeAction
8
8
  OAT ||= Wco::OfficeActionTemplate
9
9
  OATT ||= Wco::OfficeActionTemplateTie
10
- # Sch ||= WcoEmail::EmailAction
10
+ # EAT ||= WcoEmail::EmailActionTemplate
11
11
  # EA ||= WcoEmail::EmailAction
12
12
 
data/lib/wco_models.rb CHANGED
@@ -43,7 +43,7 @@ end
43
43
 
44
44
  ActiveSupport.escape_html_entities_in_json = true
45
45
 
46
-
46
+ ## for newsproducer
47
47
  HEIGHT_SEC = 100.0
48
48
  HEIGHT_MS = HEIGHT_SEC/1000
49
49
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0.7
4
+ version: 3.5.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-19 00:00:00.000000000 Z
11
+ date: 2026-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -542,6 +542,7 @@ files:
542
542
  - app/models/wco/product.rb
543
543
  - app/models/wco/profile.rb
544
544
  - app/models/wco/publisher.rb
545
+ - app/models/wco/publisher_d10.rb
545
546
  - app/models/wco/report.rb
546
547
  - app/models/wco/setting.rb
547
548
  - app/models/wco/site.rb
@@ -586,7 +587,10 @@ files:
586
587
  - app/views/wco/api/leads/by_email.jbuilder
587
588
  - app/views/wco/api/leads/index.jbuilder
588
589
  - app/views/wco/api/leads/index_hash.jbuilder
590
+ - app/views/wco/api/newsproducer/README.txt
589
591
  - app/views/wco/api/newsproducer/_studio_blue2.js
592
+ - app/views/wco/api/newsproducer/_studio_blue2.js-bk
593
+ - app/views/wco/api/newsproducer/_studio_blue2.js-bk2
590
594
  - app/views/wco/api/newsproducer/_studio_fps.js
591
595
  - app/views/wco/api/newsproducer/done/_scenes.js-bk
592
596
  - app/views/wco/api/newsproducer/done/_scenes.js.erb
@@ -608,6 +612,7 @@ files:
608
612
  - app/views/wco/api/newsproducer/done/studio_coc.html.erb
609
613
  - app/views/wco/api/newsproducer/done/studio_ra2.html.erb
610
614
  - app/views/wco/api/newsproducer/studio_blue2.html.erb
615
+ - app/views/wco/api/newsproducer/studio_blue2.html.erb-bk
611
616
  - app/views/wco/api/newsproducer/studio_fps.html.erb
612
617
  - app/views/wco/api/newsproducer/trash/_scenes.js-bk
613
618
  - app/views/wco/api/newsproducer/trash/_scenes.js.erb
@@ -768,10 +773,10 @@ files:
768
773
  - app/views/wco/reports/show.haml
769
774
  - app/views/wco/sitemap_paths/_form.haml
770
775
  - app/views/wco/sitemap_paths/_index.haml
771
- - app/views/wco/sitemap_paths/check.haml
772
776
  - app/views/wco/sitemap_paths/check.haml-trash
773
777
  - app/views/wco/sitemap_paths/edit.haml
774
778
  - app/views/wco/sitemap_paths/new.haml
779
+ - app/views/wco/sitemap_paths/show.haml
775
780
  - app/views/wco/sites/_form.haml
776
781
  - app/views/wco/sites/_header.haml
777
782
  - app/views/wco/sites/check_sitemap.haml
@@ -1,13 +0,0 @@
1
-
2
- .sitemap-paths-check.maxwidth
3
-
4
- .d-flex
5
- = link_to 'Index', site_path(@spath.site)
6
- %b.ml-3.mr-3= link_to @spath.path, spath_path(@spath)
7
- = link_to '[~]', edit_spath_path(@spath)
8
- = button_to 'clear', clear_spath_path(@spath), data: { confirm: 'Are you sure?' }
9
-
10
- .spaths-check
11
- %ul
12
- - @spath.results.each do |pt|
13
- %li= pt