ish_manager 0.1.8.439 → 0.1.8.440

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: 9ab6080d06ed44c29d7f0e1e6abe18506f8fca69ec32241ccf30f76a9d66d66b
4
- data.tar.gz: 71ec0d289090ef315715edb360ec53e446e8a72496f6dcee767e09f01c7231e8
3
+ metadata.gz: c76d84dfb6865e2469dcf6c92fa6ba382aaf6121664bc6c2c5030d517e436def
4
+ data.tar.gz: bb81afa3195283fe7e37347dd126490daa13a3e9ee79e4e7aebcfcb4cc330933
5
5
  SHA512:
6
- metadata.gz: b6c2e8d712417a16aa1ac599c7519f946d97d8587a37710464f066df0506f8b688755e3323ee0a97a6992799b8a3d6dd3fbdb9733755aa56ba1d3846911bca33
7
- data.tar.gz: 99168ca8e5e930d0567a707973ea3a1446df384f2655ca278298f02125a6a49891be9267eb5e58ca94747b92a367ed476cfcc6a1a6afe292f55977c87dd7de91
6
+ metadata.gz: 1b7c4a6015f671f1d7814d4cf0e706e6a0f41a3d88b42267193256c145e1a8c164427433389be0c58384abaed4de6e25c4bc4f77da0fb95fd3e430208f8f2c8a
7
+ data.tar.gz: dd66635adab427556e6590d3ebfc10eeae6441be0deaeece93eb39804d48fdbc5896da15493f6cab9621faeadfb6f3d203d08c64ffca49d65c0473fa78a07eba
@@ -85,6 +85,7 @@ class IshManager::ApplicationController < ActionController::Base
85
85
  @email_campaigns_list = [[nil,nil]] + Ish::EmailCampaign.all.map { |c| [ c.slug, c.id ] }
86
86
  @email_actions_list = [[nil,nil]] + Office::EmailAction.all.map { |a| [ a.slug, a.id ] }
87
87
  @email_templates_list = [[nil,nil]] + Ish::EmailTemplate.all.map { |t| [ t.slug, t.id ] }
88
+ @email_tags_list = [[nil,nil]] + WpTag.email_tags.map { |t| [ t.name, t.id ] }
88
89
  @galleries_list = Gallery.all.list
89
90
  @leads_list = Lead.list
90
91
  @leadsets_list = Leadset.list
@@ -101,19 +102,27 @@ class IshManager::ApplicationController < ActionController::Base
101
102
  @page_title = "#{ params[:controller].gsub('ish_manager/', '') } #{params[:action]} #{params[:slug]||params[:id]} ".gsub(" ", " ")
102
103
  end
103
104
 
104
- # @TODO: obsolete, remove _vp_ 2022-10-15
105
- def update_profile_pic
106
- return unless params[:photo]
107
- @photo = Photo.new :photo => params[:photo]
108
- @photo.user_profile = @current_profile
109
- flag = @photo.save
110
- @resource.profile_photo = @photo
111
- flagg = @resource.save
112
- if flag && flagg
113
- flash[:notice] = 'Success'
114
- else
115
- flash[:alert] = "No Luck. #{@photo.errors.messages} #{@resource.errors.messages}"
116
- end
117
- end
118
105
 
119
106
  end
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+ # ## @TODO: obsolete, remove _vp_ 2022-10-15
115
+ # def update_profile_pic
116
+ # return unless params[:photo]
117
+ # @photo = Photo.new :photo => params[:photo]
118
+ # @photo.user_profile = @current_profile
119
+ # flag = @photo.save
120
+ # @resource.profile_photo = @photo
121
+ # flagg = @resource.save
122
+ # if flag && flagg
123
+ # flash[:notice] = 'Success'
124
+ # else
125
+ # flash[:alert] = "No Luck. #{@photo.errors.messages} #{@resource.errors.messages}"
126
+ # end
127
+ # end
128
+
@@ -1,7 +1,7 @@
1
1
 
2
2
  class ::IshManager::EmailFiltersController < ::IshManager::ApplicationController
3
3
 
4
- # before_action :set_lists
4
+ before_action :set_lists
5
5
 
6
6
  # alphabetized : )
7
7
 
@@ -16,6 +16,18 @@ class ::IshManager::EmailFiltersController < ::IshManager::ApplicationController
16
16
  redirect_to action: 'index'
