ish_manager 0.1.8.355 → 0.1.8.357

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 (80) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/ish_manager/application.js +68 -15
  3. data/app/assets/javascripts/ish_manager/email_contexts.js +1 -1
  4. data/app/assets/javascripts/ish_manager/email_templates.js +20 -0
  5. data/app/assets/javascripts/ish_manager/galleries.js +78 -0
  6. data/app/assets/stylesheets/ish_manager/application.scss +48 -9
  7. data/app/assets/stylesheets/ish_manager/email.scss +44 -0
  8. data/app/assets/stylesheets/ish_manager/{email_contexts_templates.scss → email_contexts.scss} +29 -49
  9. data/app/assets/stylesheets/ish_manager/email_conversations.scss +99 -21
  10. data/app/assets/stylesheets/ish_manager/email_templates.scss +59 -0
  11. data/app/assets/stylesheets/ish_manager/galleries.scss +10 -0
  12. data/app/assets/stylesheets/ish_manager/leads_leadsets.scss +96 -3
  13. data/app/assets/stylesheets/ish_manager/scheduled_actions_emails.scss +25 -0
  14. data/app/assets/stylesheets/ish_manager/tags.scss +5 -0
  15. data/app/controllers/ish_manager/application_controller.rb +15 -0
  16. data/app/controllers/ish_manager/email_actions_controller.rb +80 -0
  17. data/app/controllers/ish_manager/email_campaigns_controller.rb +13 -0
  18. data/app/controllers/ish_manager/email_contexts_controller.rb +41 -48
  19. data/app/controllers/ish_manager/email_conversations_controller.rb +6 -2
  20. data/app/controllers/ish_manager/email_filters_controller.rb +47 -0
  21. data/app/controllers/ish_manager/email_messages_controller.rb +1 -1
  22. data/app/controllers/ish_manager/email_templates_controller.rb +23 -10
  23. data/app/controllers/ish_manager/galleries_controller.rb +23 -8
  24. data/app/controllers/ish_manager/leads_controller.rb +3 -9
  25. data/app/controllers/ish_manager/leadset_tags_controller.rb +18 -0
  26. data/app/controllers/ish_manager/leadsets_controller.rb +13 -0
  27. data/app/controllers/ish_manager/scheduled_email_actions_controller.rb +38 -0
  28. data/app/helpers/ish_manager/application_helper.rb +4 -0
  29. data/app/mailers/ish_manager/application_mailer.rb +1 -1
  30. data/app/mailers/ish_manager/meeting_mailer.rb +2 -1
  31. data/app/mailers/ish_manager/office_mailer.rb +12 -10
  32. data/app/views/ish_manager/application/_debug.haml +2 -1
  33. data/app/views/ish_manager/application/_main_header_admin.haml +47 -60
  34. data/app/views/ish_manager/email_actions/_form.haml +52 -0
  35. data/app/views/ish_manager/email_actions/edit.haml +7 -0
  36. data/app/views/ish_manager/email_actions/index.haml +26 -0
  37. data/app/views/ish_manager/email_actions/new.haml +7 -0
  38. data/app/views/ish_manager/email_contexts/_form.haml +32 -30
  39. data/app/views/ish_manager/email_contexts/edit.haml +1 -1
  40. data/app/views/ish_manager/email_contexts/index.haml +27 -22
  41. data/app/views/ish_manager/email_contexts/show.haml +26 -15
  42. data/app/views/ish_manager/email_conversations/index.haml +46 -9
  43. data/app/views/ish_manager/email_conversations/show.haml +56 -21
  44. data/app/views/ish_manager/email_filters/_form.haml +12 -0
  45. data/app/views/ish_manager/email_filters/edit.haml +5 -0
  46. data/app/views/ish_manager/email_filters/index.haml +24 -0
  47. data/app/views/ish_manager/email_filters/new.haml +5 -0
  48. data/app/views/ish_manager/email_templates/_form.haml +32 -13
  49. data/app/views/ish_manager/email_templates/_form_reply_2_mini.haml +15 -0
  50. data/app/views/ish_manager/email_templates/_form_reply_mini.haml +1 -1
  51. data/app/views/ish_manager/email_templates/_index.haml +24 -11
  52. data/app/views/ish_manager/email_templates/_piousbox_roundborders.html.erb +4 -1
  53. data/app/views/ish_manager/email_templates/_wasyaco_roundborders.html.erb +5 -6
  54. data/app/views/ish_manager/email_templates/done/_form.haml +22 -0
  55. data/app/views/ish_manager/email_templates/done/_form2.haml +26 -0
  56. data/app/views/ish_manager/email_templates/edit.haml +2 -1
  57. data/app/views/ish_manager/email_templates/iframe_src.haml +4 -3
  58. data/app/views/ish_manager/email_templates/new.haml +5 -0
  59. data/app/views/ish_manager/email_templates/show.haml +9 -3
  60. data/app/views/ish_manager/galleries/show.haml +10 -1
  61. data/app/views/ish_manager/leads/_form.haml +11 -6
  62. data/app/views/ish_manager/leads/_form_import.haml +3 -3
  63. data/app/views/ish_manager/leads/edit.haml +19 -16
  64. data/app/views/ish_manager/leads/index.haml +25 -16
  65. data/app/views/ish_manager/leads/new.haml +8 -7
  66. data/app/views/ish_manager/leadsets/index.haml +60 -12
  67. data/app/views/ish_manager/leadsets/index_dataTables.haml +33 -0
  68. data/app/views/ish_manager/photos/_index_thumbs.haml +1 -1
  69. data/app/views/ish_manager/scheduled_actions/_form_mini.haml +16 -0
  70. data/app/views/ish_manager/scheduled_email_actions/_form.haml +26 -0
  71. data/app/views/ish_manager/scheduled_email_actions/index.haml +15 -0
  72. data/app/views/ish_manager/scheduled_email_actions/new.haml +4 -0
  73. data/app/views/ish_manager/scheduled_email_actions/show.haml +0 -0
  74. data/app/views/layouts/ish_manager/application.haml +2 -2
  75. data/app/views/layouts/ish_manager/application_fullwidth.haml +2 -2
  76. data/config/routes.rb +11 -2
  77. metadata +31 -6
  78. data/app/controllers/ish_manager/office_actions_controller.rb +0 -59
  79. data/app/views/ish_manager/office_actions/_form.haml +0 -83
  80. data/app/views/ish_manager/office_actions/index.haml +0 -9
