ish_manager 0.1.8.354 → 0.1.8.355

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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/ish_manager/application.js +50 -7
  3. data/app/assets/stylesheets/ish_manager/application.scss +51 -7
  4. data/app/assets/stylesheets/ish_manager/{email_templates.scss → email_contexts_templates.scss} +25 -0
  5. data/app/assets/stylesheets/ish_manager/email_conversations.scss +65 -0
  6. data/app/assets/stylesheets/ish_manager/email_iframe.css +4 -0
  7. data/app/assets/stylesheets/ish_manager/email_messages.scss +15 -0
  8. data/app/assets/stylesheets/ish_manager/leads_leadsets.scss +21 -0
  9. data/app/controllers/ish_manager/application_controller.rb +2 -2
  10. data/app/controllers/ish_manager/categories_controller.rb +14 -0
  11. data/app/controllers/ish_manager/email_conversations_controller.rb +16 -0
  12. data/app/controllers/ish_manager/email_messages_controller.rb +20 -2
  13. data/app/controllers/ish_manager/leads_controller.rb +1 -1
  14. data/app/controllers/ish_manager/leadsets_controller.rb +15 -1
  15. data/app/helpers/ish_manager/application_helper.rb +13 -11
  16. data/app/views/ish_manager/application/_alerts_notices.haml +18 -0
  17. data/app/views/ish_manager/application/_debug.haml +3 -3
  18. data/app/views/ish_manager/application/_main_footer.haml +1 -0
  19. data/app/views/ish_manager/application/_main_header_admin.haml +9 -7
  20. data/app/views/ish_manager/application/home.haml +1 -1
  21. data/app/views/ish_manager/categories/_subtree.haml +12 -0
  22. data/app/views/ish_manager/categories/index.haml +11 -0
  23. data/app/views/ish_manager/email_conversations/index.haml +12 -0
  24. data/app/views/ish_manager/email_conversations/show.haml +27 -0
  25. data/app/views/ish_manager/email_messages/_show_iframe.haml +8 -0
  26. data/app/views/ish_manager/email_messages/index.haml +2 -2
  27. data/app/views/ish_manager/email_messages/show.haml +28 -1
  28. data/app/views/ish_manager/email_messages/show_iframe.haml +6 -0
  29. data/app/views/ish_manager/email_messages/show_source.haml +5 -0
  30. data/app/views/ish_manager/email_messages/show_stripped.haml +2 -0
  31. data/app/views/ish_manager/email_templates/_form_reply_mini.haml +8 -0
  32. data/app/views/ish_manager/email_templates/_form_schedule_mini.haml +11 -0
  33. data/app/views/ish_manager/leadsets/index.haml +9 -3
  34. data/app/views/layouts/ish_manager/application_fullwidth.haml +45 -0
  35. data/app/views/layouts/ish_manager/email_iframe.haml +6 -0
  36. data/config/routes.rb +8 -0
  37. data/lib/ish_manager/engine.rb +1 -0
  38. metadata +22 -4
  39. data/app/assets/stylesheets/ish_manager/leads.scss +0 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25a65353583bdf870122f899dec308c352aa71854a99113b12649a4a38626856
4
- data.tar.gz: dafc5ba0c1af8b439640e91a238dd467252be0800930cfc8679c57eab6042c9f
3
+ metadata.gz: 41936b74cab9eb00d566912ce0bf799cad9994da03ad6488c30f825996541d85
4
+ data.tar.gz: eaf88d58f3189d9e0155a5d0fa5c7da9aa7c1be560068de9cbfd5f88ae52c0f6
5
5
  SHA512:
