ish_manager 0.1.8.506 → 0.1.8.508

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a1655bc4586c7be2fc0d3f600510d7d30536054ce87c2fdaf084314b78439fa
4
- data.tar.gz: 6210a54fa0dbfa839adf118e85e9014a992eeb27d2dbeb3c9e95f2f038db095a
3
+ metadata.gz: 17cbb493612672b0f3043e29c85cfe2faa0a4b39a07a2fd66978781e0516a3c5
4
+ data.tar.gz: b828311b72f6280cd95a9b1d510e7c085b45b5cf18703a270840462da6491de4
5
5
  SHA512:
6
- metadata.gz: 67e252e726b3c850cbf53fb76eeae01dbf51ab0b02c2e4af139961a005a1d0fa7c1ca3f42601147a14c93095de7e66dbe8fdb5de023a1b672ca31aa1668fc77f
7
- data.tar.gz: bfdc4132df9dc1f42d7b97841fd078627281cab3b92bf8e82e70ba422b5946c21e18b1dd2cf585e5891abc1a48483a790edaa1e32cc639313ff61bb287bf5d28
6
+ metadata.gz: 4800f83a73db4b42684fdd426cd5c0998d197bee8f5b6ab183a0169ca49495aca062f42a938a5d213c61361e807ed150fbc754adca290e3d6edd4751652ea550
7
+ data.tar.gz: b93193edea8b0cb84f8afeb986fb345c09be7f80d9e100e9679703249d922fc008ecf1320b22b7d3de8656b7bf21327f6d02352172be7cf40ca9cba7e99866c7
@@ -60,14 +60,25 @@ $(function () {
60
60
  return confirm($(this).attr('data-confirm'));
61
61
  });
62
62
 
63
- // if ($(".tinymce").length > 0) {
64
- // tinymce.init({
65
- // mode: "specific_textareas",
66
- // editor_selector: 'tinymce',
67
- // plugins: 'link'
68
- // });
69
- // }
70
- $(".tinymce").summernote()
63
+ /*
64
+ * text editor
65
+ **/
66
+ if ($(".tinymce").length > 0) {
67
+ // tinymce.init({
68
+ // mode: "specific_textareas",
69
+ // editor_selector: 'tinymce',
70
+ // plugins: 'link'
71
+ // });
72
+
73
+ $(".tinymce").summernote()
74
+
75
+ // var quill = new Quill('.tinymce', {
76
+ // theme: 'snow',
77
+ // toolbar: '.toolbar',
78
+ // });
79
+ }
80
+
81
+
71
82
 
72
83
  $(".caret").each(function(idx) {
73
84
  $($(".caret")[idx]).html('')
@@ -77,7 +77,7 @@
77
77
  }
78
78
  }
79
79
 