@@ -1,21 +1,32 @@
1
1
 
2
2
  .email-contexts-show
3
+ .header
4
+ %h2.title Email Context
3
5
 
4
- %ul
5
- %li <b>Title:</b> #{@email_ctx.title}
6
- %li <b>From:</b> #{@email_ctx.from_email}
7
- %li <b>Subject:</b> #{@email_ctx.subject}
8
- %li <b>To:</b> #{@email_ctx.to_email}
9
- %li <b>Template:</b> #{@email_ctx.email_template.slug} <b>Type:</b> #{@email_ctx.email_template.type}
10
- %li <b>Send at:</b> #{@email_ctx.send_at&.strftime('%Y-%m-%d %l:%M%P')}
11
- %li <b>Sent at:</b> #{@email_ctx.sent_at&.strftime('%Y-%m-%d %l:%M%P')}
12
- %li
13
- = button_to 'Send', email_context_send_path(@email_ctx), form_class: 'inline', :data => { :confirm => 'Are you sure?' }
14
- = link_to '[~]', edit_email_context_path(@email_ctx)
6
+ .row
7
+ .col-md-4
8
+ %ul
9
+ %li <b>From:</b> #{@ctx.from_email}
10
+ %li <b>To Lead:</b> #{@ctx.lead_id ? @ctx.lead.email : '-'}
11
+ %li <b>Subject:</b> #{@ctx.subject}
15
12
 
16
- - if @email_ctx.sent_at
17
- = raw @email_ctx.rendered_str
18
- = @email_ctx.tmpl
13
+ .col-md-4
14
+ %ul
15
+ %li <b>Template:</b> #{link_to @ctx.email_template.slug, email_template_path(@ctx.email_template), target: :_blank }
16
+ %li <b>Layout:</b> #{@ctx.email_template.layout}
17
+
18
+ .col-md-4
19
+ %ul
20
+ %li <b>Send at:</b> #{@ctx.send_at&.strftime('%Y-%m-%d %l:%M%P')}
21
+ %li <b>Sent at:</b> #{@ctx.sent_at&.strftime('%Y-%m-%d %l:%M%P')}
22
+ %li
23
+ = button_to 'Send', email_context_send_path(@ctx), form_class: 'inline', :data => { :confirm => 'Are you sure?' }
24
+ = link_to '[~]', edit_email_context_path(@ctx)
25
+
26
+ - if @ctx.sent_at
27
+ = raw @ctx.rendered_str
28
+ = @ctx.tmpl
19
29
 
