wco_models 3.1.0.36 → 3.1.0.38

Sign up to get free protection for your applications and to get access to all the features.
Files changed (183) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +3 -13
  3. data/app/assets/config/wco_models_manifest.js +2 -0
  4. data/app/assets/javascripts/wco/application.js +43 -5
  5. data/app/assets/javascripts/wco/collapse-expand.js +1 -0
  6. data/app/assets/javascripts/wco/file_upload.js +32 -0
  7. data/app/assets/javascripts/wco/shared.js +22 -0
  8. data/app/assets/stylesheets/wco/application.css +23 -8
  9. data/app/assets/stylesheets/wco/utils.scss +57 -1
  10. data/app/controllers/wco/application_controller.rb +9 -0
  11. data/app/controllers/wco/galleries_controller.rb +143 -0
  12. data/app/controllers/wco/headlines_controller.rb +71 -0
  13. data/app/controllers/wco/leads_controller.rb +59 -0
  14. data/app/controllers/wco/leadsets_controller.rb +90 -0
  15. data/app/controllers/wco/logs_controller.rb +64 -0
  16. data/app/controllers/wco/office_action_templates_controller.rb +80 -0
  17. data/app/controllers/wco/office_actions_controller.rb +71 -0
  18. data/app/controllers/wco/photos_controller.rb +78 -0
  19. data/app/controllers/wco/profiles_controller.rb +26 -0
  20. data/app/controllers/wco/publishers_controller.rb +60 -0
  21. data/app/controllers/wco/reports_controller.rb +75 -0
  22. data/app/controllers/wco/sites_controller.rb +52 -0
  23. data/app/controllers/wco/tags_controller.rb +57 -0
  24. data/app/helpers/wco/application_helper.rb +42 -0
  25. data/app/models/wco/asset.rb +26 -0
  26. data/app/models/wco/gallery.rb +3 -3
  27. data/app/models/wco/headline.rb +19 -0
  28. data/app/models/wco/invoice.rb +127 -0
  29. data/app/models/wco/lead.rb +42 -0
  30. data/app/models/wco/leadset.rb +8 -2
  31. data/app/models/wco/log.rb +18 -0
  32. data/app/models/wco/newsitem.rb +1 -0
  33. data/app/models/wco/office_action.rb +17 -18
  34. data/app/models/wco/office_action_template.rb +41 -0
  35. data/app/models/wco/office_action_template_tie.rb +20 -0
  36. data/app/models/wco/photo.rb +10 -8
  37. data/app/models/wco/price.rb +2 -0
  38. data/app/models/wco/product.rb +2 -0
  39. data/app/models/wco/profile.rb +1 -0
  40. data/app/models/wco/publisher.rb +68 -3
  41. data/app/models/wco/report.rb +48 -0
  42. data/app/models/wco/site.rb +12 -1
  43. data/app/models/wco/subscription.rb +1 -0
  44. data/app/models/wco/tag.rb +17 -4
  45. data/app/models/wco_email/campaign.rb +7 -11
  46. data/app/models/wco_email/context.rb +15 -14
  47. data/app/models/wco_email/conversation.rb +13 -27
  48. data/app/models/wco_email/{scheduled_email_action.rb → email_action.rb} +24 -20
  49. data/app/models/wco_email/email_action_template.rb +35 -0
  50. data/app/models/wco_email/email_filter.rb +9 -12
  51. data/app/models/wco_email/email_template.rb +124 -0
  52. data/app/models/wco_email/message.rb +228 -0
  53. data/app/models/wco_email/message_stub.rb +107 -0
  54. data/app/models/wco_email/obfuscated_redirect.rb +13 -0
  55. data/app/models/wco_email/unsubscribe.rb +19 -0
  56. data/app/models/wco_hosting/appliance.rb +1 -0
  57. data/app/models/wco_hosting/appliance_tmpl.rb +1 -0
  58. data/app/models/wco_hosting/domain.rb +1 -0
  59. data/app/models/wco_hosting/serverhost.rb +1 -0
  60. data/app/views/layouts/wco/application.haml +30 -17
  61. data/app/views/wco/_main_footer.haml +43 -0
  62. data/app/views/wco/_main_header.haml +37 -0
  63. data/app/views/wco/_main_header.haml-bk +109 -0
  64. data/app/views/wco/_paginate.haml +8 -0
  65. data/app/views/wco/_search.haml +8 -0
  66. data/app/views/wco/application/_debug.haml +0 -0
  67. data/app/views/wco/galleries/_form.haml +24 -0
  68. data/app/views/wco/galleries/_header.haml +8 -0
  69. data/app/views/wco/galleries/_index.haml +40 -0
  70. data/app/views/wco/galleries/_menu.haml-trash +10 -0
  71. data/app/views/wco/galleries/_menu_secondary.haml +12 -0
  72. data/app/views/wco/galleries/_thumbs.haml +9 -0
  73. data/app/views/wco/galleries/_title.haml +16 -0
  74. data/app/views/wco/galleries/edit.haml +6 -0
  75. data/app/views/wco/galleries/new.haml +6 -0
  76. data/app/views/wco/galleries/show.haml +43 -0
  77. data/app/views/wco/headlines/_form.haml +17 -0
  78. data/app/views/wco/headlines/_header.haml +6 -0
  79. data/app/views/wco/headlines/_index.haml +20 -0
  80. data/app/views/wco/headlines/edit.haml +6 -0
  81. data/app/views/wco/headlines/new.haml +2 -0
  82. data/app/views/wco/invoices/_form.haml-trash +29 -0
  83. data/app/views/wco/invoices/_header.haml +6 -0
  84. data/app/views/wco/invoices/_index_list.haml +13 -0
  85. data/app/views/wco/invoices/_index_table.haml +20 -0
  86. data/app/views/wco/invoices/index.haml +3 -0
  87. data/app/views/wco/invoices/new_pdf.haml +18 -0
  88. data/app/views/wco/invoices/new_stripe.haml +50 -0
  89. data/app/views/wco/invoices/show.haml +23 -0
  90. data/app/views/wco/kaminari/_first_page.html.erb +11 -0
  91. data/app/views/wco/kaminari/_gap.html.erb +8 -0
  92. data/app/views/wco/kaminari/_last_page.html.erb +11 -0
  93. data/app/views/wco/kaminari/_next_page.html.erb +11 -0
  94. data/app/views/wco/kaminari/_page.html.erb +13 -0
  95. data/app/views/wco/kaminari/_paginator.html.erb +25 -0
  96. data/app/views/wco/kaminari/_prev_page.html.erb +11 -0
  97. data/app/views/wco/leads/_form.haml +45 -0
  98. data/app/views/wco/leads/_form_import.haml +11 -0
  99. data/app/views/wco/leads/_header.haml +7 -0
  100. data/app/views/wco/leads/_index.haml +75 -0
  101. data/app/views/wco/leads/_index_rows.haml +11 -0
  102. data/app/views/wco/leads/edit.haml +22 -0
  103. data/app/views/wco/leads/index.haml +7 -0
  104. data/app/views/wco/leads/new.haml +9 -0
  105. data/app/views/wco/leads/show.haml +85 -0
  106. data/app/views/wco/leadsets/_form.haml +28 -0
  107. data/app/views/wco/leadsets/_header.haml +6 -0
  108. data/app/views/wco/leadsets/edit.haml +4 -0
  109. data/app/views/wco/leadsets/index.haml +45 -0
  110. data/app/views/wco/leadsets/index_dataTables.haml +33 -0
  111. data/app/views/wco/leadsets/new.haml +6 -0
  112. data/app/views/wco/leadsets/show.haml +52 -0
  113. data/app/views/wco/logs/_form.haml +17 -0
  114. data/app/views/wco/logs/_header.haml +6 -0
  115. data/app/views/wco/logs/_index.haml +23 -0
  116. data/app/views/wco/logs/edit.haml +6 -0
  117. data/app/views/wco/logs/new.haml +2 -0
  118. data/app/views/wco/office_action_templates/_form.haml +46 -0
  119. data/app/views/wco/office_action_templates/_header.haml +8 -0
  120. data/app/views/wco/office_action_templates/_ties.haml +18 -0
  121. data/app/views/wco/office_action_templates/edit.haml +6 -0
  122. data/app/views/wco/office_action_templates/index.haml +17 -0
  123. data/app/views/wco/office_action_templates/new.haml +5 -0
  124. data/app/views/wco/office_action_templates/show.haml +22 -0
  125. data/app/views/wco/office_actions/_form.haml +22 -0
  126. data/app/views/wco/office_actions/_header.haml +6 -0
  127. data/app/views/wco/office_actions/_index.haml +15 -0
  128. data/app/views/wco/office_actions/edit.haml +5 -0
  129. data/app/views/wco/office_actions/index.haml +10 -0
  130. data/app/views/wco/office_actions/new.haml +4 -0
  131. data/app/views/wco/office_actions/show.haml +5 -0
  132. data/app/views/wco/photos/_form.haml +0 -0
  133. data/app/views/wco/photos/_index_thumbs.haml +7 -0
  134. data/app/views/wco/photos/_meta.haml +7 -0
  135. data/app/views/wco/photos/_meta_manager.haml +7 -0
  136. data/app/views/wco/photos/_multinew.haml +6 -0
  137. data/app/views/wco/photos/index.haml +3 -0
  138. data/app/views/wco/photos/new.haml +0 -0
  139. data/app/views/wco/photos/show.haml +6 -0
  140. data/app/views/wco/photos/without_gallery.haml +11 -0
  141. data/app/views/wco/prices/_form.haml +1 -1
  142. data/app/views/wco/products/_header.haml +6 -0
  143. data/app/views/wco/publishers/_form.haml +28 -0
  144. data/app/views/wco/publishers/_header.haml +6 -0
  145. data/app/views/wco/publishers/edit.haml +4 -0
  146. data/app/views/wco/publishers/index.haml +37 -0
  147. data/app/views/wco/publishers/new.haml +4 -0
  148. data/app/views/wco/reports/_form.haml +28 -0
  149. data/app/views/wco/reports/_header.haml +14 -0
  150. data/app/views/wco/reports/edit.haml +4 -0
  151. data/app/views/wco/reports/index.haml +17 -0
  152. data/app/views/wco/reports/index_table.haml +17 -0
  153. data/app/views/wco/reports/new.haml +4 -0
  154. data/app/views/wco/reports/show.haml +8 -0
  155. data/app/views/wco/sites/_form.haml +21 -0
  156. data/app/views/wco/sites/_header.haml +6 -0
  157. data/app/views/wco/sites/edit.haml +4 -0
  158. data/app/views/wco/sites/index.haml +24 -0
  159. data/app/views/wco/sites/new.haml +4 -0
  160. data/app/views/wco/tags/_form.haml +10 -0
  161. data/app/views/wco/tags/_header.haml +6 -0
  162. data/app/views/wco/tags/_index.haml +10 -0
  163. data/app/views/wco/tags/_index_inline.haml +8 -0
  164. data/app/views/wco/tags/edit.haml +0 -0
  165. data/app/views/wco/tags/index.haml +9 -0
  166. data/app/views/wco/tags/new.haml +0 -0
  167. data/app/views/wco/tags/show.haml +15 -0
  168. data/config/routes.rb +42 -0
  169. data/lib/tasks/db_tasks.rake +13 -0
  170. data/lib/tasks/office_tasks.rake +36 -0
  171. data/lib/tasks/scrape_tasks.rake-trash +22 -0
  172. data/lib/wco/ai_writer.rb +55 -0
  173. data/lib/wco/engine.rb +0 -1
  174. data/lib/wco/office_worker.rb +4 -0
  175. data/lib/wco/scrape_wsj.rb +29 -0
  176. data/lib/wco/scrape_wsj_capy.rb +44 -0
  177. data/lib/wco_models.rb +15 -2
  178. metadata +241 -47
  179. data/app/helpers/ish_models/application_helper.rb +0 -4
  180. data/app/models/wco/premium_tier.rb +0 -13
  181. data/app/models/wco_email/message_template.rb +0 -6
  182. data/lib/tasks/ish_models_tasks.rake +0 -4
  183. /data/app/views/wco/{application/_alerts_notices.haml → _alerts_notices.haml} +0 -0
