ish_manager 0.1.8.316 → 0.1.8.318
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/ish_manager/application.scss +4 -0
- data/app/assets/stylesheets/ish_manager/email_templates.scss +47 -0
- data/app/controllers/ish_manager/{campaigns_controller.rb → email_campaigns_controller.rb} +1 -1
- data/app/controllers/ish_manager/email_contexts_controller.rb +74 -0
- data/app/controllers/ish_manager/email_templates_controller.rb +43 -0
- data/app/controllers/ish_manager/invoices_controller.rb +2 -2
- data/app/controllers/ish_manager/leads_controller.rb +2 -1
- data/app/controllers/ish_manager/meetings_controller.rb +1 -1
- data/app/controllers/ish_manager/{cities_controller.rb → trash/cities_controller.rb} +0 -0
- data/app/controllers/ish_manager/{orders_controller.rb → trash/orders_controller.rb} +0 -0
- data/app/controllers/ish_manager/{sites_controller.rb → trash/sites_controller.rb} +0 -0
- data/app/controllers/ish_manager/{venues_controller.rb → trash/venues_controller.rb} +0 -0
- data/app/controllers/ish_manager/unsubscribes_controller.rb +1 -1
- data/app/mailers/ish_manager/office_mailer.rb +22 -0
- data/app/views/ish_manager/application/_main_header_admin.haml +13 -1
- data/app/views/ish_manager/email_contexts/_form.haml +26 -0
- data/app/views/ish_manager/email_contexts/edit.haml +3 -0
- data/app/views/ish_manager/email_contexts/iframe_src.haml +4 -0
- data/app/views/ish_manager/email_contexts/index.haml +21 -0
- data/app/views/ish_manager/email_contexts/new.haml +3 -0
- data/app/views/ish_manager/email_contexts/show.haml +16 -0
- data/app/views/ish_manager/email_templates/_form.haml +11 -0
- data/app/views/ish_manager/email_templates/_marketing_ror_1.html +0 -0
- data/app/views/ish_manager/email_templates/_marketing_ror_2.html +0 -0
- data/app/views/ish_manager/email_templates/_marketing_wordpress_1.html +0 -0
- data/app/views/ish_manager/email_templates/_marketing_wordpress_2.html +0 -0
- data/app/views/ish_manager/email_templates/_piousbox_roundborders.html.erb +1005 -0
- data/app/views/ish_manager/email_templates/_social.html.erb +181 -0
- data/app/views/ish_manager/email_templates/index.haml +18 -0
- data/app/views/ish_manager/email_templates/show.haml +4 -0
- data/app/views/ish_manager/{application_mailer → iron_warbler_mailer}/condor_followup_alerb.html.erb +0 -0
- data/app/views/ish_manager/{application_mailer → iron_warbler_mailer}/option_alert.html.erb +0 -0
- data/app/views/ish_manager/{application_mailer → iron_warbler_mailer}/stock_alert.html.erb +0 -0
- data/app/views/ish_manager/maps/_map_meta_row.haml +1 -1
- data/app/views/ish_manager/{meeting_mailer → office_mailer}/morning_reminder.haml +0 -0
- data/app/views/ish_manager/office_mailer/render +1 -0
- data/app/views/ish_manager/{application_mailer → office_mailer}/test_email.html.haml +0 -0
- data/app/views/ish_manager/{cities → trash/cities}/_form.haml +0 -0
- data/app/views/ish_manager/{cities → trash/cities}/_header.haml +0 -0
- data/app/views/ish_manager/{cities → trash/cities}/edit.haml +0 -0
- data/app/views/ish_manager/{cities → trash/cities}/edit_feature.haml +0 -0
- data/app/views/ish_manager/{cities → trash/cities}/index.haml +0 -0
- data/app/views/ish_manager/{cities → trash/cities}/new.haml +0 -0
- data/app/views/ish_manager/{cities → trash/cities}/new_feature.haml +0 -0
- data/app/views/ish_manager/{cities → trash/cities}/new_newsitem.haml +0 -0
- data/app/views/ish_manager/{cities → trash/cities}/show.haml +0 -0
- data/app/views/ish_manager/{events → trash/events}/_form.haml +0 -0
- data/app/views/ish_manager/{events → trash/events}/_index.haml +0 -0
- data/app/views/ish_manager/{events → trash/events}/edit.haml +0 -0
- data/app/views/ish_manager/{events → trash/events}/index.haml +0 -0
- data/app/views/ish_manager/{events → trash/events}/new.haml +0 -0
- data/app/views/ish_manager/trash/meeting_mailer/README.txt +5 -0
- data/app/views/ish_manager/{sites → trash/sites}/_form.haml +0 -0
- data/app/views/ish_manager/{sites → trash/sites}/_header.haml +0 -0
- data/app/views/ish_manager/{sites → trash/sites}/edit.haml +0 -0
- data/app/views/ish_manager/{sites → trash/sites}/galleries.haml +0 -0
- data/app/views/ish_manager/{sites → trash/sites}/index.haml +0 -0
- data/app/views/ish_manager/{sites → trash/sites}/new.haml +0 -0
- data/app/views/ish_manager/{sites → trash/sites}/show.haml +0 -0
- data/app/views/ish_manager/{venues → trash/venues}/_form.haml +0 -0
- data/app/views/ish_manager/{venues → trash/venues}/_index.haml +0 -0
- data/app/views/ish_manager/{venues → trash/venues}/_search.haml +0 -0
- data/app/views/ish_manager/{venues → trash/venues}/edit.haml +0 -0
- data/app/views/ish_manager/{venues → trash/venues}/index.haml +0 -0
- data/app/views/ish_manager/{venues → trash/venues}/new.haml +0 -0
- data/app/views/ish_manager/{venues → trash/venues}/show.haml +0 -0
- data/app/views/layouts/ish_manager/application.haml +13 -13
- data/config/routes.rb +24 -7
- metadata +61 -41
- data/app/views/ish_manager/features/_index.haml-trash +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cc1e1c6fd0e576fee2cf327929a540a650cc4da39b025eb0ff97332ada0439e
|
4
|
+
data.tar.gz: 83eb8dc00dd3fd7647ef6b65cf165f43d52986683ca8ce64cab8e8cefd9943ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51f0cde29fabb31471868d98df64781619746d210388b6a5ff5f0228143f06b35f52ed1f9144d847e781be7e2e4607749b387080b07e696bfd3aae1424a2d69c
|
7
|
+
data.tar.gz: df027163d5387582f1a8edd003151864544ef15dd7e09d0f5cb59d94774bb822a6de471049b82ec645ab5e6f6e6f8b432774a40e61f2123497687cf0326f2a84
|
@@ -0,0 +1,47 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
.email-contexts-new {
|
4
|
+
.actions {
|
5
|
+
display: flex;
|
6
|
+
justify-content: space-between;
|
7
|
+
}
|
8
|
+
}
|
9
|
+
|
10
|
+
.email-contexts-show {
|
11
|
+
|
12
|
+
iframe {
|
13
|
+
min-height: 500px;
|
14
|
+
}
|
15
|
+
|
16
|
+
}
|
17
|
+
|
18
|
+
.email-templates-index ul li,
|
19
|
+
.email-contexts-index {
|
20
|
+
|
21
|
+
a {
|
22
|
+
margin-right: 0.5em;
|
23
|
+
|
24
|
+
&::before {
|
25
|
+
content: "[";
|
26
|
+
}
|
27
|
+
|
28
|
+
&::after {
|
29
|
+
content: "]";
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
}
|
34
|
+
|
35
|
+
.email-templates--form {
|
36
|
+
border: 1px solid red;
|
37
|
+
padding: 1em;
|
38
|
+
|
39
|
+
form {
|
40
|
+
display: flex;
|
41
|
+
|
42
|
+
> * {
|
43
|
+
padding-right: 20px;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
|
2
|
+
class ::IshManager::EmailContextsController < ::IshManager::ApplicationController
|
3
|
+
|
4
|
+
before_action :set_lists
|
5
|
+
|
6
|
+
def create
|
7
|
+
authorize! :create, ::Ish::EmailContext
|
8
|
+
@email_ctx = ::Ish::EmailContext.new params[:ish_email_context].permit!
|
9
|
+
if @email_ctx.save
|
10
|
+
flash[:notice] = 'Saved.'
|
11
|
+
redirect_to action: 'show', id: @email_ctx.id
|
12
|
+
return
|
13
|
+
else
|
14
|
+
flash[:alert] = "Could not save: #{@email_ctx.errors.full_messages.join(', ')}"
|
15
|
+
render action: :new
|
16
|
+
return
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def do_send
|
21
|
+
authorize! :send, ::Ish::EmailContext
|
22
|
+
IshManager::OfficeMailer.send_context_email(params[:id]).deliver_later
|
23
|
+
flash[:notice] = 'Scheduled send'
|
24
|
+
redirect_to action: 'index'
|
25
|
+
end
|
26
|
+
|
27
|
+
def edit
|
28
|
+
authorize! :edit, ::Ish::EmailContext
|
29
|
+
@email_ctx = ::Ish::EmailContext.find params[:id]
|
30
|
+
end
|
31
|
+
|
32
|
+
def iframe_src
|
33
|
+
authorize! :iframe_src, Ish::EmailContext
|
34
|
+
@email_ctx = EmailContext.find params[:id]
|
35
|
+
render layout: false
|
36
|
+
end
|
37
|
+
|
38
|
+
def index
|
39
|
+
authorize! :index, ::Ish::EmailContext
|
40
|
+
@email_ctxs = ::Ish::EmailContext.all.page( params[:contexts_page] )
|
41
|
+
end
|
42
|
+
|
43
|
+
def new
|
44
|
+
authorize! :new, ::Ish::EmailContext
|
45
|
+
@email_ctx = ::Ish::EmailContext.new email_template: @template
|
46
|
+
end
|
47
|
+
|
48
|
+
def show
|
49
|
+
authorize! :show, ::Ish::EmailContext
|
50
|
+
@email_ctx = ::Ish::EmailContext.find( params[:id] )
|
51
|
+
end
|
52
|
+
|
53
|
+
def update
|
54
|
+
authorize! :update, ::Ish::EmailContext
|
55
|
+
@email_ctx = ::Ish::EmailContext.find params[:id]
|
56
|
+
if @email_ctx.update_attributes params[:ish_email_context].permit!
|
57
|
+
flash[:notice] = 'Saved.'
|
58
|
+
redirect_to action: 'show', id: @email_ctx.id
|
59
|
+
return
|
60
|
+
else
|
61
|
+
flash[:alert] = "Could not save: #{@email_ctx.errors.full_messages.join(', ')}"
|
62
|
+
render action: :edit
|
63
|
+
return
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
private
|
68
|
+
|
69
|
+
def set_lists
|
70
|
+
@email_templates_list = [ [nil, nil] ] + ::Ish::EmailTemplate.all.map { |tmpl| [ tmpl.slug, tmpl.id ] }
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
|
2
|
+
class ::IshManager::EmailTemplatesController < ::IshManager::ApplicationController
|
3
|
+
|
4
|
+
def create
|
5
|
+
authorize! :create, ::Ish::EmailTemplate
|
6
|
+
template = ::Ish::EmailTemplate.create params[:ish_email_template].permit!
|
7
|
+
if template.persisted?
|
8
|
+
flash[:notice] = 'Success.'
|
9
|
+
else
|
10
|
+
flash[:alert] = "Could not create an email template: #{template.errors.full_messages.join(', ')}."
|
11
|
+
end
|
12
|
+
redirect_to action: :index
|
13
|
+
end
|
14
|
+
|
15
|
+
def destroy
|
16
|
+
authorize! :destroy, ::Ish::EmailTemplate
|
17
|
+
@template = Ish::EmailTemplate.where({ id: params[:id] }).first || Ish::EmailTemplate.find_by({ slug: params[:id] })
|
18
|
+
if @template.destroy
|
19
|
+
flash[:notice] = 'Success.'
|
20
|
+
else
|
21
|
+
flash[:alert] = 'Cannot destroy this template.'
|
22
|
+
end
|
23
|
+
redirect_to action: :index
|
24
|
+
end
|
25
|
+
|
26
|
+
def iframe_src
|
27
|
+
authorize! :iframe_src, Ish::EmailTemplate
|
28
|
+
end
|
29
|
+
|
30
|
+
def index
|
31
|
+
authorize! :index, Ish::EmailTemplate
|
32
|
+
@templates = Ish::EmailTemplate.all.page( params[:templates_page] )
|
33
|
+
end
|
34
|
+
|
35
|
+
def show
|
36
|
+
authorize! :show, Ish::EmailTemplate
|
37
|
+
@email_ctx = EmailContext.new
|
38
|
+
@template = Ish::EmailTemplate.where({ id: params[:id] }).first || Ish::EmailTemplate.find_by({ slug: params[:id] })
|
39
|
+
# render params[:id], layout: false
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
class IshManager::InvoicesController < IshManager::ApplicationController
|
2
|
+
class ::IshManager::InvoicesController < IshManager::ApplicationController
|
3
3
|
|
4
4
|
before_action :set_lists
|
5
5
|
|
@@ -39,7 +39,7 @@ class IshManager::InvoicesController < IshManager::ApplicationController
|
|
39
39
|
# private
|
40
40
|
#
|
41
41
|
private
|
42
|
-
|
42
|
+
|
43
43
|
def set_lists
|
44
44
|
@invoice_number = Ish::Invoice.order_by( :number => :desc ).first
|
45
45
|
@invoice_number = @invoice_number ? @invoice_number.number + 1 : 1
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,22 @@
|
|
1
|
+
|
2
|
+
class IshManager::OfficeMailer < IshManager::ApplicationMailer
|
3
|
+
default from: 'piousbox@gmail.com'
|
4
|
+
# layout 'mailer'
|
5
|
+
|
6
|
+
def send_context_email ctx_id
|
7
|
+
@email_ctx = ::Ish::EmailContext.find ctx_id
|
8
|
+
template = "render/_#{@email_ctx.email_template.slug}"
|
9
|
+
|
10
|
+
ac = ActionController::Base.new
|
11
|
+
ac.instance_variable_set( :@email_ctx, @email_ctx )
|
12
|
+
rendered_str = ac.render_to_string("ish_manager/email_templates/_#{@email_ctx.email_template.slug}")
|
13
|
+
@email_ctx.update( rendered_str: rendered_str, sent_at: Time.now )
|
14
|
+
|
15
|
+
mail( to: @email_ctx.to_email,
|
16
|
+
bcc: 'piousbox@gmail.com',
|
17
|
+
subject: @email_ctx.subject,
|
18
|
+
template_name: template )
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
.application--main-header-admin.main-header{ class: "#{ENV['RAILS_ENV']} #{ENV['RAILS_ENV'][0...3]=="dev" ? "development" : ''}" }
|
4
4
|
.container
|
5
|
-
%i.fa.fa-compress.collapse-expand#
|
5
|
+
%i.fa.fa-compress.collapse-expand#collapseHeaderIsh
|
6
6
|
.content
|
7
7
|
%ul
|
8
8
|
%li{ :class => params[:controller] == 'ish_manager/maps' ? 'active' : '' }
|
@@ -36,11 +36,23 @@
|
|
36
36
|
%li{ :class => params[:controller] == 'ish_manager/user_profiles' ? 'active' : '' }= link_to 'Ish::UserProfiles', user_profiles_path
|
37
37
|
%li
|
38
38
|
= link_to "Ish::ImageAsset's", image_assets_path
|
39
|
+
.c
|
40
|
+
%i.fa.fa-compress.collapse-expand#collapseHeaderOffice
|
41
|
+
.namespace
|
39
42
|
%ul
|
40
43
|
%li= link_to 'Leads', leads_path
|
41
44
|
%li
|
42
45
|
= link_to 'Meetings', meetings_path
|
43
46
|
= link_to '[+]', new_meeting_path
|
47
|
+
%ul
|
48
|
+
%li
|
49
|
+
= link_to 'Email Templates', email_templates_path
|
50
|
+
%li
|
51
|
+
= link_to 'Email Contexts', email_contexts_path
|
52
|
+
%li
|
53
|
+
= link_to 'Email Campaigns', email_campaigns_path
|
54
|
+
%li
|
55
|
+
= link_to 'Sent Emails', sent_emails_path
|
44
56
|
%li
|
45
57
|
= button_to 'Test Email', email_test_path, { form_class: 'inline-block' }
|
46
58
|
%hr
|
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
.email-contexts--form
|
3
|
+
%h2
|
4
|
+
New Email Context
|
5
|
+
-# with template `#{email_ctx.email_template&.slug}`
|
6
|
+
|
7
|
+
- url = %w| index new create |.include?( params[:action] ) ? email_contexts_path : email_context_path(email_ctx)
|
8
|
+
= form_for email_ctx, url: url do |f|
|
9
|
+
.field
|
10
|
+
= f.label :email_template_id
|
11
|
+
= f.select :email_template_id, options_for_select(@email_templates_list, selected: params[:email_template_id] || email_ctx.email_template&.id )
|
12
|
+
|
13
|
+
.field
|
14
|
+
= f.label :to_email
|
15
|
+
= f.text_field :to_email
|
16
|
+
.field
|
17
|
+
= f.label :subject
|
18
|
+
= f.text_field :subject
|
19
|
+
.field
|
20
|
+
= f.label :body
|
21
|
+
= f.text_area :body, class: 'tinymce'
|
22
|
+
.actions
|
23
|
+
.left
|
24
|
+
= f.submit 'Preview'
|
25
|
+
.right
|
26
|
+
-# = f.submit 'Schedule/Send'
|
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
.email-contexts-index
|
3
|
+
|
4
|
+
%h2
|
5
|
+
Paginated Email Contexts (aka emails)
|
6
|
+
= link_to '+', new_email_context_path
|
7
|
+
|
8
|
+
%ul
|
9
|
+
- @email_ctxs.each do |ctx|
|
10
|
+
%li
|
11
|
+
- if ctx.sent_at
|
12
|
+
\----
|
13
|
+
- else
|
14
|
+
= link_to '~', edit_email_context_path(ctx)
|
15
|
+
= link_to email_context_path(ctx) do
|
16
|
+
view
|
17
|
+
-# %i.fa.fa-external-link
|
18
|
+
= link_to email_context_iframe_path(ctx), target: :_blank do
|
19
|
+
iframe
|
20
|
+
%i.fa.fa-external-link
|
21
|
+
To #{ctx.to_email}: #{ctx.subject}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
.email-contexts-show
|
3
|
+
|
4
|
+
%ul
|
5
|
+
%li <b>To:</b> #{@email_ctx.to_email}
|
6
|
+
%li <b>Subject:</b> #{@email_ctx.subject}
|
7
|
+
%li <b>Template:</b> #{@email_ctx.email_template.slug}
|
8
|
+
- if @email_ctx.sent_at
|
9
|
+
%li <b>Sent at:</b> #{@email_ctx.sent_at.strftime('%Y-%m-%d %l:%M%P')}
|
10
|
+
- else
|
11
|
+
%li= button_to 'Send', email_context_send_path(@email_ctx)
|
12
|
+
|
13
|
+
- if @email_ctx.sent_at
|
14
|
+
=raw @email_ctx.rendered_str
|
15
|
+
- else
|
16
|
+
%iframe{ src: email_context_iframe_path(@email_ctx), width: '100%', height: '100%' }
|
@@ -0,0 +1,11 @@
|
|
1
|
+
|
2
|
+
- url = %w| index new create |.include?( params[:action] ) ? email_templates_path : email_template_path(email_template.id)
|
3
|
+
|
4
|
+
.email-templates--form
|
5
|
+
= form_for email_template, url: url do |f|
|
6
|
+
%h3 New Email Template
|
7
|
+
.field
|
8
|
+
= f.label :slug
|
9
|
+
= f.text_field :slug
|
10
|
+
.actions
|
11
|
+
= f.submit 'Submit'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|