20
30
  - else
21
- %iframe{ src: email_context_iframe_path(@email_ctx), width: '100%', height: '100%' }
31
+ = link_to 'i-src', email_context_iframe_path(@ctx), target: :_blank
32
+ %iframe{ src: email_context_iframe_path(@ctx), width: '100%', height: '100%' }
@@ -1,12 +1,49 @@
1
1
 
2
2
  .email-conversations-index
3
- %h1 Email Conversations
4
-
5
- %ul
6
- - @email_conversations.each do |c|
7
- %li
8
- = c.latest_date.to_s[0...10]
9
- .participants= c.participants.join(", ")
10
- = link_to c.subject, email_conversation_path( c )
11
- (#{c.email_messages.count})
3
+
4
+ .header
5
+ %i.material-icons mail
6
+ Inbox (#{Office::EmailConversation.all.length})
7
+
8
+ .actions
9
+
10
+ %a.btn.delete-btn{ href: "javascript: void(0)", data: { url: '/api/email_conversations' } }
11
+ %i.material-icons delete
12
+ %a.btn.reload-btn{ href: "javascript: location.reload()" }
13
+ %i.material-icons refresh
14
+
15
+ %table.conversations
16
+ %tr
17
+ %th
18
+ .chip.select-all
19
+ = check_box_tag :select_all
20
+ .n-selected -
21
+ %th Msgs
22
+ %th Leads
23
+ %th Subject
24
+ %th Datetime
25
+ %th Tags
26
+
27
+ - @email_conversations.each do |conv|
28
+ %tr{ class: [ conv.state ] }
29
+ .item
30
+ %td= check_box_tag 'email_conversation_ids[]', conv.id.to_s, nil, { class: 'i-sel' }
31
+ %td.count
32
+ (#{conv.email_messages.count})
33
+
34
+ %td.leads
35
+ = conv.leads.map { |lead| lead.email }.join(", ")
36
+
37
+ %td.subject
38
+ = link_to conv.subject, email_conversation_path( conv )
39
+
40
+ %td.datetime
41
+ .date= conv.latest_at.strftime('%Y-%m-%d')
42
+ .time= conv.latest_at.strftime('%l:%M%P')
43
+
44
+ %td
45
+ .tags
46
+ - conv.tags.each do |tag|
47
+ .chip
48
+ = tag.name
12
49
 
@@ -1,27 +1,62 @@
1
1
 
2
2
  .email-conversations-show
3
- .actions.hide
4
- = link_to '[<- all conv]', email_conversations_path
5
-
6
- .header
7
- .label
8
- = link_to '[<-]', email_conversations_path
9
- Conversation:
10
- %h1
11
- #{@email_conversation.subject}
12
- (#{@email_conversation.email_messages.all.count})
13
-
14
- .participants
3
+
4
+ .header.max-width
5
+ %i.material-icons mail
6
+ Inbox (#{Office::EmailConversation.all.length})
7
+
8
+ = link_to '[<<-]', email_conversations_path
9
+ -# = link_to '[<-]', email_conversations_path
10
+ #{@email_conversation.subject}
11
+ (#{@email_conversation.email_messages.all.count})
12
+
13
+ .leads.max-width
14
+ Leads (#{@email_conversation.leads.length}):
15
15
  %ul
16
- - @email_conversation.participants.each do |p|
16
+ - @email_conversation.leads.each do |p|
17
17
  %li
18
- = p
19
- = render 'ish_manager/email_templates/form_reply_mini'
20
- = render 'ish_manager/email_templates/form_schedule_mini'
18
+ = p.email
19
+ [existing actions?]
20
+ = render 'ish_manager/email_templates/form_reply_2_mini'
21
+ = render 'ish_manager/scheduled_actions/form_mini'
21
22
 
22
- %ul.messages
23
+
24
+ .messages.max-width
23
25
  - @email_messages.each do |m|
24
- %li
25
- .date= link_to m.date.to_s[0...10], email_message_path( m )
26
- .preview
27
- = (ActionView::Base.full_sanitizer.sanitize( m.part_html )||'<no-info>')[0..300]
26
+ - lead = m.lead || Lead.new(email: 'NO LEAD!', id: 'no lead')
27
+
28
+ .item
29
+ .row-1
30
+ .gray= m.id
31
+
32
+ .chip.from
33
+ -# = m.from
34
+ = lead.email
35
+
36
+ .relative
37
+ %a.chip{ href: email_contexts_for_lead_path( lead ) }
38
+ \(
39
+ = lead.email_contexts.count
40
+ %i.fa.fa-envelope
41
+ \)
42
+
43
+ .relative
44
+ %i.fa.fa-clock-o.expand-next
45
+ = render 'ish_manager/scheduled_email_actions/form', scheduled_email_action: Sch.new({ lead_id: lead.id })
46
+
47
+ .datetime
48
+ .date= m.date&.strftime('%Y-%m-%d')
49
+ .time= m.date&.strftime('%l:%M%P')
50
+
51
+ .row-2
52
+ %a.preview{ href: "javascript: void(0)", data: { id: m.id.to_s } }
53
+ = (ActionView::Base.full_sanitizer.sanitize( m.part_html )||'<no-info>')[0..300]
54
+ .expand
55
+
56
+ .my-actions.hide
57
+ = render 'ish_manager/email_templates/form_reply_2_mini'
58
+ -# = button_to 'Reply'
59
+ -# = button_to 'Reply All'
60
+ -# = button_to 'New Template'
61
+ -# = button_to 'Schedule Reply'
62
+ -# = render 'ish_manager/email_templates/form_schedule_mini'
@@ -0,0 +1,12 @@
1
+
2
+ - url = email_filter.new_record? ? email_filters_path : email_filter_path( email_filter )
3
+ .email-filters--from
4
+ = form_for email_filter, url: url, as: :email_filter do |f|
5
+ .field
6
+ %label From Regex
7
+ = f.text_field :from_regex
8
+ .field
9
+ %label Kind
10
+ = f.select :kind, options_for_select( ::Office::EmailFilter::KINDS, selected: email_filter.kind )
11
+ .actions
12
+ = f.submit
@@ -0,0 +1,5 @@
1
+
2
+ .emails-ns.email-filters-new
3
+ .header
4
+ %h2.title Edit Email Filter
5
+ = render 'form', email_filter: @email_filter
@@ -0,0 +1,24 @@
1
+
2
+ .email-filters-index
3
+ .header
4
+ %h2.title
5
+ Email Filters (#{@email_filters.length})
6
+ = link_to '[+]', new_email_filter_path
7
+
8
+ %table.bordered
9
+ %tr
10
+ %th &nbsp;
11
+ %th &nbsp;
12
+ %th From Regex
13
+ %th Body Regex
14
+ %th Kind
15
+ - @email_filters.each do |ef|
16
+
17
+ %tr
18
+ %td= check_box_tag 'checked'
19
+ %td= link_to '[~]', edit_email_filter_path(ef)
20
+ %td= ef.from_regex
21
+ %td= ef.body_regex
22
+ %td= ef.kind
23
+
24
+
@@ -0,0 +1,5 @@
1
+
2
+ .emails-ns.email-filters-new
3
+ .header
4
+ %h2.title New Email Filter
5
+ = render 'form', email_filter: @email_filter
@@ -1,22 +1,41 @@
1
1
 
2
- - url = %w| index new create |.include?( params[:action] ) ? email_templates_path : email_template_path(email_template.id)
2
+ - url = email_template.new_record? ? email_templates_path : email_template_path(email_template.id)
3
3
 
4
4
  .email-templates--form
5
+
6
+ .header
7
+ %h2 Email Template
8
+
5
9
  = form_for email_template, url: url do |f|
6
- .field
7
- = f.label :type
8
- = f.select :type, options_for_select(Ish::EmailTemplate.type_list, selected: email_template.type)
9
- .field
10
- = f.label :slug
11
- = f.text_field :slug
12
- .field
13
- = f.label :from_email
14
- = f.select :from_email, options_for_select(Ish::EmailContext.from_email_list, selected: email_template.from_email)
10
+ .row
11
+ .col-md-4
12
+ .field
13
+ = f.label :slug
14
+ = f.text_field :slug
15
+ .col-md-4
16
+ .field
17
+ = f.label :layout
18
+ = f.select :layout, options_for_select(Ish::EmailTemplate::LAYOUTS, selected: email_template.layout)
19
+ .col-md-4
20
+ .field
21
+ = f.label "From"
22
+ = f.select :from_email, options_for_select(Ish::EmailContext.from_email_list, selected: email_template.from_email)
15
23
  .field.field-subject
16
24
  = f.label :subject
17
25
  = f.text_field :subject
18
26
  .field
19
- = f.label :body
20
- = f.text_area :body, class: 'tinymce'
27
+ = f.label :preview_str
28
+ = f.text_field :preview_str
29
+
30
+ .tab-labels
31
+ %a.label-raw{ href: "javascript: void(0)", data: { ref: '.tab-raw' } } Raw
32
+ %a.label-preview.active{ href: "javascript: void(0)", data: { ref: '.tab-preview' } } Preview
33
+ .label-save-preview= f.submit 'Save & Preview'
34
+ .tabs
35
+ .tab-raw
36
+ = f.text_area :body
37
+ .tab-preview
38
+ -# .descr= render "ish_manager/email_templates/#{email_template.layout}", ctx: Ish::EmailContext.new, tmpl: email_template
39
+ %iframe{ src: email_template_iframe_path(email_template), width: '100%', height: '100%' }
21
40
  .actions
22
- = f.submit 'Submit'
41
+ = f.submit 'Save'
@@ -0,0 +1,15 @@
1
+
2
+ .email-templates--form-reply-2-mini.form-mini
3
+ = form_for ::Ish::EmailContext.new, url: email_contexts_path do |f|
4
+ .field
5
+ -# = f.label :template
6
+ = f.select :email_template_id, options_for_select( @email_templates_list )
7
+ .action
8
+ = f.submit 'Reply'
9
+
10
+ .field.send-at
11
+ -# = f.label :send_at
12
+ = f.text_field :send_at, placeholder: 'YYYY-MM-DD', size: 10, class: 'input-date'
13
+
14
+ .action
15
+ = f.submit 'Schedule'
@@ -3,6 +3,6 @@
3
3
  = form_for ::Ish::EmailContext.new, url: email_contexts_path do |f|
4
4
  .field
5
5
  -# = f.label :template
6
- = f.select :email_template_id, options_for_select([ ['abba', 'abba'], ['zetta', 'zetta'] ])
6
+ = f.select :email_template_id, options_for_select( @email_templates_list )
7
7
  .actions
8
8
  = f.submit 'Reply'
@@ -1,16 +1,29 @@
1
1
 
2
- %h3.collapse-expand#emailTemplatesIndex
3
- Email Templates
2
+ %h3.center.collapse-expand#emailTemplatesIndex
3
+ Email Templates (#{Ish::EmailTemplate.all.count})
4
4
  .email-templates-index
5
5
 
6
- = render 'ish_manager/email_templates/form_mini'
7
- %ul
6
+ -# = render 'ish_manager/email_templates/form_mini'
7
+
8
+ %table.bordered
9
+ %tr
10
+ %th Actions
11
+ %th Slug
12
+ %th Created
13
+ %th Updated
14
+
15
+
8
16
  - @templates.each do |tmpl|
9
- %li
10
- = link_to 'Use', new_email_context_path({ email_template_id: tmpl.id })
11
- = link_to 'Edit', edit_email_template_path({ id: tmpl })
12
- = link_to 'View', email_template_path({ id: tmpl })
13
- = link_to 'iFrame', email_template_iframe_path({ id: tmpl }), target: :_blank
14
- = tmpl.slug
15
- = button_to '[x]', email_template_path({ id: tmpl }), method: :delete, :data => { :confirm => 'Are you sure?' }, form_class: 'inline'
17
+ %tr
18
+ %td
19
+ = link_to '[use]', new_email_context_path({ email_template_id: tmpl.id })
20
+ = link_to '[~]', edit_email_template_path({ id: tmpl })
21
+ = button_to '[x]', email_template_path({ id: tmpl }), method: :delete, :data => { :confirm => 'Are you sure?' }, form_class: 'inline'
22
+ %td= link_to tmpl.slug, email_template_path({ id: tmpl })
23
+ %td= tmpl.created_at
24
+ %td= tmpl.updated_at
25
+
26
+ -# = link_to 'iFrame', email_template_iframe_path({ id: tmpl }), target: :_blank
27
+
28
+ %hr
16
29
 
@@ -1,3 +1,4 @@
1
+
1
2
  <!doctype html>
2
3
  <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" >
3
4
  <head>
@@ -907,7 +908,9 @@ h4 {
907
908
  <![endif]-->
908
909
 
909
910
  <div style="border: 2px solid #999; border-radius: 4px; padding: 1em; margin-bottom: 1em;">
910
- <%== @email_ctx.body %>
911
+ <!-- herehere -->
912
+ <%== ERB.new(@tmpl.body).result((@ctx||@tmpl).get_binding) %>
913
+
911
914
  </div>
912
915
 
913
916
  <!--[if mso]>
@@ -13,7 +13,7 @@
13
13
  <meta charset="UTF-8">
14
14
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
15
15
  <meta name="viewport" content="width=device-width, initial-scale=1">
16
- <title>*|MC:SUBJECT|*</title>
16
+ <title><%= @ctx.preview_str %></title>
17
17
 
18
18
  <style type="text/css">
19
19
  .mcnTextBlock {
@@ -839,12 +839,11 @@ h4 {
839
839
 
840
840
  <body>
841
841
 
842
- <!--*|IF:MC_PREVIEW_TEXT|*-->
843
- <!--[if !gte mso 9]><span class="mcnPreviewText"
844
- style="display:none; font-size:0px; line-height:0px; max-height:0px; max-width:0px; opacity:0; overflow:hidden; visibility:hidden; mso-hide:all;"
845
- >*|MC_PREVIEW_TEXT|*</span>
842
+
843
+ <!--[if !gte mso 9]>-->
844
+ <span class="mcnPreviewText" style="display:none; font-size:0px; line-height:0px; max-height:0px; max-width:0px; opacity:0; overflow:hidden; visibility:hidden; mso-hide:all;"
845
+ ><%= @ctx.preview_str %></span>
846
846
  <!--<![endif]-->
847
- <!--*|END:IF|*-->
848
847
 
849
848
  <center>
850
849
  <table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable">
@@ -0,0 +1,22 @@
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
+ .field
7
+ = f.label :type
8
+ = f.select :type, options_for_select(Ish::EmailTemplate.type_list, selected: email_template.type)
9
+ .field
10
+ = f.label :slug
11
+ = f.text_field :slug
12
+ .field
13
+ = f.label :from_email
14
+ = f.select :from_email, options_for_select(Ish::EmailContext.from_email_list, selected: email_template.from_email)
15
+ .field.field-subject
16
+ = f.label :subject
17
+ = f.text_field :subject
18
+ .field
19
+ = f.label :body
20
+ = f.text_area :body, class: 'tinymce'
21
+ .actions
22
+ = f.submit 'Submit'
@@ -0,0 +1,26 @@
1
+
2
+ - url = email_template.new_record? ? email_templates_path : email_template_path(email_template.id)
3
+
4
+ .email-templates--form
5
+ = form_for email_template, url: url do |f|
6
+ .row
7
+ .col-md-4
8
+ .field
9
+ = f.label :slug
10
+ = f.text_field :slug
11
+ .col-md-4
12
+ .field
13
+ = f.label :layout
14
+ = f.select :layout, options_for_select(Ish::EmailTemplate::LAYOUTS, selected: email_template.layout)
15
+ .col-md-4
16
+ .field
17
+ = f.label "From"
18
+ = f.select :from_email, options_for_select(Ish::EmailContext.from_email_list, selected: email_template.from_email)
19
+ .field.field-subject
20
+ = f.label :subject
21
+ = f.text_field :subject
22
+ .field
23
+ -# = f.label :body
24
+ = f.text_area :body, class: 'tinymce'
25
+ .actions
26
+ = f.submit 'Submit'
@@ -1,2 +1,3 @@
1
1
 
2
- = render 'form', email_template: @template
2
+ .email-templates-edit.max-width
3
+ = render 'form', email_template: @email_template
@@ -1,4 +1,5 @@
1
1
 
2
- -# = @email_template.inspect
3
-
4
- = render "ish_manager/email_templates/#{@email_template.slug}", ctx: @email_ctx
2
+ - if @email_template.layout == 'plain'
3
+ = raw @email_template.body
4
+ - else
5
+ = render "ish_manager/email_templates/#{@email_template.layout}", ctx: @email_ctx
@@ -0,0 +1,5 @@
1
+
2
+
3
+ %h1 New Email Template
4
+
5
+ = render 'form', email_template: @new_email_template
@@ -1,7 +1,13 @@
1
1
 
2
- = render 'index'
3
- %hr
2
+ -# = render 'index'
3
+
4
4
  .email-templates-show
5
- %h4.center= @email_template.slug
5
+ .header
6
+ %h2.title
7
+ = @email_template.slug
8
+ = link_to '[~]', edit_email_template_path( @email_template )
9
+ = link_to '[src ^]', '#'
10
+ = link_to '[preview ^]', '#'
11
+ = link_to '[use]', '#'
6
12
 
7
13
  %iframe{ src: email_template_iframe_path(@email_template.slug), width: '100%', height: '100%' }
@@ -22,7 +22,16 @@
22
22
 
23
23
  .row-thumbs
24
24
  %p.collapse-expand#rowThumbs Thumbs
25
- = render 'ish_manager/photos/index_thumbs', photos: @photos
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 &lt;
30
+ %a.mvRight &gt;
31
+ .item{ data: { id: photo.id.to_s } }
32
+ = render 'ish_manager/photos/meta_manager', photo: photo
33
+ = image_tag photo.photo.url( :thumb )
34
+ = button_tag 'Save ordering', class: 'save-ordering'
26
35
 
27
36
  .row-large
28
37
  %p.collapse-expand#rowLarge Large
@@ -1,19 +1,24 @@
1
1
 
2
- - url = lead.persisted? ? lead_path( lead.id ) : leads_path
2
+ - url = lead.new_record? ? leads_path : lead_path( lead.id )
3
3
 
4
4
  = form_for lead, :as => :lead, :url => url do |f|
5
+
5
6
  .field
6
7
  = f.label :name
7
8
  = f.text_field :name
9
+
8
10
  .field
9
11
  = f.label :email
10
12
  = f.text_field :email
13
+
11
14
  .field
12
- = f.label :company
13
- = f.select :m3_leadset_id, options_for_select(@leadsets_list, selected: lead.m3_leadset_id), { include_blank: true }, {class: 'select2' }
14
- .field
15
- = f.label :tag
16
- = f.text_field :tag
15
+ = f.label "Leadset (company)"
16
+ = f.select :m3_leadset_id, options_for_select(@leadsets_list, selected: lead.m3_leadset_id), { include_blank: true }, { class: 'select2' }
17
+
18
+ -# .field
19
+ -# = f.label "Tags"
20
+ -# = f.text_field :wp_tags
21
+
17
22
  .actions
18
23
  = f.submit
19
24
 
@@ -11,9 +11,9 @@
11
11
  -# %label Leadset
12
12
  -# = select_tag :leadset_id, options_for_select(@leadsets_list), class: 'select2'
13
13
 
14
- .field
15
- %label Campaign
16
- = select_tag :email_campaign_id, options_for_select(@email_campaigns_list), class: 'select2'
14
+ -# .field
15
+ -# %label Campaign
16
+ -# = select_tag :email_campaign_id, options_for_select(@email_campaigns_list), class: 'select2'
17
17
 
18
18
  .actions
19
19
  = submit_tag 'Submit'
@@ -1,19 +1,22 @@
1
1
 
2
- %h1 Edit lead
3
- = render 'form', :lead => @lead
2
+ .leads-edit.max-width
3
+ .header
4
+ %h2.title Edit lead
4
5
 
5
- %hr
6
- %h1 Email Campaigns:
7
- %ul
8
- - @lead.email_campaign_leads.each do |x|
9
- %li
10
- <b>Sent on ::</b> #{x.sent_at.to_s[0..10]}
11
- <b>Slug ::</b> #{x.email_campaign.slug}
6
+ = render 'form', :lead => @lead
12
7
 
13
- %hr
14
- %h1 Single Emails:
15
- %ul
16
- - @lead.email_contexts.each do |x|
17
- %li
18
- <b>Sent at ::</b> #{x.sent_at.to_s[0..10]}
19
- <b>Subject ::</b> #{x.subject}
8
+ -# %hr
9
+ -# %h1 Email Campaigns:
10
+ -# %ul
11
+ -# - @lead.email_campaign_leads.each do |x|
12
+ -# %li
13
+ -# <b>Sent on ::</b> #{x.sent_at.to_s[0..10]}
14
+ -# <b>Slug ::</b> #{x.email_campaign.slug}
15
+
16
+ -# %hr
17
+ -# %h1 Single Emails:
18
+ -# %ul
19
+ -# - @lead.email_contexts.each do |x|
20
+ -# %li
21
+ -# <b>Sent at ::</b> #{x.sent_at.to_s[0..10]}
22
+ -# <b>Subject ::</b> #{x.subject}