@@ -0,0 +1,45 @@
1
+
2
+ .leadsets-index.maxwidth
3
+ %h5
4
+ = link_to 'Leadsets', leadsets_path
5
+ (#{Wco::Leadset.all.length})
6
+ = link_to raw("<i class='fa fa-plus-square'></i>"), new_leadset_path
7
+
8
+ .actions
9
+ %label.select-all
10
+ = check_box_tag :select_all
11
+ select all
12
+ .n-selected -
13
+ = button_tag 'Delete', method: :delete, class: 'delete-btn'
14
+
15
+ .float-right= render '/wco/search', path: leadsets_path
16
+ = paginate @leadsets, :param_name => :leadsets_page, :views_prefix => 'wco'
17
+ %table.bordered
18
+ %thead
19
+ %tr
20
+ %th &nbsp;
21
+ %th.company-url Company Url
22
+ %th Tags
23
+ %th Leads
24
+
25
+ %tbody
26
+ - @leadsets.each_with_index do |leadset, idx1|
27
+ %tr
28
+ %td
29
+ = check_box_tag 'leadset_ids[]', leadset.id, nil, { class: 'i-sel' }
30
+
31
+ %td
32
+ = link_to '[~]', edit_leadset_path( leadset )
33
+ = link_to leadset.company_url, leadset_path(leadset)
34
+
35
+ %td.tags
36
+ - leadset.tags.each_with_index do |tag, idx2|
37
+ .chip
38
+ = tag.name
39
+
40
+ %td.leads
41
+ = leadset.leads.length
42
+
43
+
44
+ = paginate @leadsets, :param_name => :leadsets_page, :views_prefix => 'wco'
45
+
@@ -0,0 +1,33 @@
1
+
2
+ .leadsets-index
3
+ %h5
4
+ = link_to 'Leadsets', leadsets_path
5
+ (#{Leadset.kept.length})
6
+ (trash: #{Leadset.discarded.length})
7
+ = link_to raw("<i class='fa fa-plus-square'></i>"), new_leadset_path
8
+
9
+ .actions
10
+ %label.select-all
11
+ = check_box_tag :select_all
12
+ select all
13
+ %label.n-selected -
14
+ = button_tag 'Delete', method: :delete, class: 'delete-btn'
15
+
16
+ %table.data-table.compact
17
+ %thead
18
+ %tr
19
+ %th &nbsp;
20
+ %th created at
21
+ %th Name
22
+ %th Tag
23
+ %th.company-url Company Url
24
+ %th Location
25
+ %tbody
26
+ - @leadsets.each do |leadset|
27
+ %tr
28
+ %td= check_box_tag 'leadset_ids[]', leadset.id, nil, { class: 'i-sel' }
29
+ %td= leadset.created_at.strftime("%Y-%m-%d %H:%M")
30
+ %td= link_to leadset.name, leadset_path( leadset )
31
+ %td= leadset.tag
32
+ %td= link_to leadset.company_url, leadset.company_url
33
+ %td= leadset.location
@@ -0,0 +1,6 @@
1
+
2
+ .leadsets-new.max-width
3
+ .row
4
+ .col.s6.col-sm-offset-3
5
+ %h5 New Leadset
6
+ = render 'form', :leadset => @new_leadset
@@ -0,0 +1,52 @@
1
+
2
+ .leadsets-show.container
3
+ .header
4
+ %h2.title
5
+ Leadset `#{@leadset.company_url}`
6
+ = link_to '[~]', edit_leadset_path( @leadset )
7
+
8
+ %ul
9
+ %li <b>Email:</b> #{@leadset.email}
10
+ %li <b>company_url</b>: #{@leadset.company_url}
11
+ %li <b>customer_id</b>: #{@leadset.customer_id}
12
+
13
+
14
+ %hr
15
+
16
+ .row
17
+ .col-md-6
18
+ %h5.collapse-expand#invoicesList
19
+ Invoices (#{@leadset.invoices.length})
20
+ = link_to '[+stripe]', new_invoice_stripe_path({ leadset_id: @leadset.id })
21
+ = link_to '[+pdf]', new_invoice_pdf_path({ leadset_id: @leadset.id })
22
+
23
+ = render '/wco/invoices/index_list', invoices: @invoices
24
+
25
+ %p Next invoice number: #{@leadset.next_invoice_number}
26
+
27
+ = form_tag create_monthly_invoice_for_leadset_path({ leadset_id: @leadset.id }) do
28
+ %label Create invoice for month
29
+ = text_field_tag 'month_on', nil, placeholder: 'YYYY-MM-DD'
30
+ %label (replace ?)
31
+ = check_box_tag 'replace'
32
+ = submit_tag 'Go >', data: { confirm: 'Are you sure?' }
33
+ %hr
34
+
35
+ .col-md-6
36
+ %h5.collapse-expand#subscriptionsList
37
+ Subscriptions (#{@subscriptions.length})
38
+ = link_to '[+wco]', new_subscription_path({ customer_id: @leadset.customer_id })
39
+ %table.bordered
40
+ %thead
41
+ %tr
42
+ %th Name
43
+ %th Price
44
+ - @subscriptions.each do |i|
45
+ %tr
46
+ %td= i.product.name
47
+ %td= i.price
48
+ %hr
49
+ .row
50
+ %h5.collapse-expand#leads Leads
51
+ = render '/wco/leads/index', leads: @leads
52
+
@@ -0,0 +1,17 @@
1
+
2
+ .logs--form
3
+ = form_for log do |f|
4
+ .field
5
+ %label Name
6
+ = f.text_field :name
7
+
8
+ .field
9
+ %label Site
10
+ = f.select :site, options_for_select( @sites_list, selected: log.site_id ), {}, class: 'select2'
11
+
12
+ .field
13
+ %label Tags
14
+ = f.select :tag_ids, options_for_select( @tags_list, selected: log.tag_ids ), { }, { class: 'select2', multiple: true }
15
+
16
+ .actions
17
+ = f.submit
@@ -0,0 +1,6 @@
1
+
2
+ = link_to "Logs (#{Wco::Log.all.length})", wco.logs_path
3
+ .inline-search
4
+ = form_tag wco.logs_path, method: :get do
5
+ = text_field_tag :q
6
+ = link_to '[+]', wco.new_log_path
@@ -0,0 +1,23 @@
1
+
2
+ - logs ||= @logs
3
+
4
+ .logs--index
5
+ = form_tag logs_bulkop_path, method: :delete do
6
+ = hidden_field_tag :authenticity_token, form_authenticity_token
7
+ .d-flex-row
8
+ = select_tag :verb, options_for_select([nil, 'delete'])
9
+ = submit_tag '>', data: { confirm: 'Are you sure?' }
10
+ = paginate logs, param_name: 'logs_page', views_prefix: 'wco'
11
+ %ol
12
+ - logs.each do |log|
13
+ %li
14
+ = check_box_tag 'ids[]', log.id
15
+ = link_to '[view]', log_path(log)
16
+ .d-inline-block= button_to 'x', log_path(log), method: :delete, data: { confirm: 'Are you sure?' }
17
+ = log.message
18
+
19
+ .flex-row
20
+
21
+ = render '/wco/tags/index_inline', tags: log.tags
22
+ = paginate logs, param_name: 'logs_page', views_prefix: 'wco'
23
+
@@ -0,0 +1,6 @@
1
+
2
+ .logs-edit.maxwidth
3
+ %h5 Editing log `#{@log.name}`
4
+
5
+ = render 'form', log: @log
6
+
@@ -0,0 +1,2 @@
1
+
2
+ = render 'form', log: Wco::Log.new
@@ -0,0 +1,46 @@
1
+
2
+ .oat--form
3
+ = form_for oat, as: :oat do |f|
4
+ .actions
5
+ = f.submit
6
+
7
+ .field.flex-row
8
+
9
+ %label Slug
10
+ = f.text_field :slug, class: 'w-100'
11
+
12
+ .field
13
+ %label action_exe
14
+ = f.text_area :action_exe, class: :monospace
15
+
16
+ .field.flex-row
17
+ %label From
18
+ = f.select :from_type, options_for_select( @from_types_list, selected: params[:from_type] || oat.from_type )
19
+ = f.select :from_id, options_for_select( @from_ids_list ), {}, class: 'select2'
20
+
21
+ .field.flex-row
22
+ %label Publisher
23
+ = f.select :publisher, options_for_select( @publishers_list, selected: oat.publisher ), {}, class: 'select2'
24
+
25
+ .row
26
+ .col-md-4
27
+ &nbsp;
28
+ .col-md-8
29
+ .field
30
+ %label Next Office Action Templates
31
+ .eg rand(1..5).business_days.from_now.to_date + rand(8..16).hours + rand(1..59).minutes
32
+ .eg This is not an interval! But you can do Time.now + 30.seconds
33
+ %br
34
+
35
+ = f.fields_for :ties do |next_f|
36
+ .flex-row.field
37
+ %label next_at_exe
38
+ = next_f.text_field :next_at_exe, class: 'flex-grow w-100'
39
+ .flex-row.field
40
+ %label to_delete
41
+ = next_f.check_box :to_delete
42
+ = next_f.select :next_office_action_template_id, options_for_select( @oats_list, selected: next_f.object.next_office_action_template_id ), { }, { class: 'select2' }
43
+ %br
44
+
45
+ .actions
46
+ = f.submit
@@ -0,0 +1,8 @@
1
+
2
+
3
+ = link_to "Office Action Tmpls (#{Wco::OfficeActionTemplate.all.length})", wco.office_action_templates_path
4
+ .inline-search
5
+ = form_tag wco.office_action_templates_path, method: :get do
6
+ = text_field_tag :q
7
+ = link_to '[+]', wco.new_office_action_template_path
8
+
@@ -0,0 +1,18 @@
1
+
2
+ - oat ||= nil
3
+ - depth ||= 5
4
+ - depth = depth - 1
5
+
6
+ - if ties.present? && depth >= 0
7
+ %ul
8
+ -# .blue= ties[0].length
9
+ - ties.each do |tie|
10
+ %li
11
+ = tie.next_at_exe
12
+ %br
13
+ = link_to '[~]', edit_office_action_template_path(tie.next_oat)
14
+ = link_to tie.next_oat, office_action_template_path(tie.next_oat)
15
+ - if tie.next_oat == oat
16
+ <b>[Same]</b>
17
+ - elsif tie.next_oat.ties.present?
18
+ = render '/wco/office_action_templates/ties', ties: tie.next_oat.ties, depth: depth, oat: tie.next_oat
@@ -0,0 +1,6 @@
1
+
2
+ .oat-edit.maxwidth
3
+
4
+ %h5 Editing `#{@oat.slug}`
5
+
6
+ = render 'form', oat: @oat
@@ -0,0 +1,17 @@
1
+
2
+ .oat-index.maxwidth
3
+ .header
4
+ %h5.title Office Action Templates
5
+
6
+ %ul
7
+ - @oats.each do |oat|
8
+ %li
9
+ = link_to '[~]', edit_office_action_template_path(oat)
10
+ .d-inline-block= button_to 'x', office_action_template_path(oat), method: :delete, html: { confirm: 'Are you sure?' }
11
+ = link_to oat.slug, office_action_template_path(oat)
12
+ %br
13
+ = render '/wco/office_action_templates/ties', ties: oat.ties, oat: oat
14
+ -# = oat.inspect
15
+
16
+ %hr
17
+ = render 'form', oat: @new_oat
@@ -0,0 +1,5 @@
1
+
2
+ .oat-new.maxwidth
3
+ %h5 New OAT
4
+
5
+ = render 'form', oat: OAT.new
@@ -0,0 +1,22 @@
1
+
2
+ .oat-show.maxwidth
3
+
4
+ %h5
5
+ OAT `#{@oat.slug}`
6
+ = link_to '[~]', edit_office_action_template_path(@oat)
7
+
8
+ .a
9
+ %label action_exe
10
+ %pre.mono.descr= @oat.action_exe
11
+
12
+ .a
13
+ %label Ties (#{@oat.ties.length}):
14
+ = render '/wco/office_action_templates/ties', ties: @oat.ties, oat: @oat
15
+
16
+
17
+ .a
18
+ %label actions (#{@oat.actions.length}):
19
+ = render '/wco/office_actions/index', oas: @oat.actions
20
+
21
+
22
+ = @oat.inspect
@@ -0,0 +1,22 @@
1
+
2
+ .office-actions--form
3
+ = form_for oa, as: :oa do |f|
4
+
5
+ .field
6
+ %label Slug
7
+ = f.text_field :slug
8
+
9
+ .field
10
+ %label Status
11
+ = f.select :status, options_for_select( STATUSES, selected: oa.status )
12
+
13
+ .field
14
+ %label perform_at
15
+ = f.text_field :perform_at
16
+
17
+ .field.flex-row
18
+ %label Tmpl
19
+ = f.select :office_action_template_id, options_for_select( @oats_list, selected: oa.office_action_template_id ), {}, { class: 'select2' }
20
+
21
+ .actions
22
+ = f.submit
@@ -0,0 +1,6 @@
1
+
2
+ = link_to "Office Actions (#{Wco::OfficeAction.all.length})", wco.office_actions_path
3
+ .inline-search
4
+ = form_tag wco.office_actions_path, method: :get do
5
+ = text_field_tag :q
6
+ = link_to '[+]', wco.new_office_action_path
@@ -0,0 +1,15 @@
1
+
2
+
3
+ %ul
4
+ - oas.each do |oa|
5
+ %li.d-flex
6
+ = link_to '[~]', edit_office_action_path(oa)
7
+ &nbsp;
8
+ = link_to oa.slug, office_action_path(oa)
9
+ %ul
10
+ %li <b>status:</b> #{oa.status}
11
+ %li
12
+ <b>tmpl:</b>
13
+ = link_to '[~]', edit_office_action_template_path(oa.tmpl)
14
+ #{link_to oa.tmpl, office_action_template_path(oa.tmpl)}
15
+ %li <b>perform_at:</b> #{oa.perform_at}
@@ -0,0 +1,5 @@
1
+
2
+ .office-actions-edit.maxwidth
3
+ %h5 Editing `#{link_to @oa.slug, office_action_path(@oa)}`
4
+ = render 'form', oa: @oa
5
+
@@ -0,0 +1,10 @@
1
+
2
+ .office-actions-index.maxwidth
3
+
4
+ %h5 Office actions (#{@oas.length})
5
+
6
+ = render 'index', oas: @oas
7
+
8
+ %hr
9
+ = render 'form', oa: OA.new
10
+
@@ -0,0 +1,4 @@
1
+
2
+ .office-actions-new.maxwidth
3
+ %h5 New OA
4
+ = render 'form', oa: @oa
@@ -0,0 +1,5 @@
1
+
2
+ .oa-show.maxwidth
3
+ %h5 Office Action `#{@oa.slug}`
4
+ = render 'index', oas: [@oa]
5
+ = @oa.inspect
File without changes
@@ -0,0 +1,7 @@
1
+
2
+ .photos--index-thumbs
3
+ .flex-row.items
4
+ - photos.each do |photo|
5
+ .item
6
+ = render 'wco/photos/meta_manager', photo: photo
7
+ = image_tag photo.photo.url( :thumb )
@@ -0,0 +1,7 @@
1
+
2
+ .photos-meta.row
3
+ .meta
4
+ On #{ pretty_date photo.created_at }
5
+ - unless photo.gallery.blank?
6
+ In #{ link_to photo.gallery.name, gallery_path(photo.gallery.slug, 0) }
7
+ = photo.name unless photo.name.blank?
@@ -0,0 +1,7 @@
1
+
2
+ .photos--meta-manager
3
+ = button_to '[x]', photo_path( :id => photo.id ), class: 'x', :method => :delete, :data => { :confirm => 'Are you sure?' }
4
+ .right-hand
5
+ = link_to "Goto", "#large_#{photo.id}", class: 'goto'
6
+ = link_to "Lg", photo.photo.url(:large)
7
+ = link_to "Orig", photo.photo.url(:original)
@@ -0,0 +1,6 @@
1
+
2
+ .photos--multinew
3
+ %h3 Add Photos
4
+ .errors
5
+ %ul{ :id => 'photos', :class => 'thumbnails' }
6
+ %input{ :id => 'fileupload', :type => 'file', :name => 'photo[photo]', 'data-url' => gallery_multiadd_path( gallery.id ), :multiple => '' }
@@ -0,0 +1,3 @@
1
+
2
+ = render 'index_thumbs', photos: @photos
3
+
File without changes
@@ -0,0 +1,6 @@
1
+
2
+ .photos-show.padded
3
+ .header
4
+ %h5.title= @photo.photo.original_filename
5
+
6
+ = image_tag @photo.photo.url( :original )
@@ -0,0 +1,11 @@
1
+
2
+ .row
3
+ .large-12.columns
4
+ %h5 Photos without gallery
5
+
6
+ - @photos.each do |photo|
7
+ .box.left
8
+ = image_tag photo.photo.url(:thumb)
9
+ = link_to '[x]', manager_photo_path( photo.id ), :method => :delete, :data => { :confirm => 'Are you sure?' }
10
+
11
+ .c
@@ -1,6 +1,6 @@
1
1
 
2
2
  -# - url = price.new_record? ? prices_path : price_path( price )
3
- .products--prices-form
3
+ .prices--form
4
4
 
5
5
  = form_for price, as: :price, html: { class: 'flex-row' } do |f|
6
6
  = hidden_field_tag 'price[product_id]', price.product_id
@@ -0,0 +1,6 @@
1
+
2
+ = link_to "Products (#{Wco::Product.all.length})", wco.products_path
3
+ .inline-search
4
+ = form_tag wco.products_path, method: :get do
5
+ = text_field_tag :q
6
+ = link_to '[+]', wco.new_product_path
@@ -0,0 +1,28 @@
1
+
2
+ .publishers--form
3
+ = form_for publisher do |f|
4
+ .field
5
+ = f.label :slug
6
+ = f.text_field :slug
7
+
8
+ -## this is unnecessary b/c I use eval() :
9
+ -# .field
10
+ -# kind?!
11
+ -# .field
12
+ -# = f.label :from_gallery
13
+ -# = f.select :from_gallery, options_for_select( @galleries_list, selected: publisher.from_gallery ), class: 'select2'
14
+
15
+ .field
16
+ %label site
17
+ = f.select :site, options_for_select( @sites_list, selected: publisher.site_id ), {}, class: 'select2'
18
+ .field
19
+ %label.d-block context_eval
20
+ = f.text_area :context_eval, class: 'monospace'
21
+ .field
22
+ %label.d-block post_body_tmpl
23
+ = f.text_area :post_body_tmpl, class: 'monospace'
24
+ .field
25
+ %label.d-block after_eval
26
+ = f.text_area :after_eval, class: 'monospace'
27
+ .actions
28
+ = f.submit
@@ -0,0 +1,6 @@
1
+
2
+ = link_to "Publishers (#{Wco::Publisher.all.length})", wco.publishers_path
3
+ .inline-search
4
+ = form_tag wco.publishers_path, method: :get do
5
+ = text_field_tag :q
6
+ = link_to '[+]', wco.new_publisher_path
@@ -0,0 +1,4 @@
1
+
2
+ .publishers-new.maxwidth
3
+ %h5 Edit Publisher
4
+ = render 'form', publisher: @publisher
@@ -0,0 +1,37 @@
1
+
2
+ .publishers-index.padded
3
+ %h5
4
+ Publishers
5
+ = link_to '[+]', wco.new_publisher_path
6
+
7
+ %table.bordered
8
+ %tr
9
+ %th &nbsp;
10
+ %th
11
+ slug
12
+ %br
13
+ site
14
+ %th
15
+ context_eval
16
+ %br
17
+ post_body_eval
18
+ - @publishers.each do |item|
19
+ %tr
20
+ %td
21
+ .flex-row
22
+ = button_to '[x]', wco.publisher_path(item), method: :delete, data: { confirm: 'Are you sure?' }
23
+ = link_to '[~]', wco.edit_publisher_path(item)
24
+ = button_to '[run]', wco.do_run_publisher_path( item ), data: { confirm: 'Are you sure?' }
25
+ %td
26
+ = item.slug
27
+ %hr
28
+ = item.site.origin
29
+ %td
30
+ %pre.monospace
31
+ = item.context_eval
32
+ %hr
33
+ %pre.monospace
34
+ = item.post_body_tmpl
35
+ %hr
36
+ %pre.monospace
37
+ = item.after_eval
@@ -0,0 +1,4 @@
1
+
2
+ .publishers-new.maxwidth
3
+ %h5 New Publisher
4
+ = render 'form', publisher: @new_publisher
@@ -0,0 +1,28 @@
1
+
2
+ .reports--form
3
+ = form_for report do |f|
4
+ .actions
5
+ = f.submit
6
+
7
+ .field.flex-row
8
+ %label Title
9
+ = f.text_field :title, class: 'w-100'
10
+ .field.flex-row
11
+ %label Slug
12
+ = f.text_field :slug, class: 'w-100'
13
+
14
+ .field
15
+ %label deleted_at
16
+ = f.text_field :deleted_at
17
+
18
+ .field
19
+ %label Body
20
+ = f.text_area :body, class: 'p-2'
21
+
22
+ .field
23
+ %label Tags (#{report.tags.length}):
24
+ -# = render '/wco/tags/index', tags: report.tags
25
+ = f.select :tag_ids, options_for_select(@tags_list, selected: report.tag_ids), {}, { multiple: true, class: 'select2' }
26
+
27
+ .actions
28
+ = f.submit
@@ -0,0 +1,14 @@
1
+
2
+ - reports ||= @reports
3
+ - reports ||= Wco::Report.all
4
+
5
+
6
+ = link_to "Reports (#{reports.length})", wco.reports_path
7
+ .inline-search
8
+ = form_tag wco.reports_path, method: :get do
9
+ = text_field_tag :q
10
+ = link_to '[+]', wco.new_report_path
11
+ - if params[:deleted]
12
+ [deleted]
13
+ - else
14
+ = link_to '[deleted]', wco.deleted_reports_path
@@ -0,0 +1,4 @@
1
+
2
+ .reports-new.maxwidth
3
+ %h5 Edit Report
4
+ = render 'form', report: @report
@@ -0,0 +1,17 @@
1
+
2
+ .reports-index.maxwidth
3
+ .header
4
+ %h5.title
5
+ = render 'header'
6
+
7
+ %ul
8
+ - @reports.each do |ttt|
9
+ %li
10
+ .flex-row
11
+ = button_to '[x]', report_path(ttt), method: :delete, data: { confirm: 'Are you sure?' }
12
+ = link_to '[~]', edit_report_path(ttt)
13
+ = link_to ttt.slug, report_path(ttt)
14
+ .flex-row
15
+ <b>Tags (#{ttt.tags.length}):</b>&nbsp;
16
+ = render '/wco/tags/index_inline', tags: ttt.tags
17
+