wco_email 0.1.1.36 → 0.1.1.38

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: 10449fe346daa296599af8fd3af1f36beb2605cf5777334699ab384f09d4589e
4
- data.tar.gz: 6bb8a9b1c1177bd90600b335573e6ca9d28329be1223fc86fb7830e6cfe6b9f1
3
+ metadata.gz: e3aec0849c36c100c3d0593a6cae5c080f77922f036f49e4b5894b94a723d9f6
4
+ data.tar.gz: d099a21790669e72e952ec80b435f96b71a86983f6a7d3eb737f2a45e6b1fe79
5
5
  SHA512:
6
- metadata.gz: ee1f2e4ea09c3afc6dabbf0b4a0a553d330cd678bc831e2689c1780c261c597b232ba2136efbc4e8f8396601fe52727e0e00193583961c5c53069104f874d674
7
- data.tar.gz: c1fe540f6cd41b777564f6d517cdd768eb3d8fe72deed96c4aac67872a80ddaddc7ee0fe9fd2a4cd25c0d988578b60881c36f67917b13be56a88c27c8d5c0ea9
6
+ metadata.gz: 22506009afe3a9203508ba24aba14538e6380c865d6490fa1360a76593fca099abe48e61012f3749a6be78488d3376d21d671975e6390b60860a212bf94962d9
7
+ data.tar.gz: 271d3085f630d9c478fa4c8ddea37b26fa3bc2c03c17eb60334af7cbbaa220cf5db4d34c4b0db24de704913bcf2d1c4ecd2d883ed07dfbc4369fedff52e1db66
@@ -7,10 +7,8 @@
7
7
 
8
8
  $(function () {
9
9
 
10
- if ($(".tinymce").length > 0) {
11
- $(".tinymce").summernote()
12
- }
13
10
 
14
- logg('loaded wco_email/application.js')
11
+
12
+ // logg('loaded wco_email/application.js')
15
13
  }) // END
16
14
 
@@ -2,8 +2,10 @@
2
2
  EC = WcoEmail::Conversation
3
3
  EF = WcoEmail::EmailFilter
4
4
  EM = WcoEmail::Message
5
+ ET = WcoEmail::EmailTemplate
5
6
  MS = WcoEmail::MessageStub
6
7
  EMS = MS
8
+ Sch = WcoEmail::EmailAction
7
9
 
8
10
  class WcoEmail::ApplicationController < Wco::ApplicationController
9
11
  # before_action :set_lists
@@ -1,6 +1,4 @@
1
1
 
2
- Sch = WcoEmail::EmailAction
3
-
4
2
  class WcoEmail::EmailActionsController < WcoEmail::ApplicationController
5
3
 
6
4
  before_action :set_lists
@@ -56,11 +56,21 @@ class WcoEmail::EmailTemplatesController < WcoEmail::ApplicationController
56
56
 
57
57
  def index
58
58
  authorize! :index, WcoEmail::EmailTemplate
59
- @templates = WcoEmail::EmailTemplate.all.order_by( slug: :asc
60
- ).page( params[:templates_page]
61
- ).per( current_profile.per_page
62
- )
63
- render params[:template] || '_index'
59
+ @templates = WcoEmail::EmailTemplate.all
60
+
61
+ if params[:q]
62
+ q = URI.decode(params[:q])
63
+ @templates = @templates.where({ :slug => /#{q}/i })
64
+ end
65
+
66
+ @templates = @templates.order_by( slug: :asc )
67
+
68
+ if '_index_expanded' == params[:view]
69
+ @templates = @templates.page( params[:templates_page]
70
+ ).per( current_profile.per_page
71
+ )
72
+ end
73
+ render params[:view] || '_index'
64
74
  end
65
75
 
66
76
  def new
@@ -3,4 +3,4 @@
3
3
  = form_tag email_templates_path, method: :get do
4
4
  = text_field_tag :q
5
5
  = link_to '[+]', new_email_template_path
6
- = link_to '[expanded]', email_templates_path({ template: '_index_expanded' })
6
+ = link_to '[expanded]', email_templates_path({ view: '_index_expanded' })
@@ -4,7 +4,7 @@
4
4
  %h5.flex-row.collapse-expand#emailTemplatesIndex
5
5
  = render '/wco_email/email_templates/header'
6
6
 
7
- = paginate @templates, :param_name => :templates_page, :views_prefix => 'wco'
7
+ -# = paginate @templates, :param_name => :templates_page, :views_prefix => 'wco'
8
8
  .email-templates-index.maxwidth
9
9
  %table.bordered.data-table
10
10
  %thead
@@ -16,11 +16,12 @@
16
16
 
17
17
  - @templates.each do |tmpl|
18
18
  %tr
19
- %td.flex-row
20
- = link_to '[use]', new_context_path({ email_template_id: tmpl.id })
21
- = link_to '[~]', edit_email_template_path({ id: tmpl })
22
- = button_to '[x]', email_template_path({ id: tmpl }), method: :delete, :data => { :confirm => 'Are you sure?' }, form_class: 'inline'
19
+ %td
20
+ .flex-row
21
+ = link_to '[use]', new_context_path({ email_template_id: tmpl.id })
22
+ = link_to '[~]', edit_email_template_path({ id: tmpl })
23
+ = button_to '[x]', email_template_path({ id: tmpl }), method: :delete, :data => { :confirm => 'Are you sure?' }, form_class: 'inline'
23
24
  %td= link_to tmpl.slug, email_template_path({ id: tmpl })
24
25
  %td= pp_date tmpl.created_at
25
26
  %td= pp_date tmpl.updated_at
26
- = paginate @templates, :param_name => :templates_page, :views_prefix => 'wco'
27
+ -# = paginate @templates, :param_name => :templates_page, :views_prefix => 'wco'
@@ -1,6 +1,6 @@
1
1
 
2
2
  .flex-row
3
- = link_to '[use]', new_email_context_path({ email_template_id: tmpl.id })
3
+ = link_to '[use]', new_context_path({ email_template_id: tmpl.id })
4
4
  = link_to '[~]', edit_email_template_path({ id: tmpl })
5
5
  = button_to '[x]', email_template_path({ id: tmpl }), method: :delete, :data => { :confirm => 'Are you sure?' }, form_class: 'inline'
6
6
  = link_to tmpl.slug, email_template_path({ id: tmpl })
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.36
4
+ version: 0.1.1.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-15 00:00:00.000000000 Z
11
+ date: 2024-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3