wco_models 3.1.0.37 → 3.1.0.38
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +3 -13
- data/app/assets/config/wco_models_manifest.js +2 -0
- data/app/assets/javascripts/wco/application.js +43 -5
- data/app/assets/javascripts/wco/collapse-expand.js +1 -0
- data/app/assets/javascripts/wco/file_upload.js +32 -0
- data/app/assets/javascripts/wco/shared.js +22 -0
- data/app/assets/stylesheets/wco/application.css +23 -8
- data/app/assets/stylesheets/wco/utils.scss +57 -1
- data/app/controllers/wco/application_controller.rb +9 -0
- data/app/controllers/wco/galleries_controller.rb +143 -0
- data/app/controllers/wco/headlines_controller.rb +71 -0
- data/app/controllers/wco/leads_controller.rb +59 -0
- data/app/controllers/wco/leadsets_controller.rb +90 -0
- data/app/controllers/wco/logs_controller.rb +64 -0
- data/app/controllers/wco/office_action_templates_controller.rb +80 -0
- data/app/controllers/wco/office_actions_controller.rb +71 -0
- data/app/controllers/wco/photos_controller.rb +78 -0
- data/app/controllers/wco/profiles_controller.rb +26 -0
- data/app/controllers/wco/publishers_controller.rb +60 -0
- data/app/controllers/wco/reports_controller.rb +75 -0
- data/app/controllers/wco/sites_controller.rb +52 -0
- data/app/controllers/wco/tags_controller.rb +57 -0
- data/app/helpers/wco/application_helper.rb +42 -0
- data/app/models/wco/asset.rb +26 -0
- data/app/models/wco/gallery.rb +3 -3
- data/app/models/wco/headline.rb +19 -0
- data/app/models/wco/invoice.rb +127 -0
- data/app/models/wco/lead.rb +42 -0
- data/app/models/wco/leadset.rb +8 -2
- data/app/models/wco/log.rb +18 -0
- data/app/models/wco/newsitem.rb +1 -0
- data/app/models/wco/office_action.rb +17 -18
- data/app/models/wco/office_action_template.rb +41 -0
- data/app/models/wco/office_action_template_tie.rb +20 -0
- data/app/models/wco/photo.rb +10 -8
- data/app/models/wco/price.rb +2 -0
- data/app/models/wco/product.rb +2 -0
- data/app/models/wco/profile.rb +1 -0
- data/app/models/wco/publisher.rb +68 -3
- data/app/models/wco/report.rb +48 -0
- data/app/models/wco/site.rb +12 -1
- data/app/models/wco/subscription.rb +1 -0
- data/app/models/wco/tag.rb +17 -4
- data/app/models/wco_email/campaign.rb +7 -11
- data/app/models/wco_email/context.rb +15 -14
- data/app/models/wco_email/conversation.rb +13 -27
- data/app/models/wco_email/{scheduled_email_action.rb → email_action.rb} +24 -20
- data/app/models/wco_email/email_action_template.rb +35 -0
- data/app/models/wco_email/email_filter.rb +9 -12
- data/app/models/wco_email/email_template.rb +124 -0
- data/app/models/wco_email/message.rb +228 -0
- data/app/models/wco_email/message_stub.rb +107 -0
- data/app/models/wco_email/obfuscated_redirect.rb +13 -0
- data/app/models/wco_email/unsubscribe.rb +19 -0
- data/app/models/wco_hosting/appliance.rb +1 -0
- data/app/models/wco_hosting/appliance_tmpl.rb +1 -0
- data/app/models/wco_hosting/domain.rb +1 -0
- data/app/models/wco_hosting/serverhost.rb +1 -0
- data/app/views/layouts/wco/application.haml +30 -17
- data/app/views/wco/_main_footer.haml +43 -0
- data/app/views/wco/_main_header.haml +37 -0
- data/app/views/wco/_main_header.haml-bk +109 -0
- data/app/views/wco/_paginate.haml +8 -0
- data/app/views/wco/_search.haml +8 -0
- data/app/views/wco/application/_debug.haml +0 -0
- data/app/views/wco/galleries/_form.haml +24 -0
- data/app/views/wco/galleries/_header.haml +8 -0
- data/app/views/wco/galleries/_index.haml +40 -0
- data/app/views/wco/galleries/_menu.haml-trash +10 -0
- data/app/views/wco/galleries/_menu_secondary.haml +12 -0
- data/app/views/wco/galleries/_thumbs.haml +9 -0
- data/app/views/wco/galleries/_title.haml +16 -0
- data/app/views/wco/galleries/edit.haml +6 -0
- data/app/views/wco/galleries/new.haml +6 -0
- data/app/views/wco/galleries/show.haml +43 -0
- data/app/views/wco/headlines/_form.haml +17 -0
- data/app/views/wco/headlines/_header.haml +6 -0
- data/app/views/wco/headlines/_index.haml +20 -0
- data/app/views/wco/headlines/edit.haml +6 -0
- data/app/views/wco/headlines/new.haml +2 -0
- data/app/views/wco/invoices/_form.haml-trash +29 -0
- data/app/views/wco/invoices/_header.haml +6 -0
- data/app/views/wco/invoices/_index_list.haml +13 -0
- data/app/views/wco/invoices/_index_table.haml +20 -0
- data/app/views/wco/invoices/index.haml +3 -0
- data/app/views/wco/invoices/new_pdf.haml +18 -0
- data/app/views/wco/invoices/new_stripe.haml +50 -0
- data/app/views/wco/invoices/show.haml +23 -0
- data/app/views/wco/kaminari/_first_page.html.erb +11 -0
- data/app/views/wco/kaminari/_gap.html.erb +8 -0
- data/app/views/wco/kaminari/_last_page.html.erb +11 -0
- data/app/views/wco/kaminari/_next_page.html.erb +11 -0
- data/app/views/wco/kaminari/_page.html.erb +13 -0
- data/app/views/wco/kaminari/_paginator.html.erb +25 -0
- data/app/views/wco/kaminari/_prev_page.html.erb +11 -0
- data/app/views/wco/leads/_form.haml +45 -0
- data/app/views/wco/leads/_form_import.haml +11 -0
- data/app/views/wco/leads/_header.haml +7 -0
- data/app/views/wco/leads/_index.haml +75 -0
- data/app/views/wco/leads/_index_rows.haml +11 -0
- data/app/views/wco/leads/edit.haml +22 -0
- data/app/views/wco/leads/index.haml +7 -0
- data/app/views/wco/leads/new.haml +9 -0
- data/app/views/wco/leads/show.haml +85 -0
- data/app/views/wco/leadsets/_form.haml +28 -0
- data/app/views/wco/leadsets/_header.haml +6 -0
- data/app/views/wco/leadsets/edit.haml +4 -0
- data/app/views/wco/leadsets/index.haml +45 -0
- data/app/views/wco/leadsets/index_dataTables.haml +33 -0
- data/app/views/wco/leadsets/new.haml +6 -0
- data/app/views/wco/leadsets/show.haml +52 -0
- data/app/views/wco/logs/_form.haml +17 -0
- data/app/views/wco/logs/_header.haml +6 -0
- data/app/views/wco/logs/_index.haml +23 -0
- data/app/views/wco/logs/edit.haml +6 -0
- data/app/views/wco/logs/new.haml +2 -0
- data/app/views/wco/office_action_templates/_form.haml +46 -0
- data/app/views/wco/office_action_templates/_header.haml +8 -0
- data/app/views/wco/office_action_templates/_ties.haml +18 -0
- data/app/views/wco/office_action_templates/edit.haml +6 -0
- data/app/views/wco/office_action_templates/index.haml +17 -0
- data/app/views/wco/office_action_templates/new.haml +5 -0
- data/app/views/wco/office_action_templates/show.haml +22 -0
- data/app/views/wco/office_actions/_form.haml +22 -0
- data/app/views/wco/office_actions/_header.haml +6 -0
- data/app/views/wco/office_actions/_index.haml +15 -0
- data/app/views/wco/office_actions/edit.haml +5 -0
- data/app/views/wco/office_actions/index.haml +10 -0
- data/app/views/wco/office_actions/new.haml +4 -0
- data/app/views/wco/office_actions/show.haml +5 -0
- data/app/views/wco/photos/_form.haml +0 -0
- data/app/views/wco/photos/_index_thumbs.haml +7 -0
- data/app/views/wco/photos/_meta.haml +7 -0
- data/app/views/wco/photos/_meta_manager.haml +7 -0
- data/app/views/wco/photos/_multinew.haml +6 -0
- data/app/views/wco/photos/index.haml +3 -0
- data/app/views/wco/photos/new.haml +0 -0
- data/app/views/wco/photos/show.haml +6 -0
- data/app/views/wco/photos/without_gallery.haml +11 -0
- data/app/views/wco/prices/_form.haml +1 -1
- data/app/views/wco/products/_header.haml +6 -0
- data/app/views/wco/publishers/_form.haml +28 -0
- data/app/views/wco/publishers/_header.haml +6 -0
- data/app/views/wco/publishers/edit.haml +4 -0
- data/app/views/wco/publishers/index.haml +37 -0
- data/app/views/wco/publishers/new.haml +4 -0
- data/app/views/wco/reports/_form.haml +28 -0
- data/app/views/wco/reports/_header.haml +14 -0
- data/app/views/wco/reports/edit.haml +4 -0
- data/app/views/wco/reports/index.haml +17 -0
- data/app/views/wco/reports/index_table.haml +17 -0
- data/app/views/wco/reports/new.haml +4 -0
- data/app/views/wco/reports/show.haml +8 -0
- data/app/views/wco/sites/_form.haml +21 -0
- data/app/views/wco/sites/_header.haml +6 -0
- data/app/views/wco/sites/edit.haml +4 -0
- data/app/views/wco/sites/index.haml +24 -0
- data/app/views/wco/sites/new.haml +4 -0
- data/app/views/wco/tags/_form.haml +10 -0
- data/app/views/wco/tags/_header.haml +6 -0
- data/app/views/wco/tags/_index.haml +10 -0
- data/app/views/wco/tags/_index_inline.haml +8 -0
- data/app/views/wco/tags/edit.haml +0 -0
- data/app/views/wco/tags/index.haml +9 -0
- data/app/views/wco/tags/new.haml +0 -0
- data/app/views/wco/tags/show.haml +15 -0
- data/config/routes.rb +42 -0
- data/lib/tasks/db_tasks.rake +13 -0
- data/lib/tasks/office_tasks.rake +36 -0
- data/lib/tasks/scrape_tasks.rake-trash +22 -0
- data/lib/wco/ai_writer.rb +55 -0
- data/lib/wco/engine.rb +0 -1
- data/lib/wco/office_worker.rb +4 -0
- data/lib/wco/scrape_wsj.rb +29 -0
- data/lib/wco/scrape_wsj_capy.rb +44 -0
- data/lib/wco_models.rb +15 -2
- metadata +241 -46
- data/app/helpers/ish_models/application_helper.rb +0 -4
- data/app/models/wco_email/message_template.rb +0 -6
- data/lib/tasks/ish_models_tasks.rake +0 -4
- /data/app/views/wco/{application/_alerts_notices.haml → _alerts_notices.haml} +0 -0
@@ -0,0 +1,107 @@
|
|
1
|
+
|
2
|
+
##
|
3
|
+
## Only object_key, no validations.
|
4
|
+
## 2023-12-28 _vp_ Continue.
|
5
|
+
## 2024-01-05 LFG
|
6
|
+
##
|
7
|
+
class WcoEmail::MessageStub
|
8
|
+
include Mongoid::Document
|
9
|
+
include Mongoid::Timestamps
|
10
|
+
include Mongoid::Paranoia
|
11
|
+
store_in collection: 'wco_email_message_stub'
|
12
|
+
|
13
|
+
STATUS_PENDING = 'status_pending'
|
14
|
+
STATUS_PROCESSED = 'status_processed'
|
15
|
+
STATUS_FAILED = 'status_failed'
|
16
|
+
STATUSES = [ STATUS_PENDING, STATUS_PROCESSED ]
|
17
|
+
field :status, default: STATUS_PENDING
|
18
|
+
scope :pending, ->{ where( status: 'status_pending' ) }
|
19
|
+
|
20
|
+
field :object_key
|
21
|
+
validates :object_key, presence: true, uniqueness: true
|
22
|
+
index({ object_key: 1 }, { unique: true, name: "object_key_idx" })
|
23
|
+
|
24
|
+
has_one :message, class_name: 'WcoEmail::Message'
|
25
|
+
|
26
|
+
has_and_belongs_to_many :tags, class_name: 'Wco::Tag'
|
27
|
+
|
28
|
+
field :config, type: Object, default: <<~AOL
|
29
|
+
{}
|
30
|
+
AOL
|
31
|
+
|
32
|
+
## This only saves a local messafe from mbox to s3.
|
33
|
+
def do_process message
|
34
|
+
the_mail = Mail.new(message)
|
35
|
+
key = the_mail.message_id || "no-key-#{Time.now.to_i}.#{rand(1000)}"
|
36
|
+
|
37
|
+
@stub = WcoEmail::MessageStub.create({
|
38
|
+
object_key: key,
|
39
|
+
status: WcoEmail::MessageStub::STATUS_PENDING,
|
40
|
+
tags: [ @tag ],
|
41
|
+
})
|
42
|
+
if @stub.persisted?
|
43
|
+
@client.put_object({ bucket: ::S3_CREDENTIALS[:bucket_ses],
|
44
|
+
key: key,
|
45
|
+
body: message,
|
46
|
+
})
|
47
|
+
else
|
48
|
+
msg = @stub.errors.full_messages.join(", ")
|
49
|
+
puts! msg
|
50
|
+
Wco::Log.create({
|
51
|
+
message: "Stub duplicate object_key: #{key}",
|
52
|
+
class_name: 'WcoEmail::MessageStub',
|
53
|
+
raw_json: @stub.attributes.to_json,
|
54
|
+
tags: [ @tag ],
|
55
|
+
})
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.mbox2stubs mbox_path, tagname:, skip:
|
60
|
+
skip ||= 0
|
61
|
+
self.new.mbox2stubs mbox_path, tagname: tagname, skip: skip
|
62
|
+
end
|
63
|
+
def mbox2stubs mbox_path, tagname:, skip:
|
64
|
+
puts 'Starting...'
|
65
|
+
skip ||= 0
|
66
|
+
|
67
|
+
@count = 1
|
68
|
+
@client ||= Aws::S3::Client.new({
|
69
|
+
region: ::S3_CREDENTIALS[:region_ses],
|
70
|
+
access_key_id: ::S3_CREDENTIALS[:access_key_id_ses],
|
71
|
+
secret_access_key: ::S3_CREDENTIALS[:secret_access_key_ses],
|
72
|
+
})
|
73
|
+
@tag = Wco::Tag.find_or_create_by({ slug: tagname })
|
74
|
+
|
75
|
+
message = nil
|
76
|
+
File.readlines(mbox_path, encoding: "ISO8859-1" ).each do |line|
|
77
|
+
if (line.match(/\AFrom /))
|
78
|
+
|
79
|
+
if message
|
80
|
+
if skip < @count
|
81
|
+
do_process message
|
82
|
+
print "#{@count}."
|
83
|
+
else
|
84
|
+
print "s-#{@count}."
|
85
|
+
end
|
86
|
+
@count += 1
|
87
|
+
end
|
88
|
+
message = ''
|
89
|
+
|
90
|
+
else
|
91
|
+
message << line.sub(/^\>From/, 'From')
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
if message
|
96
|
+
if skip < @count
|
97
|
+
do_process message
|
98
|
+
print "#{@count}."
|
99
|
+
else
|
100
|
+
print "s-#{@count}."
|
101
|
+
end
|
102
|
+
@count += 1
|
103
|
+
end
|
104
|
+
message = ''
|
105
|
+
end
|
106
|
+
|
107
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
|
2
|
+
class WcoEmail::ObfuscatedRedirect
|
3
|
+
include Mongoid::Document
|
4
|
+
include Mongoid::Timestamps
|
5
|
+
store_in collection: 'office_obfuscated_redirects'
|
6
|
+
|
7
|
+
field :to, type: :string
|
8
|
+
validates :to, presence: true
|
9
|
+
|
10
|
+
field :visited_at, type: DateTime
|
11
|
+
field :visits, type: :array, default: []
|
12
|
+
|
13
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
class WcoEmail::Unsubscribe
|
3
|
+
include Mongoid::Document
|
4
|
+
include Mongoid::Timestamps
|
5
|
+
store_in collection: 'ish_email_unsubscribes'
|
6
|
+
|
7
|
+
field :email
|
8
|
+
validates :email, presence: true
|
9
|
+
|
10
|
+
field :reason
|
11
|
+
field :unsubscribed_at
|
12
|
+
|
13
|
+
belongs_to :campaign, class_name: 'WcoEmail::Campaign', optional: true
|
14
|
+
belongs_to :template, class_name: 'WcoEmail::EmailTemplate', optional: true
|
15
|
+
belongs_to :lead, class_name: 'Wco::Lead'
|
16
|
+
|
17
|
+
|
18
|
+
end
|
19
|
+
|
@@ -3,30 +3,43 @@
|
|
3
3
|
%head
|
4
4
|
%meta{content: "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}
|
5
5
|
%title Wco Models
|
6
|
-
|
7
|
-
=
|
6
|
+
|
7
|
+
= javascript_include_tag "//code.jquery.com/jquery-3.3.1.min.js"
|
8
|
+
|
9
|
+
%script{ :src => "//cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js" }
|
10
|
+
= stylesheet_link_tag "//cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css"
|
11
|
+
|
12
|
+
= stylesheet_link_tag "//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css", :media => 'all'
|
13
|
+
= stylesheet_link_tag "//fonts.googleapis.com/icon?family=Material+Icons"
|
14
|
+
|
15
|
+
= stylesheet_link_tag "//cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/css/bootstrap.min.css"
|
16
|
+
= javascript_include_tag "//cdn.jsdelivr.net/npm/popper.js@1.14.7/dist/umd/popper.min.js"
|
17
|
+
= javascript_include_tag "//cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/js/bootstrap.min.js"
|
18
|
+
|
19
|
+
= stylesheet_link_tag "//cdn.jsdelivr.net/npm/select2@4.0.0/dist/css/select2.min.css"
|
20
|
+
= javascript_include_tag "//cdn.jsdelivr.net/npm/select2@4.0.0/dist/js/select2.min.js"
|
21
|
+
|
22
|
+
= stylesheet_link_tag "//cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.css"
|
23
|
+
= javascript_include_tag "//cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.js"
|
24
|
+
|
8
25
|
= javascript_include_tag "wco/application"
|
9
26
|
= stylesheet_link_tag "wco/application", media: "all"
|
10
|
-
%body
|
11
|
-
|
12
|
-
%h2 Wco Models
|
13
|
-
%nav.flex-row
|
14
|
-
%ul
|
15
|
-
%li= link_to 'ROOT', '/'
|
16
|
-
%li= link_to '/hosting', '/hosting'
|
17
|
-
%li= link_to '/email', '/email'
|
18
|
-
%ul
|
19
|
-
-# %li= link_to 'ApplianceTmpl`s', appliance_tmpls_path
|
20
|
-
-# %li= link_to 'Appliances', appliances_path
|
21
|
-
%li= link_to 'Products', products_path
|
22
|
-
-# %li= link_to 'Serverhosts', serverhosts_path
|
23
|
-
%hr
|
24
27
|
|
25
|
-
=
|
28
|
+
= csrf_meta_tags
|
29
|
+
= csp_meta_tag
|
30
|
+
%body
|
31
|
+
= render 'wco/main_header'
|
32
|
+
= render '/wco/alerts_notices'
|
26
33
|
%hr
|
27
34
|
|
28
35
|
= yield
|
29
36
|
%hr
|
37
|
+
= render '/wco/main_footer'
|
38
|
+
= render 'analytics' if Rails.env.production?
|
39
|
+
|
40
|
+
%script{:src => "https://js.stripe.com/v3/"}
|
41
|
+
:javascript
|
42
|
+
stripe = Stripe('#{::STRIPE_PK}', { apiVersion: '2020-08-27' });
|
30
43
|
|
31
44
|
-# = render '/wco/application/auth_widget'
|
32
45
|
|
@@ -0,0 +1,43 @@
|
|
1
|
+
|
2
|
+
#Config{ data: { jwt_token: @jwt_token } }
|
3
|
+
:javascript
|
4
|
+
localStorage.setItem('jwt_token', $("#Config").data('jwt-token') )
|
5
|
+
|
6
|
+
.application--main-footer.main-footer
|
7
|
+
.max-width
|
8
|
+
|
9
|
+
%i.fa.fa-compress.collapse-expand#mainFooter
|
10
|
+
Account & Session
|
11
|
+
.a
|
12
|
+
.row
|
13
|
+
.col-sm-4
|
14
|
+
%ul
|
15
|
+
%li <b>Email:</b> #{@current_profile.email}
|
16
|
+
%li= link_to 'sidekiq', '/sidekiq', target: :_blank
|
17
|
+
%li= link_to 'Iron Warbler', '/iron_warbler'
|
18
|
+
|
19
|
+
.col-sm-4
|
20
|
+
%ul
|
21
|
+
%li ~__^ v#{@version}
|
22
|
+
-# %li= Time.now.in_time_zone.to_s
|
23
|
+
%li
|
24
|
+
= pp_date Time.now
|
25
|
+
= pp_time Time.now
|
26
|
+
-# <pre>#{@changelog}</pre>
|
27
|
+
|
28
|
+
.col-sm-4
|
29
|
+
= button_to 'Logout', main_app.destroy_user_session_path, :method => :delete, data: { confirm: 'Are you sure?' }
|
30
|
+
|
31
|
+
-# .set-jwt-token
|
32
|
+
-# = button_tag 'Set JWT', class: 'set-jwt-token'
|
33
|
+
-# .jwt-token
|
34
|
+
|
35
|
+
= form_for @current_profile, url: wco.profile_path(@current_profile), as: :profile do |f|
|
36
|
+
.flex-row
|
37
|
+
= f.label :per_page
|
38
|
+
= f.select :per_page, options_for_select([ 10, 25, 50, 100, 250, 500, 1000], selected: @current_profile.per_page)
|
39
|
+
= f.submit 'Go'
|
40
|
+
= link_to 'RTEditor', application_tinymce_path, target: :_blank
|
41
|
+
|
42
|
+
.c
|
43
|
+
= render 'wco/application/debug' if !Rails.env.production?
|
@@ -0,0 +1,37 @@
|
|
1
|
+
|
2
|
+
.application--main-header.main-header{ class: "#{ENV['RAILS_ENV']} #{ENV['RAILS_ENV'][0...3]=="dev" ? "development" : ''}" }
|
3
|
+
|
4
|
+
-# %i.fa.fa-compress.collapse-expand#collapseHeaderMain
|
5
|
+
-# Wco Suite
|
6
|
+
.maxwidth
|
7
|
+
|
8
|
+
%i.fa.fa-compress.collapse-expand#collapseHeaderEmail
|
9
|
+
Wco Suite
|
10
|
+
.flex-row
|
11
|
+
%ul
|
12
|
+
%li= link_to 'ROOT', '/'
|
13
|
+
%li= link_to '/email', '/email'
|
14
|
+
%li= link_to '/hosting', '/hosting'
|
15
|
+
%li= link_to '/trading', '/trading'
|
16
|
+
|
17
|
+
%ul
|
18
|
+
%li= render '/wco/invoices/header'
|
19
|
+
%li= render '/wco/products/header'
|
20
|
+
%li= render '/wco/tags/header'
|
21
|
+
%li= render '/wco/logs/header'
|
22
|
+
|
23
|
+
%ul
|
24
|
+
%li= render '/wco/leadsets/header'
|
25
|
+
%li= render '/wco/leads/header'
|
26
|
+
%li= render '/wco/office_action_templates/header'
|
27
|
+
%li= render '/wco/office_actions/header'
|
28
|
+
|
29
|
+
%ul
|
30
|
+
%li= render '/wco/sites/header'
|
31
|
+
%li= render '/wco/headlines/header'
|
32
|
+
%li= render '/wco/publishers/header'
|
33
|
+
%li= render '/wco/galleries/header'
|
34
|
+
%li= render '/wco/reports/header'
|
35
|
+
|
36
|
+
|
37
|
+
.c
|
@@ -0,0 +1,109 @@
|
|
1
|
+
|
2
|
+
.application--main-header.main-header{ class: "#{ENV['RAILS_ENV']} #{ENV['RAILS_ENV'][0...3]=="dev" ? "development" : ''}" }
|
3
|
+
|
4
|
+
%i.fa.fa-compress.collapse-expand#collapseHeaderMain
|
5
|
+
Wco Suite
|
6
|
+
.container
|
7
|
+
|
8
|
+
%i.fa.fa-compress.collapse-expand#collapseHeaderOffice
|
9
|
+
Wco Email & CRM
|
10
|
+
.a
|
11
|
+
%ul
|
12
|
+
%li= link_to 'Tags', tags_path
|
13
|
+
-# %li
|
14
|
+
-# = link_to "#{WpTag::INBOX} (#{Office::EmailConversation.in_emailtag(WpTag::INBOX).length})", email_conversations_in_path(WpTag::INBOX), class: 'chip'
|
15
|
+
-# = link_to '[+]', new_email_context_path
|
16
|
+
%li
|
17
|
+
= link_to "Tmpls (#{WcoEmail::EmailTemplate.all.length})", email_templates_path
|
18
|
+
= link_to '[+]', new_email_template_path
|
19
|
+
%li
|
20
|
+
= link_to "Companies (#{Leadset.kept.length})", leadsets_path
|
21
|
+
.inline-search
|
22
|
+
= form_tag leadsets_path, method: :get do
|
23
|
+
= text_field_tag :q
|
24
|
+
= link_to '[+]', new_leadset_path
|
25
|
+
%li
|
26
|
+
= link_to "EActions", email_actions_path
|
27
|
+
= link_to '[+]', new_email_action_path
|
28
|
+
%ul
|
29
|
+
%li
|
30
|
+
= link_to "Filters (#{Office::EmailFilter.active.length})", email_filters_path
|
31
|
+
= link_to '[+]', new_email_filter_path
|
32
|
+
%li
|
33
|
+
= link_to "Ctxs (#{Ctx.notsent.length})", email_contexts_path({ sent: false })
|
34
|
+
= link_to '[+]', new_email_context_path
|
35
|
+
%br
|
36
|
+
= link_to 'summary', email_contexts_summary_path( format: :html )
|
37
|
+
= link_to '[csv]', email_contexts_summary_path( format: :csv )
|
38
|
+
|
39
|
+
%li
|
40
|
+
= link_to "Leads (#{Lead.kept.length})", leads_path
|
41
|
+
.inline-search
|
42
|
+
= form_tag leads_path, method: :get do
|
43
|
+
= text_field_tag :q
|
44
|
+
= link_to '[+]', new_lead_path
|
45
|
+
%li
|
46
|
+
= link_to "Schs (#{Sch.active.length})", scheduled_email_actions_path
|
47
|
+
= link_to '[+]', new_scheduled_email_action_path
|
48
|
+
|
49
|
+
%ul
|
50
|
+
%li
|
51
|
+
= link_to 'OLATs', lead_action_templates_path
|
52
|
+
= link_to '[+]', new_lead_action_template_path
|
53
|
+
= link_to 'Lead Actions', lead_actions_path
|
54
|
+
|
55
|
+
|
56
|
+
%li
|
57
|
+
= link_to "Campaigns (#{Ish::EmailCampaign.all.length})", email_campaigns_path
|
58
|
+
= link_to '[+]', new_email_campaign_path
|
59
|
+
%li
|
60
|
+
= link_to "OActions (#{Office::Action.all.length})", office_actions_path
|
61
|
+
= link_to '[+]', new_office_action_path
|
62
|
+
%li
|
63
|
+
= link_to 'Unsubs', unsubscribes_path
|
64
|
+
= link_to 'Analytics', analytics_path
|
65
|
+
|
66
|
+
.c
|
67
|
+
|
68
|
+
%i.fa.fa-compress.collapse-expand#collapseHeaderWco
|
69
|
+
Wasya Co Rb
|
70
|
+
.a
|
71
|
+
%ul
|
72
|
+
%li
|
73
|
+
= link_to 'ApplianceTmpl\'s', appliance_tmpls_path
|
74
|
+
%li
|
75
|
+
= link_to 'Appliance\'s', appliances_path
|
76
|
+
%li
|
77
|
+
= link_to 'Serverhost\'s', serverhosts_path
|
78
|
+
%ul
|
79
|
+
%li
|
80
|
+
= link_to 'Products & Prices', products_path
|
81
|
+
%li
|
82
|
+
= link_to 'Subscriptions', subscriptions_path
|
83
|
+
= link_to '[+]', new_wco_subscription_path
|
84
|
+
%li
|
85
|
+
= link_to 'Wco::Leadset\'s', wco_leadsets_path
|
86
|
+
|
87
|
+
|
88
|
+
.c
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
-# %i.fa.fa-compress.collapse-expand#collapseHeaderIro Iro Wor
|
93
|
+
-# .a
|
94
|
+
-# %ul
|
95
|
+
-# %li
|
96
|
+
-# = link_to 'Alerts', iro_alerts_path
|
97
|
+
-# = link_to 'Watchers', iro_watchers_path
|
98
|
+
-# %li
|
99
|
+
-# = link_to 'Plots', 'http://localhost:3000/iron_warbler/NOPE-1', target: '_blank'
|
100
|
+
-# %li
|
101
|
+
-# = link_to 'Purses', iro_purses_path
|
102
|
+
-# - Iro::Purse.all.map do |p|
|
103
|
+
-# = "[#{p.id}"
|
104
|
+
-# = link_to "show", iro_purse_path(p)
|
105
|
+
-# = link_to "gui", iro_purse_path({ id: p.id, kind: 'show_gameui' })
|
106
|
+
-# = "]"
|
107
|
+
-# = link_to '[+]', new_iro_purse_path
|
108
|
+
-# .c
|
109
|
+
|
File without changes
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
- url ||= gallery.new_record? ? galleries_path : gallery_path( gallery )
|
3
|
+
= form_for gallery, :url => url do |f|
|
4
|
+
.actions
|
5
|
+
= f.submit 'Submit'
|
6
|
+
.field
|
7
|
+
= f.label :name
|
8
|
+
= f.text_field :name
|
9
|
+
= f.label :slug
|
10
|
+
= f.text_field :slug
|
11
|
+
-# .col-md-2
|
12
|
+
-# .field
|
13
|
+
-# = f.label :premium_tier
|
14
|
+
-# = f.number_field :premium_tier
|
15
|
+
|
16
|
+
.row
|
17
|
+
.col-md-4
|
18
|
+
= f.label :subhead
|
19
|
+
= f.text_area :subhead
|
20
|
+
.col-md-4
|
21
|
+
= f.label :descr
|
22
|
+
= f.text_area :descr, class: :tinymce
|
23
|
+
.actions
|
24
|
+
= f.submit 'Submit'
|
@@ -0,0 +1,40 @@
|
|
1
|
+
-#
|
2
|
+
-# wco / galleries / _index.haml
|
3
|
+
-#
|
4
|
+
-# _vp_ 2022-09-25 :: Small styling revision
|
5
|
+
-#
|
6
|
+
|
7
|
+
- n_thumbs ||= 12
|
8
|
+
- galleries ||= @galleries
|
9
|
+
|
10
|
+
.galleries--index.maxwidth
|
11
|
+
= render 'header', galleries: galleries
|
12
|
+
|
13
|
+
.padded
|
14
|
+
- if galleries.length > 0
|
15
|
+
|
16
|
+
- if galleries.respond_to? :total_pages
|
17
|
+
= paginate galleries, :param_name => :galleries_page, :views_prefix => 'wco'
|
18
|
+
|
19
|
+
.row
|
20
|
+
- galleries.each do |g|
|
21
|
+
.col-sm-12.col-md-6
|
22
|
+
.Card
|
23
|
+
%h5
|
24
|
+
= link_to '[~]', edit_gallery_path( g )
|
25
|
+
= link_to g.name, gallery_path(g.slug)
|
26
|
+
(#{g.photos.length})
|
27
|
+
= render 'meta', item: g
|
28
|
+
- if g.photos.length == 0
|
29
|
+
No Photos
|
30
|
+
- else
|
31
|
+
.flex-row
|
32
|
+
- g.photos.limit( n_thumbs ).each do |photo|
|
33
|
+
= link_to image_tag(photo.photo.url(:thumb), :alt => g.name), gallery_path(g.slug)
|
34
|
+
|
35
|
+
- if galleries.respond_to? :total_pages
|
36
|
+
= paginate galleries, :param_name => :galleries_page, :views_prefix => 'wco'
|
37
|
+
|
38
|
+
- else
|
39
|
+
%h5 No Galleries
|
40
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
|
2
|
+
.galleries--menu-secondary
|
3
|
+
%ul
|
4
|
+
%li{ class: "#{params[:render_type] == 'index_titles' ? 'active' : ''}" }
|
5
|
+
= link_to 'titles list', galleries_index_titles_path( :render_type => Gallery::RENDER_THUMBS )
|
6
|
+
%li{ class: "#{params[:render_type] == 'index_thumbs' ? 'active' : ''}" }
|
7
|
+
= link_to 'thumbs list', galleries_index_thumbs_path( :render_type => Gallery::RENDER_TITLES )
|
8
|
+
%li{ class: "#{params[:render_type] == 'index_thumbs' ? 'active' : ''}" }
|
9
|
+
= link_to 'shared with me (thumbs)', galleries_shared_path( :render_type => Gallery::RENDER_THUMBS )
|
10
|
+
%li{ class: "#{params[:render_type] == 'index_titles' ? 'active' : ''}" }
|
11
|
+
= link_to 'shared with me (titles)', galleries_shared_titles_path
|
12
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
.galleries--title
|
3
|
+
%h2
|
4
|
+
Gallery
|
5
|
+
= link_to gallery.name, gallery_path(gallery)
|
6
|
+
(#{gallery.photos.length})
|
7
|
+
= link_to '[~]', edit_gallery_path( gallery )
|
8
|
+
.d-inline-block= button_to 'x', gallery_path(gallery), method: :delete, data: { confirm: 'Are you sure?' }
|
9
|
+
- if gallery.is_public && !gallery.is_trash && !gallery.is_done
|
10
|
+
%i.material-icons visibility
|
11
|
+
- else
|
12
|
+
%i.material-icons visibility_off
|
13
|
+
%ul
|
14
|
+
%li slug :: #{gallery.slug}
|
15
|
+
%li subhead :: #{gallery.subhead}
|
16
|
+
%li= render 'meta', :item => gallery
|
@@ -0,0 +1,43 @@
|
|
1
|
+
-#
|
2
|
+
-# wco / galleries / show
|
3
|
+
-#
|
4
|
+
|
5
|
+
.galleries-show.padded
|
6
|
+
.row
|
7
|
+
.col-md-6
|
8
|
+
= render 'title', gallery: @gallery
|
9
|
+
.col-md-6
|
10
|
+
= render 'wco/photos/multinew', gallery: @gallery
|
11
|
+
|
12
|
+
.row-deleted
|
13
|
+
%p.collapse-expand#rowDeleted Deleted
|
14
|
+
= render 'wco/photos/index_thumbs', photos: @deleted_photos
|
15
|
+
|
16
|
+
.row-mini
|
17
|
+
%p.collapse-expand#rowMinis Mini's
|
18
|
+
.flex-row
|
19
|
+
- @photos.each do |photo|
|
20
|
+
.item
|
21
|
+
= link_to image_tag(photo.photo.url( :mini ), :alt => ''), "#large_#{photo.id}"
|
22
|
+
|
23
|
+
.row-thumbs
|
24
|
+
%p.collapse-expand#rowThumbs Thumbs
|
25
|
+
.orderable-items{ data: { id: @gallery.id.to_s, slug: @gallery.slug, token: form_authenticity_token } }
|
26
|
+
.flex-row.items
|
27
|
+
- @photos.each do |photo|
|
28
|
+
.itemW
|
29
|
+
%a.mvLeft <
|
30
|
+
%a.mvRight >
|
31
|
+
.item{ data: { id: photo.id.to_s } }
|
32
|
+
= render 'wco/photos/meta_manager', photo: photo
|
33
|
+
= image_tag photo.photo.url( :thumb )
|
34
|
+
= button_tag 'Save ordering', class: 'save-ordering'
|
35
|
+
|
36
|
+
.row-large
|
37
|
+
%p.collapse-expand#rowLarge Large
|
38
|
+
.a
|
39
|
+
- @photos.each do |photo|
|
40
|
+
.item
|
41
|
+
%a{id: "large_#{photo.id}" }
|
42
|
+
= render 'wco/photos/meta_manager', photo: photo
|
43
|
+
.wrapper{ style: "background-image: url('#{photo.photo.url( :large )}')" }
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
.headlines--form
|
3
|
+
= form_for headline 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: headline.site_id ), {}, class: 'select2'
|
11
|
+
|
12
|
+
.field
|
13
|
+
%label Tags
|
14
|
+
= f.select :tag_ids, options_for_select( @tags_list, selected: headline.tag_ids ), { }, { class: 'select2', multiple: true }
|
15
|
+
|
16
|
+
.actions
|
17
|
+
= f.submit
|