17
17
  end
18
18
 
19
+ def destroy
20
+ @email_filter = Office::EmailFilter.find params[:id]
21
+ authorize! :destroy, @email_filter
22
+ flag = @email_filter.destroy
23
+ if flag
24
+ flash[:notice] = 'Success'
25
+ else
26
+ flash[:alert] = 'Error'
27
+ end
28
+ redirect_to action: 'index'
29
+ end
30
+
19
31
  def edit
20
32
  @email_filter = Office::EmailFilter.find params[:id]
21
33
  authorize! :edit, @email_filter
@@ -34,8 +46,8 @@ class ::IshManager::EmailFiltersController < ::IshManager::ApplicationController
34
46
  def update
35
47
  @email_filter = Office::EmailFilter.find params[:id]
36
48
  authorize! :update, @email_filter
37
- @email_filter.update_attributes( params[:email_filter].permit! )
38
- if @email_filter.persisted?
49
+ flag = @email_filter.update_attributes( params[:email_filter].permit! )
50
+ if flag
39
51
  flash[:notice] = 'Success'
40
52
  else
41
53
  flash[:alert] = "No luck: #{@email_filter.errors.full_messages.join(', ')}."
@@ -5,14 +5,33 @@
5
5
  .field
6
6
  %label From Regex
7
7
  = f.text_field :from_regex
8
+ .field
9
+ %label From Exact
10
+ = f.text_field :from_exact
8
11
  .field
9
12
  %label Subject Regex
10
13
  = f.text_field :subject_regex
11
14
  .field
12
- %label Body Regex
13
- = f.text_field :body_regex
15
+ %label Subject Exact
16
+ = f.text_field :subject_exact
17
+ -# .field
18
+ -# %label Body Regex
19
+ -# = f.text_field :body_regex
20
+ .field
21
+ %label Body Exact
22
+ = f.text_field :body_exact
23
+ %hr
14
24
  .field
15
25
  %label Kind
16
26
  = f.select :kind, options_for_select( ::Office::EmailFilter::KINDS, selected: email_filter.kind )
27
+ .field
28
+ %label Template
29
+ = f.select :email_template_id, options_for_select(@email_templates_list, selected: params[:email_template_id] || email_filter.email_template_id ), {}, { class: 'select2' }
30
+ .field
31
+ = f.label :email_action
32
+ = f.select :email_action, options_for_select( @email_actions_list, selected: email_filter.email_action_id ), {}, class: 'select2'
33
+ .field
34
+ = f.label :wp_term_id
35
+ = f.select :wp_term_id, options_for_select( @email_tags_list, selected: email_filter.wp_term_id ), {}, class: 'select2'
17
36
  .actions
18
37
  = f.submit
@@ -1,5 +1,5 @@
1
1
 
2
- .email-filters-index.max-width
2
+ .email-filters-index.padded
3
3
  .header
4
4
  %h2.title
5
5
  Email Filters (#{@email_filters.length})
@@ -10,17 +10,29 @@
10
10
  %th &nbsp;
11
11
  %th &nbsp;
12
12
  %th From Regex
13
+ %th From Exact
13
14
  %th Subject Regex
14
- %th Body Regex
15
+ %th Subject Exact
16
+ %th Body Exact
15
17
  %th Kind
18
+ %th Email Action
19
+ %th Email Template
20
+ %th Email Tag
16
21
  - @email_filters.each do |ef|
17
22
 
18
23
  %tr
19
24
  %td= check_box_tag 'checked'
20
- %td= link_to '[~]', edit_email_filter_path(ef)
25
+ %td
26
+ = link_to '[~]', edit_email_filter_path(ef)
27
+ .inline-block= button_to '[x]', email_filter_path(ef), method: :delete, data: { confirm: 'Are you sure?' }
21
28
  %td= ef.from_regex
29
+ %td= ef.from_exact
22
30
  %td= ef.subject_regex
23
- %td= ef.body_regex
31
+ %td= ef.subject_exact
32
+ %td= ef.body_exact
24
33
  %td= ef.kind
34
+ %td= ef.email_action&.slug
35
+ %td= ef.email_template&.slug
36
+ %td= ef.category&.name
25
37
 
26
38
 
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.439
4
+ version: 0.1.8.440
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-18 00:00:00.000000000 Z
11
+ date: 2023-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails