ish_manager 0.1.8.352 → 0.1.8.354

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d9e52ea6ace8b144c0c2065384efe385987a6786e19ba474478aa23ccce0938
4
- data.tar.gz: '085aba80ac62b36db6552d0f40e2e87067cf68cbf810c78eb042996142aa0b45'
3
+ metadata.gz: 25a65353583bdf870122f899dec308c352aa71854a99113b12649a4a38626856
4
+ data.tar.gz: dafc5ba0c1af8b439640e91a238dd467252be0800930cfc8679c57eab6042c9f
5
5
  SHA512:
6
- metadata.gz: 26d36d40b4c76ddebcfb79fdb8226fa470aaf5f4e5320eb3e2fcf6b3f53c7ed01cd40cd24bdf766da7535162051776a698fa93bf68e683d5492681bcfc88e834
7
- data.tar.gz: 605363d860050a83def8d03f20a1d2f5e247fec8df09532b0d3651154db836698b00604df6b12da14a4af1fb500cdf40159ef2ff3667f083e56e844f26371adc
6
+ metadata.gz: 37feabe9bca20cb0c1d3201359ccd7799a85b699adfbb496a766fa19148f82bd3f553032498d45790eb8134b944ca62a464170816eaf69261d04a594fa2c98d8
7
+ data.tar.gz: 95c0a9dd0b822d92bc715f207ef7da3f72ad8dd41d4c187aa74aa8f92774feebad919ef325c00dbebf15cc0a1c6be923a81258992456b2a1573fa02251c21361
@@ -4,6 +4,7 @@ module IshManager
4
4
  protect_from_forgery :with => :exception, :prepend => true
5
5
  before_action :set_current_ability
6
6
  before_action :set_changelog
7
+ before_action :set_title
7
8
  check_authorization
8
9
  rescue_from ::CanCan::AccessDenied, :with => :access_denied
9
10
 
@@ -22,6 +23,15 @@ module IshManager
22
23
  redirect_to user_signed_in? ? root_path : Rails.application.routes.url_helpers.new_user_session_path, :alert => exception.message
23
24
  end
24
25
 
26
+ def pp_errors err
27
+ err
28
+ end
29
+
30
+ def puts! a, b=''
31
+ puts "+++ +++ #{b}"
32
+ puts a.inspect
33
+ end
34
+
25
35
  def set_changelog
26
36
  @version = Gem.loaded_specs['ish_manager'].version.to_s
27
37
  end
@@ -43,13 +53,8 @@ module IshManager
43
53
  @videos_list = Video.all.list
44
54
  end
45
55
 
46
- def pp_errors err
47
- err
48
- end
49
-
50
- def puts! a, b=''
51
- puts "+++ +++ #{b}"
52
- puts a.inspect
56
+ def set_title
57
+ @page_title = "#{ params[:controller].gsub('ish_manager/', '') } #{params[:action]} #{params[:slug]||params[:id]}"
53
58
  end
54
59
 
55
60
  # @TODO: obsolete, remove _vp_ 2022-10-15
@@ -0,0 +1,14 @@
1
+
2
+ class ::IshManager::EmailMessagesController < IshManager::ApplicationController
3
+
4
+ def index
5
+ authorize! :index, Ish::EmailCampaign # @TODO: change!
6
+ @email_messages = Office::EmailMessage.all
7
+ end
8
+
9
+ def show
10
+ authorize! :index, Ish::EmailCampaign # @TODO: change!
11
+ @email_message = Office::EmailMessage.find params[:id]
12
+ end
13
+
14
+ end
@@ -60,6 +60,8 @@
60
60
  %li
61
61
  = link_to 'Meetings', meetings_path
62
62
  = link_to '[+]', new_meeting_path
63
+ %li
64
+ = link_to 'EmailMessages', email_messages_path
63
65
  %ul
64
66
  %li
65
67
  = link_to 'Leads', leads_path
@@ -14,8 +14,8 @@
14
14
  = f.label :email_template_id
15
15
  = f.select :email_template_id, options_for_select(@email_templates_list, selected: params[:email_template_id] || email_ctx.email_template&.id )
16
16
  .field
17
- = f.label :title
18
- = f.text_field :title
17
+ = f.label :slug
18
+ = f.text_field :slug
19
19
 
20
20
  .field
21
21
  = f.label :from_email
@@ -2,35 +2,16 @@
2
2
  .email-contexts-show
3
3
 
4
4
  %ul
5
- %li <b>Type:</b> #{@email_ctx.type}
6
5
  %li <b>Title:</b> #{@email_ctx.title}
7
6
  %li <b>From:</b> #{@email_ctx.from_email}