80
- .second-header {
80
+ .subheader {
81
81
  a {
82
82
  margin: 0 1em;
83
83
  }
@@ -1,9 +1,30 @@
1
1
 
2
2
  class ::IshManager::EmailMessagesController < IshManager::ApplicationController
3
3
 
4
+ ## with object_key, invoking EIJ
5
+ def create
6
+ authorize! :create, Office::EmailMessage
7
+
8
+ object_key = params[:msg][:object_key]
9
+ MsgStub.where({ object_key: object_key }).delete
10
+
11
+ stub = MsgStub.create({ object_key: object_key })
12
+ if !stub.persisted?
13
+ flash_alert "Stub could not be persisted: #{stub.errors.full_messages.join(', ')} ."
14
+ redirect_to request.referrer
15
+ return
16
+ end
17
+
18
+ Rails.env.production? ? EIJ.perform_later( stub.id.to_s ) : EIJ.perform_now( stub.id.to_s )
19
+
20
+ flash_notice "Re-inited proc'ing object_key #{object_key} ."
21
+ redirect_to request.referrer
22
+ end
23
+
4
24
  def index
5
25
  authorize! :email_messages_index, IshManager::Ability
6
- @email_messages = Office::EmailMessage.all.order_by( date: :desc )
26
+ redirect_to controller: :email_conversations, action: :index
27
+ # @email_messages = Office::EmailMessage.all.order_by( date: :desc )
7
28
  end
8
29
 
9
30
  def show
@@ -24,11 +24,6 @@
24
24
  %label cc
25
25
  = f.text_field :cc, class: 'w-100'
26
26
 
27
- -## unused b/c ccs is an array, i'm dealing with strings only here.
28
- -# .field.flex-row
29
- -# %label cc's
30
- -# = f.text_field :ccs
31
-
32
27
  .field.field-subject
33
28
  = f.label :subject
34
29
  = f.text_field :subject, class: 'w-100'
@@ -1,7 +1,7 @@
1
1
 
2
2
  .email-conversations-index
3
3
 
4
- .second-header
4
+ .subheader
5
5
  %i.material-icons mail
6
6
 
7
7
  - if params[:slug]
@@ -22,6 +22,13 @@
22
22
  %label New Tag:
23
23
  = f.text_field :name
24
24
  = f.submit '>'
25
+
26
+ .bordered.inline-block
27
+ = form_tag email_messages_path do
28
+ %label Process Object Key:
29
+ = text_field_tag 'msg[object_key]'
30
+ = submit_tag '>'
31
+
25
32
  .search.Card
26
33
  .inline-block
27
34
  = form_tag email_conversations_path do
@@ -25,10 +25,16 @@
25
25
  .a <b>msg.id:</b> #{msg.id}
26
26
  .a <b>object_key:</b> #{msg.object_key}
27
27
  .a
28
- <b>N attachments:</b> #{msg.attachments.length}
28
+ <b>N photos:</b> #{msg.attachments.length}
29
+ .a
29
30
  <b>N email_attachments:</b>
30
31
  - msg.email_attachments.each_with_index do |attachment, idx|
31
- .a= link_to "Download #{attachment.filename} #{idx}", email_attachment_path( attachment )
32
+ - if attachment.filename
33
+ .a= link_to attachment.filename, email_attachment_path( attachment )
34
+ - else
35
+ .a
36
+ = link_to '[view]', email_attachment_path( attachment )
37
+ "#{attachment.content_type.split(';')[0]} #{attachment.filename} #{idx}"
32
38
 
33
39
 
34
40
  .position-absolute.top-0.right-0.datetime
@@ -61,8 +67,9 @@
61
67
  - new_ctx[:lead_id] = lead.id
62
68
  - new_ctx[:from_email] = new_from_email
63
69
  - new_ctx[:subject] = msg.subject
64
- - new_ctx[:body] = Ish::EmailTemplate::SIGNATURE + (msg.part_html||msg.part_txt||'')
70
+ - new_ctx[:body] = Ish::EmailTemplate::SIGNATURE + ActionView::Base.full_sanitizer.sanitize( msg.part_html )
65
71
  - new_ctx[:cc] = all_ccs.join(', ')
72
+
66
73
  = render 'ish_manager/email_contexts/form', ctx: new_ctx
67
74
 
68
75
 
@@ -1,6 +1,2 @@
1
1
 
2
- .email-messages-show-iframe
3
-
4
- .body
5
- = raw @email_message.part_html
6
-
2
+ = render 'ish_manager/email_messages/show_iframe', email_message: @email_message
@@ -8,6 +8,6 @@
8
8
  --<br />
9
9
  Victor Pudeyev<br />
10
10
  Software Engineering Lead<br />
11
- <a href="mailto:victor@piousbox.com">victor@piousbox.com</a>
11
+ <a href="mailto:victor@wasya.co">victor@wasya.co</a>
12
12
  |
13
- <a href="https://wasya.co/contact-us-4?<%= @utm_tracking_str %>">Book a chat</a><br />
13
+ <a href="https://tidycal.com/wasya-co/30min">Book a chat</a><br />
@@ -23,10 +23,15 @@
23
23
  = stylesheet_link_tag "//cdn.jsdelivr.net/npm/select2@4.0.0/dist/css/select2.min.css"
24
24
  = javascript_include_tag "//cdn.jsdelivr.net/npm/select2@4.0.0/dist/js/select2.min.js"
25
25
 
26
- -# %script{ :src => "//cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/jquery.tinymce.min.js" }
27
- -# %script{ :src => "//cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/tinymce.min.js" }
26
+ -# summernote
28
27
  = stylesheet_link_tag "//cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.css"
29
28
  = javascript_include_tag "//cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.js"
29
+ -# quill core
30
+ -# = stylesheet_link_tag "//cdn.quilljs.com/1.3.6/quill.core.css"
31
+ -# = javascript_include_tag "//cdn.quilljs.com/1.3.6/quill.core.js"
32
+ -# quill
33
+ -# = stylesheet_link_tag "//cdn.quilljs.com/1.3.6/quill.snow.css"
34
+ -# = javascript_include_tag "//cdn.quilljs.com/1.3.6/quill.min.js"
30
35
 
31
36
  - # @TODO: document? test-drive?
32
37
  - if @include_materialize
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.506
4
+ version: 0.1.8.508
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-08 00:00:00.000000000 Z
11
+ date: 2023-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -869,7 +869,6 @@ files:
869
869
  - app/views/ish_manager/user_profiles/index.haml
870
870
  - app/views/ish_manager/user_profiles/new.haml
871
871
  - app/views/ish_manager/user_profiles/show.haml
872
- - app/views/ish_manager/user_profiles/trash/_show.haml
873
872
  - app/views/ish_manager/users/_index.haml
874
873
  - app/views/ish_manager/users/index.haml
875
874
  - app/views/ish_manager/videos/_form.haml
@@ -1,39 +0,0 @@
1
- - profile ||= user_profile
2
-
3
- .user-profiles--show.max-width
4
- .header
5
- %h2.title Profile #{profile.email}
6
-
7
- .newsitems
8
- .title Newsitems (#{profile.newsitems.length})
9
- - profile.newsitems.each do |newsitem|
10
- = render 'ish_manager/newsitems/show', newsitem: newsitem
11
-
12
- .premium-purchases
13
- Payments (purchased items) (#{profile.payments.length}):
14
- - profile.payments.each do |payment|
15
- .Card.item
16
- = payment
17
-
18
-
19
- %ul
20
- %li
21
- <b>Email:</b> #{link_to profile.email, user_profile_path(profile)}
22
- = link_to '[edit]', edit_user_profile_path( profile )
23
- %li <b>Name:</b> #{profile.name}
24
- %li <b>Role:</b> #{profile.role_name}
25
- %li
26
- <b>Profile Photo:</b>
27
- = image_tag profile.profile_photo.photo.url(:thumb) rescue nil
28
-
29
- .col.s8
30
- %h5 Shared galleries
31
- - profile.shared_galleries.unscoped.where( :is_trash => false ).each do |g|
32
- &gt; #{link_to g.name, gallery_path(g.slug)} <br />
33
- = render 'meta', :item => g
34
- <hr />
35
-
36
- %h5 Newsitems
37
- - profile.newsitems.each do |n|
38
- = render 'ish_manager/newsitems/item', n: n, profile_id: profile.id
39
- <hr />