6
- metadata.gz: 37feabe9bca20cb0c1d3201359ccd7799a85b699adfbb496a766fa19148f82bd3f553032498d45790eb8134b944ca62a464170816eaf69261d04a594fa2c98d8
7
- data.tar.gz: 95c0a9dd0b822d92bc715f207ef7da3f72ad8dd41d4c187aa74aa8f92774feebad919ef325c00dbebf15cc0a1c6be923a81258992456b2a1573fa02251c21361
6
+ metadata.gz: eca56720c4ed0101a5e1b55bfa0f8b55169a72a4e2450b6f558b21523aa5c62eb0b73aeca2f15cb7639ab20af1ad9181886feedcd36eb5e2225177858ca515b9
7
+ data.tar.gz: 1e3e8b689b5edb016e5ba3e6b54ccee260c0b949c38f298e14315651ab59ad4cc55b37cc1fc3261ef75027f85cd47ea2716b76818355b109bb7d7689c0cc6660
@@ -86,12 +86,14 @@ $(function () {
86
86
 
87
87
 
88
88
  if ('function' === typeof $('body').DataTable) {
89
- $('#dataTable').DataTable({
90
- pageLength: 10,
91
- lengthMenu: [[10, 25, 100, -1], [10, 25, 100, 'All']],
92
- lengthChange: true,
93
- "aLengthMenu": [[5, 10, 25, 50, -1], [5, 10, 25, 50, "All"]]
94
- })
89
+ const _props = {
90
+ pageLength: 10,
91
+ lengthMenu: [[10, 25, 100, -1], [10, 25, 100, 'All']],
92
+ lengthChange: true,
93
+ "aLengthMenu": [[5, 10, 25, 50, -1], [5, 10, 25, 50, "All"]]
94
+ }
95
+ $('#dataTable').DataTable(_props)
96
+ $('.data-table').DataTable(_props)
95
97
  }
96
98
 
97
99
  if ('function' === typeof $('body').datepicker) {
@@ -99,7 +101,48 @@ $(function () {
99
101
  }
100
102
 
101
103
  // From: https://materializecss.com/select.html
102
- $('select').formSelect();
104
+ if ('function' === typeof $('select').formSelect) {
105
+ $('select').formSelect();
106
+ }
107
+
108
+ if ($(".data-table").length) {
109
+ $("input[type='checkbox'].i-sel").change(() => {
110
+ $( $(".n-selected")[0] ).html( $("input[type='checkbox'].i-sel:checked").length )
111
+ })
112
+ }
113
+
114
+ $("button.delete-btn").click(e => {
115
+ let out = []
116
+
117
+ $( $("input[type='checkbox'].i-sel:checked") ).each( idx => {
118
+ let val = $($("input[type='checkbox'].i-sel:checked")[idx]).val()
119
+ out.push(val)
120
+ })
121
+
122
+ $.ajax({
123
+ url: '/api/leadsets',
124
+ type: 'DELETE',
125
+ data: { leadset_ids: out },
126
+ success: e => {
127
+ logg(e, 'deleted Ok')
128
+ },
129
+ error: e => {
130
+ logg(e, 'deleted Err')
131
+ },
132
+ })
133
+
134
+ })
135
+
136
+ $(".select-all input[type='checkbox']").change((e) => {
137
+ const count = $("input[type='checkbox'].i-sel:checked").length
138
+ const new_state = count ? false : true
139
+
140
+ $( $("input[type='checkbox'].i-sel") ).each( i => {
141
+ $( $("input[type='checkbox'].i-sel")[i] ).prop('checked', new_state)
142
+ })
143
+
144
+ $( $(".n-selected")[0] ).html( $("input[type='checkbox'].i-sel:checked").length )
145
+ })
103
146
 
104
147
  });
105
148
 
@@ -4,13 +4,14 @@
4
4
  *= require ish_manager/jquery-ui
5
5
  *= require_self
6
6
  *
7
- * includes email context:
8
- *= require ish_manager/email_templates
7
+ *= require ish_manager/email_contexts_templates
8
+ *= require ish_manager/email_conversations
9
+ *= require ish_manager/email_messages
9
10
  *
10
11
  *= require ish_manager/galleries
11
12
  *= require ish_manager/maps
12
13
  *= require ish_manager/markers
13
- *= require ish_manager/leads
14
+ *= require ish_manager/leads_leadsets
14
15
  *= require ish_manager/photos
15
16
  *= require ish_manager/user_profiles
16
17
  *= require ish_manager/videos
@@ -19,12 +20,18 @@
19
20
  **/
20
21
 
21
22
  a[target='_blank'] {
23
+ &::before {
24
+ content: '[ '
25
+ }
22
26
  &::after {
23
- content: ' ^]' !important;
27
+ content: ' ^]';
28
+ // content: ' ^]' !important;
24
29
  // font-size: .5em;
25
30
  }
26
31
  }
27
-
32
+ html {
33
+ height: 100%;
34
+ }
28
35
  body {
29
36
  background: #dedede;
30
37
  font-size: 20px;
@@ -67,6 +74,11 @@ ul:not(.browser-default).bullets, {
67
74
  width: 100vwh;
68
75
  overflow-x: auto;
69
76
  }
77
+ body.application-fullwidth {
78
+ height: 100%;
79
+ display: flex;
80
+ flex-direction: column;
81
+ }
70
82
  .application-home {
71
83
  .bordered-card {
72
84
  max-width: 400px;
@@ -128,6 +140,15 @@ ul:not(.browser-default).bullets, {
128
140
 
129
141
  /* D */
130
142
 
143
+ table.dataTable {
144
+ border: 1px solid red;
145
+ padding: 1em;
146
+ border-radius: 5px;
147
+ box-sizing: border-box;
148
+ background: white;
149
+
150
+ }
151
+
131
152
  .descr,
132
153
  .description {
133
154
  border: 1px solid red;
@@ -164,6 +185,10 @@ ul:not(.browser-default).bullets, {
164
185
  float: right;
165
186
  }
166
187
 
188
+ /* H */
189
+ .hide, .hidden {
190
+ display: none;
191
+ }
167
192
 
168
193
  /* I */
169
194
  img.img-400 {
@@ -205,6 +230,8 @@ textarea.large {
205
230
 
206
231
  .main-header {
207
232
  background: url('//d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2022/10/05192823/weather-bg.png');
233
+ border-bottom: 2px solid red;
234
+ margin-bottom: 1em;
208
235
 
209
236
  a {
210
237
  background: white;
@@ -215,8 +242,6 @@ textarea.large {
215
242
  margin-top: 0;
216
243
  }
217
244
 
218
-
219
-
220
245
  ul {
221
246
  margin: 0;
222
247
  padding: 0;
@@ -245,7 +270,17 @@ textarea.large {
245
270
  }
246
271
 
247
272
  .manager--main-footer {
273
+ background: url('//d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2022/10/05192823/weather-bg.png');
248
274
  border-top: 2px solid red;
275
+ margin-top: 1em;
276
+
277
+ flex-grow: 1;
278
+ }
279
+
280
+ .max-width {
281
+ max-width: 1140px;
282
+ width: 100%;
283
+ margin: auto;
249
284
  }
250
285
 
251
286
  .menu-secondary {
@@ -270,6 +305,15 @@ textarea.large {
270
305
 
271
306
  /* N */
272
307
 
308
+ label.n-selected {
309
+ border: 1px solid red;
310
+ padding: 0.5em;
311
+
312
+ &::after {
313
+ content: " Selected";
314
+ }
315
+ }
316
+
273
317
  .newsitems--item {
274
318
  border: 1px solid green;
275
319
  padding: 5px;
@@ -52,6 +52,11 @@
52
52
 
53
53
  }
54
54
 
55
+ .email-templates--form-reply-mini,
56
+ .email-templates--form-schedule-mini {
57
+
58
+ }
59
+
55
60
  .email-contexts--form,
56
61
  .email-templates--form {
57
62
 
@@ -76,4 +81,24 @@
76
81
  padding: 10px;
77
82
  margin: 10px;
78
83
  }
84
+
85
+
79
86
  }
87
+
88
+ .form-mini {
89
+ margin-left: 20px;
90
+ display: inline-block;
91
+ border: 1px solid #666;
92
+ border-radius: 5px;
93
+ padding: 5px;
94
+ background: #eee;
95
+
96
+ * {
97
+ display: inline;
98
+ }
99
+ .send-at {
100
+ input {
101
+ width: 150px;
102
+ }
103
+ }
104
+ }
@@ -0,0 +1,65 @@
1
+
2
+ .email-conversations-index,
3
+ .email-conversations-show {
4
+
5
+ .messages {
6
+ // border: 1px solid red;
7
+
8
+ padding-left: 0;
9
+
10
+ list-style-type: none;
11
+
12
+ li {
13
+
14
+ margin-bottom: 0.2em;
15
+
16
+ // clear: both;
17
+
18
+ .date {
19
+ // border: 1px solid orange;
20
+
21
+ width: 120px;
22
+ float: left;
23
+ }
24
+
25
+ .preview {
26
+ // border: 1px solid gold;
27
+
28
+ white-space: nowrap;
29
+ overflow: hidden;
30
+ text-overflow: ellipsis;
31
+
32
+ }
33
+ }
34
+ }
35
+
36
+ .participants {
37
+ border: 1px solid #999900;
38
+ background: #ffffcc;
39
+ border-radius: 5px;
40
+ padding: 5px;
41
+ display: inline;
42
+
43
+ ul {
44
+ display: inline;
45
+ padding-left: 0;
46
+ li {
47
+ display: inline;
48
+ }
49
+ }
50
+ }
51
+
52
+ }
53
+
54
+ .email-conversations-show {
55
+ .header {
56
+ display: flex;
57
+ align-items: baseline;
58
+
59
+ .label {
60
+ padding-right: 0.2em;
61
+ }
62
+ }
63
+
64
+
65
+ }
@@ -0,0 +1,4 @@
1
+
2
+ html, body {
3
+ background: white;
4
+ }
@@ -0,0 +1,15 @@
1
+
2
+ .email-messages-show {
3
+
4
+ .main-actions {
5
+ display: flex;
6
+ justify-content: space-between;
7
+ }
8
+
9
+ .body {
10
+ border: 1px solid red;
11
+ border-radius: 5px;
12
+ padding: 1em;
13
+ }
14
+
15
+ }
@@ -0,0 +1,21 @@
1
+
2
+ .manager-leads-index {
3
+ th.company-url {
4
+ width: 10px;
5
+ }
6
+ th.created-at,
7
+ td.created-at {
8
+ width: 200px;
9
+ }
10
+ }
11
+
12
+ .manager-leadsets-index {
13
+ padding: 1em;
14
+
15
+ .actions label {
16
+ border: 1px solid gold;
17
+ padding: 0.5em;
18
+ border-radius: 0.5em;
19
+ background: #999900;
20
+ }
21
+ }
@@ -10,7 +10,7 @@ module IshManager
10
10
 
11
11
  def home
12
12
  authorize! :home, IshManager::Ability
13
- render 'home'
13
+ render 'home', layout: 'ish_manager/application_fullwidth'
14
14
  end
15
15
 
16
16
  #
@@ -54,7 +54,7 @@ module IshManager
54
54
  end
55
55
 
56
56
  def set_title
57
- @page_title = "#{ params[:controller].gsub('ish_manager/', '') } #{params[:action]} #{params[:slug]||params[:id]}"
57
+ @page_title = "#{ params[:controller].gsub('ish_manager/', '') } #{params[:action]} #{params[:slug]||params[:id]} ".gsub(" ", " ")
58
58
  end
59
59
 
60
60
  # @TODO: obsolete, remove _vp_ 2022-10-15
@@ -0,0 +1,14 @@
1
+
2
+ class ::IshManager::CategoriesController < IshManager::ApplicationController
3
+
4
+ before_action :set_lists
5
+
6
+ def index
7
+ authorize! :categories_index, IshManager::Ability
8
+ # @categories = Category.all_hierarchical
9
+ @categories_flat = Category.all_flat
10
+ @tags = Category.all_tags
11
+ end
12
+
13
+ end
14
+
@@ -0,0 +1,16 @@
1
+
2
+ class ::IshManager::EmailConversationsController < IshManager::ApplicationController
3
+
4
+ def index
5
+ authorize! :email_conversations_index, IshManager::Ability
6
+ @email_conversations = ::Office::EmailConversation.all.order_by( latest_date: :desc )
7
+
8
+ end
9
+
10
+ def show
11
+ authorize! :email_conversations_show, IshManager::Ability
12
+ @email_conversation = ::Office::EmailConversation.find( params[:id] )
13
+ @email_messages = @email_conversation.email_messages.order_by( date: :desc )
14
+ end
15
+
16
+ end
@@ -2,13 +2,31 @@
2
2
  class ::IshManager::EmailMessagesController < IshManager::ApplicationController
3
3
 
4
4
  def index
5
- authorize! :index, Ish::EmailCampaign # @TODO: change!
5
+ authorize! :email_messages_index, IshManager::Ability
6
6
  @email_messages = Office::EmailMessage.all
7
7
  end
8
8
 
9
9
  def show
10
- authorize! :index, Ish::EmailCampaign # @TODO: change!
10
+ authorize! :email_messages_show, IshManager::Ability
11
11
  @email_message = Office::EmailMessage.find params[:id]
12
12
  end
13
13
 
14
+ def show_iframe
15
+ authorize! :email_messages_show, IshManager::Ability
16
+ @email_message = Office::EmailMessage.find params[:id]
17
+ render layout: 'ish_manager/email_iframe'
18
+ end
19
+
20
+ def show_source
21
+ authorize! :email_messages_show, IshManager::Ability
22
+ @email_message = Office::EmailMessage.find params[:id]
23
+ render layout: false
24
+ end
25
+
26
+ def show_stripped
27
+ authorize! :email_messages_show, IshManager::Ability
28
+ @email_message = Office::EmailMessage.find params[:id]
29
+ render layout: false
30
+ end
31
+
14
32
  end
@@ -122,7 +122,7 @@ class ::IshManager::LeadsController < IshManager::ApplicationController
122
122
  def set_lists
123
123
  super
124
124
  @leadsets_list = [ [nil,nil] ] + ::Leadset.all.map { |k| [ k.name, k.id ] }
125
- @email_campaigns_list = [ [nil,nil] ] + Ish::EmailContext.unsent_campaigns.map { |k| [ k.slug, k.id ] }
125
+ @email_campaigns_list = [ [nil,nil] ] # + Ish::EmailContext.unsent_campaigns.map { |k| [ k.slug, k.id ] }
126
126
  end
127
127
 
128
128
  end
@@ -15,6 +15,18 @@ class ::IshManager::LeadsetsController < IshManager::ApplicationController
15
15
  redirect_to :action => 'index'
16
16
  end
17
17
 
18
+ def destroy
19
+ puts! params, 'params'
20
+
21
+ leadsets = Leadset.find( params[:leadset_ids] )
22
+ @results = []
23
+ leadsets.each do |leadset|
24
+ @results.push leadset.discard
25
+ end
26
+ flash[:notice] = "Discard outcome: #{@results.inspect}."
27
+ redirect_to action: 'index'
28
+ end
29
+
18
30
  def edit
19
31
  @leadset = Leadset.find params[:id]
20
32
  authorize! :edit, @leadset
@@ -22,12 +34,14 @@ class ::IshManager::LeadsetsController < IshManager::ApplicationController
22
34
 
23
35
  def index
24
36
  authorize! :index, Leadset
25
- @leadsets = Leadset.all # where( :profile => @current_profile, :is_trash => false )
37
+ @leadsets = Leadset.all.kept # where( :profile => @current_profile, :is_trash => false )
26
38
  # if params[:is_done]
27
39
  # @leadsets = @leadsets.where( :is_done => true )
28
40
  # else
29
41
  # @leadsets = @leadsets.where( :is_done => false )
30
42
  # end
43
+
44
+ render layout: 'ish_manager/application_fullwidth'
31
45
  end
32
46
 
33
47
  def new
@@ -1,6 +1,19 @@
1
1
  module IshManager
2
2
  module ApplicationHelper
3
3
 
4
+
5
+ #
6
+ # api paths
7
+ #
8
+ def api_map_path map
9
+ "/api/maps/view/#{map.slug}"
10
+ end
11
+
12
+ def api_marker_path marker
13
+ "/api/markers/view/#{marker.id}"
14
+ end
15
+
16
+
4
17
  def current_layout
5
18
  layout = controller.class.send(:_layout)
6
19
  if layout.nil?
@@ -40,16 +53,5 @@ module IshManager
40
53
  "$ #{'%.2f' % a}"
41
54
  end
42
55
 
43
- #
44
- # api paths
45
- #
46
- def api_map_path map
47
- "/api/maps/view/#{map.slug}"
48
- end
49
-
50
- def api_marker_path marker
51
- "/api/markers/view/#{marker.id}"
52
- end
53
-
54
56
  end
55
57
  end
@@ -0,0 +1,18 @@
1
+
2
+ - if notice || alert
3
+ .row
4
+ .col-sm-12
5
+ - if notice
6
+ - if notice.class == Array
7
+ %ul.notice
8
+ - notice.map do |n|
9
+ %li= n
10
+ - else
11
+ %p.notice= notice
12
+ - if alert
13
+ - if alert.class == Array
14
+ %ul.alert
15
+ - alert.map do |n|
16
+ %li= n
17
+ - else
18
+ %p.alert= alert
@@ -1,9 +1,9 @@
1
1
 
2
2
  %i.fa.fa-compress.collapse-expand#debug
3
+ Debug
3
4
  .application--debug
4
5
  %ul.browser-default
5
6
  %li= params.inspect
6
- %li= "Cached?: #{Rails.application.config.action_controller.perform_caching}"
7
- %li Cache key: #{@cache_key.inspect}
8
- %li Layout: #{current_layout}
7
+ %li Cached? #{Rails.application.config.action_controller.perform_caching} :: Cache key: #{@cache_key.inspect}
8
+ -# %li Layout: #{current_layout}
9
9
  %li= "Env: #{Rails.env}"
@@ -3,6 +3,7 @@
3
3
  .container
4
4
 
5
5
  %i.fa.fa-compress.collapse-expand#mainFooter
6
+ Account & Session
6
7
  .a
7
8
  .row
8
9
  .col-sm-6
@@ -6,9 +6,9 @@
6
6
  %i.fa.fa-compress.collapse-expand#collapseHeaderPiCMS
7
7
  PiousboxCMS
8
8
  %ul
9
- %li
10
- = link_to 'Photos', photos_path
11
- = link_to '[+]', new_photo_path
9
+ -# %li
10
+ -# = link_to 'Photos', photos_path
11
+ -# = link_to '[+]', new_photo_path
12
12
  %li
13
13
  = render 'ish_manager/galleries/menu'
14
14
  %li
@@ -23,6 +23,8 @@
23
23
  = form_tag videos_path, method: :get do
24
24
  = text_field_tag :q
25
25
  = link_to '[+]', new_video_path
26
+ %li
27
+ = link_to 'Categories & Tags', categories_path
26
28
  .c
27
29
 
28
30
  %i.fa.fa-compress.collapse-expand#collapseHeaderIsh
@@ -61,7 +63,9 @@
61
63
  = link_to 'Meetings', meetings_path
62
64
  = link_to '[+]', new_meeting_path
63
65
  %li
64
- = link_to 'EmailMessages', email_messages_path
66
+ -## superceded by conversations, below _vp_ 2023-02-26
67
+ -# = link_to "Email Messages (#{Office::EmailMessage.count})", email_messages_path
68
+ = link_to "Email Conv's (#{Office::EmailConversation.count})", email_conversations_path
65
69
  %ul
66
70
  %li
67
71
  = link_to 'Leads', leads_path
@@ -83,7 +87,7 @@
83
87
 
84
88
  .c
85
89
  %i.fa.fa-compress.collapse-expand#collapseHeaderIro
86
- Iro
90
+ Iro Wor
87
91
  .content
88
92
  %ul
89
93
  %li
@@ -91,5 +95,3 @@
91
95
  %li
92
96
  = link_to 'Plots', 'http://localhost:3000/iron_warbler/NOPE-1', target: '_blank'
93
97
 
94
- %hr
95
-
@@ -1,5 +1,5 @@
1
1
 
2
- .application-home
2
+ .application-home.max-width
3
3
  Welcome home
4
4
 
5
5
  .bordered-card
@@ -0,0 +1,12 @@
1
+
2
+ -## provides local vars: subtree, config
3
+
4
+ - puts! config, 'config'
5
+ - puts! subtree, 'subtree'
6
+
7
+ %ul
8
+ - subtree.select { |c| c[5] == config[:parent_id] }.each do |c|
9
+ %li
10
+ = c[1]
11
+ - if config[:parent_ids].include?( c[0] )
12
+ = render 'ish_manager/categories/subtree', subtree: subtree, config: { parent_id: c[0], parent_ids: config[:parent_ids] }
@@ -0,0 +1,11 @@
1
+
2
+ .row
3
+ .col-md-6
4
+ %h1 Categories
5
+ = render 'ish_manager/categories/subtree', subtree: @categories_flat, config: { parent_id: nil, parent_ids: @categories_flat.map { |c| c[5] }.uniq }
6
+
7
+ .col-md-6
8
+ %h1 Tags
9
+ %ul
10
+ - @tags.each do |tag|
11
+ %li= tag[:name]
@@ -0,0 +1,12 @@
1
+
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})
12
+
@@ -0,0 +1,27 @@
1
+
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
15
+ %ul
16
+ - @email_conversation.participants.each do |p|
17
+ %li
18
+ = p
19
+ = render 'ish_manager/email_templates/form_reply_mini'
20
+ = render 'ish_manager/email_templates/form_schedule_mini'
21
+
22
+ %ul.messages
23
+ - @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]
@@ -0,0 +1,8 @@
1
+
2
+ -# receives local vars: email_message
3
+
4
+ .email-messages-show-iframe
5
+
6
+ .body
7
+ = raw email_message.part_html
8
+
@@ -1,8 +1,8 @@
1
1
 
2
2
  %h2 Email Messages
3
3
 
4
- %ol
4
+ %ul
5
5
  - @email_messages.each do |msg|
6
6
  %li
7
- From: #{msg.from}
7
+ #{msg.subject}
8
8
  = link_to 'view', email_message_path(msg)
@@ -1,4 +1,31 @@
1
1
 
2
+ .email-messages-show
3
+
4
+ .main-actions
5
+ .left
6
+ = link_to '[<<-]', email_conversations_path
7
+ = link_to '[<- Conversation]', email_conversation_path( @email_message.email_conversation )
8
+ Message
9
+ .right
10
+ = link_to 'source', email_message_source_path( @email_message ), target: :_blank
11
+ -# = link_to 'stripped', email_message_stripped_path( @email_message ), target: :_blank
12
+
13
+ %ul.headers
14
+ %li
15
+ <b>From:</b> #{@email_message.from}
16
+ = render 'ish_manager/email_templates/form_reply_mini'
17
+ = render 'ish_manager/email_templates/form_schedule_mini'
18
+ %li <b>To:</b> #{@email_message.to}
19
+ %li <b>Subj:</b> #{@email_message.subject}
20
+ %li <b>Date:</b> #{@email_message.date}
21
+ - if @email_message.ccs.present?
22
+ %li <b>CC:</b> #{@email_message.ccs}
23
+ - if @email_message.bccs.present?
24
+ %li <b>BCC:</b> #{@email_message.bccs}
25
+
26
+ %iframe{ src: email_message_iframe_path(@email_message), width: '100%', height: '800px' }
27
+
28
+ -# %hr
29
+ -# = ActionView::Base.full_sanitizer.sanitize( @email_message.part_html )
2
30
 
3
- = raw @email_message.part_html
4
31
 
@@ -0,0 +1,6 @@
1
+
2
+ .email-messages-show-iframe
3
+
4
+ .body
5
+ = raw @email_message.part_html
6
+
@@ -0,0 +1,5 @@
1
+
2
+
3
+ <pre>
4
+ = Nokogiri::HTML( @email_message.part_html ).to_xhtml(indent: 2)
5
+ </pre>
@@ -0,0 +1,2 @@
1
+
2
+ = ActionView::Base.full_sanitizer.sanitize( @email_message.part_html )
@@ -0,0 +1,8 @@
1
+
2
+ .email-templates--form-reply-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([ ['abba', 'abba'], ['zetta', 'zetta'] ])
7
+ .actions
8
+ = f.submit 'Reply'
@@ -0,0 +1,11 @@
1
+
2
+ .email-templates--form-schedule-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([ ['abba', 'abba'], ['zetta', 'zetta'] ])
7
+ .field.send-at
8
+ -# = f.label :send_at
9
+ = f.text_field :send_at, placeholder: 'YYYY-MM-DD'
10
+ .actions
11
+ = f.submit 'Schedule'
@@ -1,12 +1,18 @@
1
1
 
2
2
  .manager-leadsets-index
3
3
  %h5
4
- SQL
5
4
  = link_to 'Leadsets', leadsets_path
6
5
  (#{Leadset.all.count})
7
6
  = link_to raw("<i class='fa fa-plus-square'></i>"), new_leadset_path
8
7
 
9
- %table#dataTable.display.compact
8
+ .actions
9
+ %label.select-all
10
+ = check_box_tag :select_all
11
+ select all
12
+ %label.n-selected -
13
+ = button_tag 'Delete', method: :delete, class: 'delete-btn'
14
+
15
+ %table.data-table.compact
10
16
  %thead
11
17
  %tr
12
18
  %th &nbsp;
@@ -18,7 +24,7 @@
18
24
  %tbody
19
25
  - @leadsets.each do |leadset|
20
26
  %tr
21
- %td= check_box_tag leadset.id
27
+ %td= check_box_tag 'leadset_ids[]', leadset.id, nil, { class: 'i-sel' }
22
28
  %td= leadset.created_at.strftime("%Y-%m-%d %H:%M")
23
29
  %td= link_to leadset.name, leadset_path( leadset )
24
30
  %td= leadset.tag
@@ -0,0 +1,45 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %title #{@page_title}| PiousboxCMS
5
+ %link{ :rel => 'icon', :href => "/favicon_#{ENV['RAILS_ENV']}.gif" }
6
+ %meta{ :name => :viewport, :content => 'width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=2' }
7
+ %meta{ :charset => 'UTF-8' }
8
+ %meta{ :description => @page_description }
9
+
10
+ = javascript_include_tag "//code.jquery.com/jquery-3.3.1.min.js"
11
+
12
+ %script{ :src => "//cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js" }
13
+ = stylesheet_link_tag "//cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css"
14
+
15
+ %script{ :src => "//cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/jquery.tinymce.min.js" }
16
+ %script{ :src => "//cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/tinymce.min.js" }
17
+
18
+ = stylesheet_link_tag "//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css", :media => 'all'
19
+ = stylesheet_link_tag "//fonts.googleapis.com/icon?family=Material+Icons"
20
+
21
+ = stylesheet_link_tag "//cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/css/bootstrap.min.css"
22
+ = javascript_include_tag "//cdn.jsdelivr.net/npm/popper.js@1.14.7/dist/umd/popper.min.js"
23
+ = javascript_include_tag "//cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/js/bootstrap.min.js"
24
+
25
+ = stylesheet_link_tag "//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css"
26
+ = javascript_include_tag "//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"
27
+
28
+ - # @TODO: document? test-drive?
29
+ - if @include_materialize
30
+ = stylesheet_link_tag "//cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"
31
+ = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"
32
+
33
+ = stylesheet_link_tag "ish_manager/application", media: "all"
34
+ = javascript_include_tag "ish_manager/application"
35
+
36
+ = csrf_meta_tags
37
+ %body{ class: [ params[:controller].gsub("ish_manager/",""), "#{params[:controller].gsub("ish_manager/","")}-#{params[:action]}", params[:action], "application-fullwidth" ] }
38
+
39
+ = render :partial => "ish_manager/application/main_header_#{@current_profile.role_name}"
40
+ = render 'alerts_notices'
41
+ = yield
42
+ = render 'ish_manager/application/main_footer'
43
+ = render 'analytics' if Rails.env.production?
44
+
45
+
@@ -0,0 +1,6 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ = stylesheet_link_tag "ish_manager/email_iframe"
5
+ %body
6
+ = yield
data/config/routes.rb CHANGED
@@ -3,6 +3,8 @@ IshManager::Engine.routes.draw do
3
3
 
4
4
  root :to => 'application#home'
5
5
 
6
+ get 'categories', to: 'categories#index'
7
+
6
8
  get 'galleries', :to => 'galleries#index', :defaults => { :render_type => Gallery::RENDER_THUMBS }
7
9
  get 'galleries/index_titles', :to => 'galleries#index', :defaults => { :render_type => Gallery::RENDER_TITLES }
8
10
  get 'galleries/index_thumbs', :to => 'galleries#index', :defaults => { :render_type => Gallery::RENDER_THUMBS }
@@ -54,8 +56,14 @@ IshManager::Engine.routes.draw do
54
56
  resources :email_campaigns
55
57
  resources :email_campaign_leads, as: :campaign_leads
56
58
 
59
+ get 'email_messages/iframe/:id', to: 'email_messages#show_iframe', as: :email_message_iframe
60
+ get 'email_messages/source/:id', to: 'email_messages#show_source', as: :email_message_source
61
+ get 'email_messages/stripped/:id', to: 'email_messages#show_stripped', as: :email_message_stripped
57
62
  resources :email_messages
58
63
 
64
+ get 'email_conversations', to: 'email_conversations#index'
65
+ get 'email_conversations/:id', to: 'email_conversations#show', as: :email_conversation
66
+
59
67
  get 'email_contexts/iframe_src/:id', to: 'email_contexts#iframe_src', as: :email_context_iframe
60
68
  get 'email_contexts/new_with/:template_slug', to: 'email_contexts#new'
61
69
  post 'email_contexts/send/:id', to: 'email_contexts#do_send', as: :email_context_send
@@ -13,6 +13,7 @@ module IshManager
13
13
  app.config.assets.precompile << %w( ish_manager/application.js ish_manager/application.css )
14
14
  app.config.assets.precompile << %w( ish_manager/materialize.js ish_manager/materialize.css )
15
15
  app.config.assets.precompile << %w( missing.png )
16
+ app.config.assets.precompile << %w( ish_manager/email_iframe.css )
16
17
  end
17
18
  end
18
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.354
4
+ version: 0.1.8.355
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-24 00:00:00.000000000 Z
11
+ date: 2023-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -266,10 +266,13 @@ files:
266
266
  - app/assets/javascripts/ish_manager/vendor/jquery.iframe-transport.js
267
267
  - app/assets/javascripts/ish_manager/vendor/jquery.ui.widget.js
268
268
  - app/assets/stylesheets/ish_manager/application.scss
269
- - app/assets/stylesheets/ish_manager/email_templates.scss
269
+ - app/assets/stylesheets/ish_manager/email_contexts_templates.scss
270
+ - app/assets/stylesheets/ish_manager/email_conversations.scss
271
+ - app/assets/stylesheets/ish_manager/email_iframe.css
272
+ - app/assets/stylesheets/ish_manager/email_messages.scss
270
273
  - app/assets/stylesheets/ish_manager/galleries.scss
271
274
  - app/assets/stylesheets/ish_manager/jquery-ui.css
272
- - app/assets/stylesheets/ish_manager/leads.scss
275
+ - app/assets/stylesheets/ish_manager/leads_leadsets.scss
273
276
  - app/assets/stylesheets/ish_manager/maps.scss
274
277
  - app/assets/stylesheets/ish_manager/markers.scss
275
278
  - app/assets/stylesheets/ish_manager/office.scss
@@ -281,9 +284,11 @@ files:
281
284
  - app/assets/stylesheets/ish_manager/user_profiles.scss
282
285
  - app/assets/stylesheets/ish_manager/videos.scss
283
286
  - app/controllers/ish_manager/application_controller.rb
287
+ - app/controllers/ish_manager/categories_controller.rb
284
288
  - app/controllers/ish_manager/email_campaign_leads_controller.rb
285
289
  - app/controllers/ish_manager/email_campaigns_controller.rb
286
290
  - app/controllers/ish_manager/email_contexts_controller.rb
291
+ - app/controllers/ish_manager/email_conversations_controller.rb
287
292
  - app/controllers/ish_manager/email_messages_controller.rb
288
293
  - app/controllers/ish_manager/email_templates_controller.rb
289
294
  - app/controllers/ish_manager/email_unsubscribes_controller.rb
@@ -346,6 +351,7 @@ files:
346
351
  - app/views/202212 Mailchimp Templates/202212 theme subtle.html
347
352
  - app/views/202212 Mailchimp Templates/202212 theme ticket.html
348
353
  - app/views/202212 Mailchimp Templates/202212 theme whale.html
354
+ - app/views/ish_manager/application/_alerts_notices.haml
349
355
  - app/views/ish_manager/application/_analytics.html
350
356
  - app/views/ish_manager/application/_debug.haml
351
357
  - app/views/ish_manager/application/_form_errors.haml
@@ -360,16 +366,26 @@ files:
360
366
  - app/views/ish_manager/application/home.haml
361
367
  - app/views/ish_manager/application_mailer/shared_galleries.html.erb
362
368
  - app/views/ish_manager/application_mailer/welcome.html.erb
369
+ - app/views/ish_manager/categories/_subtree.haml
370
+ - app/views/ish_manager/categories/index.haml
363
371
  - app/views/ish_manager/email_campaign_leads/show.haml
364
372
  - app/views/ish_manager/email_contexts/_form.haml
365
373
  - app/views/ish_manager/email_contexts/edit.haml
366
374
  - app/views/ish_manager/email_contexts/index.haml
367
375
  - app/views/ish_manager/email_contexts/new.haml
368
376
  - app/views/ish_manager/email_contexts/show.haml
377
+ - app/views/ish_manager/email_conversations/index.haml
378
+ - app/views/ish_manager/email_conversations/show.haml
379
+ - app/views/ish_manager/email_messages/_show_iframe.haml
369
380
  - app/views/ish_manager/email_messages/index.haml
370
381
  - app/views/ish_manager/email_messages/show.haml
382
+ - app/views/ish_manager/email_messages/show_iframe.haml
383
+ - app/views/ish_manager/email_messages/show_source.haml
384
+ - app/views/ish_manager/email_messages/show_stripped.haml
371
385
  - app/views/ish_manager/email_templates/_form.haml
372
386
  - app/views/ish_manager/email_templates/_form_mini.haml
387
+ - app/views/ish_manager/email_templates/_form_reply_mini.haml
388
+ - app/views/ish_manager/email_templates/_form_schedule_mini.haml
373
389
  - app/views/ish_manager/email_templates/_index.haml
374
390
  - app/views/ish_manager/email_templates/_m20221201react.html.erb
375
391
  - app/views/ish_manager/email_templates/_m20221222merryxmas.html.erb
@@ -502,6 +518,8 @@ files:
502
518
  - app/views/ish_manager/videos/new.haml
503
519
  - app/views/ish_manager/videos/show.haml
504
520
  - app/views/layouts/ish_manager/application.haml
521
+ - app/views/layouts/ish_manager/application_fullwidth.haml
522
+ - app/views/layouts/ish_manager/email_iframe.haml
505
523
  - config/routes.rb
506
524
  - lib/ish_manager.rb
507
525
  - lib/ish_manager/engine.rb
@@ -1,10 +0,0 @@
1
-
2
- .manager-leads-index {
3
- th.company-url {
4
- width: 10px;
5
- }
6
- th.created-at,
7
- td.created-at {
8
- width: 200px;
9
- }
10
- }