8
7
  %li <b>Subject:</b> #{@email_ctx.subject}
9
- - if @email_ctx.type == Ish::EmailContext::TYPE_SINGLE
10
- %li <b>To:</b> #{@email_ctx.to_email}
11
- %li <b>Template:</b> #{@email_ctx.email_template.slug} <b>Type:</b> #{@email_ctx.email_template.type}
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}
12
10
  %li <b>Send at:</b> #{@email_ctx.send_at&.strftime('%Y-%m-%d %l:%M%P')}
13
11
  %li <b>Sent at:</b> #{@email_ctx.sent_at&.strftime('%Y-%m-%d %l:%M%P')}
14
-
15
- -#
16
- -# Yes sent
17
- -#
18
- - if @email_ctx.sent_at
19
- - if @email_ctx.type == Ish::EmailContext::TYPE_CAMPAIGN
20
- %li
21
- <b>C_Leads (#{@email_ctx.campaign_leads.length}):</b>
22
- - @email_ctx.campaign_leads&.each do |c_lead|
23
- = c_lead.lead.email
24
- = link_to '[view]', campaign_lead_path( c_lead )
25
- ,
26
-
27
- - else # Draft
28
- - if @email_ctx.type == Ish::EmailContext::TYPE_CAMPAIGN
29
- %li <b>Leads (#{@email_ctx.leads.length}):</b> #{@email_ctx.leads.map { |p| p&.email }.join(", ") }
30
-
31
- %li
32
- = button_to 'Send', email_context_send_path(@email_ctx), form_class: 'inline', :data => { :confirm => 'Are you sure?' }
33
- = link_to '[~]', edit_email_context_path(@email_ctx)
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)
34
15
 
35
16
  - if @email_ctx.sent_at
36
17
  = raw @email_ctx.rendered_str
@@ -0,0 +1,8 @@
1
+
2
+ %h2 Email Messages
3
+
4
+ %ol
5
+ - @email_messages.each do |msg|
6
+ %li
7
+ From: #{msg.from}
8
+ = link_to 'view', email_message_path(msg)
@@ -0,0 +1,4 @@
1
+
2
+
3
+ = raw @email_message.part_html
4
+
@@ -1,9 +1,9 @@
1
1
  !!!
2
2
  %html
3
3
  %head
4
- %title #{@page_title} | PiousboxCMS
4
+ %title #{@page_title}| PiousboxCMS
5
5
  %link{ :rel => 'icon', :href => "/favicon_#{ENV['RAILS_ENV']}.gif" }
6
- %meta{ :name => :viewport, :content => 'width=device-width, initial-scale=1.0' }
6
+ %meta{ :name => :viewport, :content => 'width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=2' }
7
7
  %meta{ :charset => 'UTF-8' }
8
8
  %meta{ :description => @page_description }
9
9
 
data/config/routes.rb CHANGED
@@ -54,6 +54,8 @@ IshManager::Engine.routes.draw do
54
54
  resources :email_campaigns
55
55
  resources :email_campaign_leads, as: :campaign_leads
56
56
 
57
+ resources :email_messages
58
+
57
59
  get 'email_contexts/iframe_src/:id', to: 'email_contexts#iframe_src', as: :email_context_iframe
58
60
  get 'email_contexts/new_with/:template_slug', to: 'email_contexts#new'
59
61
  post 'email_contexts/send/:id', to: 'email_contexts#do_send', as: :email_context_send
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.352
4
+ version: 0.1.8.354
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-13 00:00:00.000000000 Z
11
+ date: 2023-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -284,6 +284,7 @@ files:
284
284
  - app/controllers/ish_manager/email_campaign_leads_controller.rb
285
285
  - app/controllers/ish_manager/email_campaigns_controller.rb
286
286
  - app/controllers/ish_manager/email_contexts_controller.rb
287
+ - app/controllers/ish_manager/email_messages_controller.rb
287
288
  - app/controllers/ish_manager/email_templates_controller.rb
288
289
  - app/controllers/ish_manager/email_unsubscribes_controller.rb
289
290
  - app/controllers/ish_manager/galleries_controller.rb
@@ -365,6 +366,8 @@ files:
365
366
  - app/views/ish_manager/email_contexts/index.haml
366
367
  - app/views/ish_manager/email_contexts/new.haml
367
368
  - app/views/ish_manager/email_contexts/show.haml
369
+ - app/views/ish_manager/email_messages/index.haml
370
+ - app/views/ish_manager/email_messages/show.haml
368
371
  - app/views/ish_manager/email_templates/_form.haml
369
372
  - app/views/ish_manager/email_templates/_form_mini.haml
370
373
  - app/views/ish_manager/email_templates/_index.haml