wco_email 0.1.1.37 → 0.1.1.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascript/wco_email/application.js +2 -4
- data/app/controllers/wco_email/email_action_templates_controller.rb +12 -2
- data/app/controllers/wco_email/email_templates_controller.rb +15 -5
- data/app/views/wco_email/email_action_templates/_header.haml +13 -3
- data/app/views/wco_email/email_action_templates/index.haml +3 -5
- data/app/views/wco_email/email_templates/_header.haml +8 -3
- data/app/views/wco_email/email_templates/_index.haml +8 -7
- data/app/views/wco_email/email_templates/_meta.haml +1 -1
- data/app/views/wco_email/email_templates/_show_cell.haml +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0dc56047d5633c9cb2c17a5a79f6c9d197f967c8ff21cda2b226c69b61bc27b
|
4
|
+
data.tar.gz: 1a63809c18511133075188d9db0f6db153f6014fa8018bd17352be5b7bf96b93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74085e7567455c2d51e55b49ddbcdef6470b4f0f5d4c023b8fdc22727d70878c97ff513efa424eb54422ffccf31f8757321a47fa3901c9628c312e9ee7b2ab69
|
7
|
+
data.tar.gz: e782e24339d9d8b01cf7bd0a0f85fe2c77b7cf40091c341557910e725c144f1094d52d81413fe7fe00f186b4a0d708271ebb3c4d25bd5f8eaed281b3638b5ba2
|
@@ -20,9 +20,19 @@ class WcoEmail::EmailActionTemplatesController < WcoEmail::ApplicationController
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def index
|
23
|
-
@tmpls = WcoEmail::EmailActionTemplate.all
|
24
|
-
|
25
23
|
authorize! :index, @new_tmpl
|
24
|
+
if params[:deleted]
|
25
|
+
@tmpls = WcoEmail::EmailActionTemplate.deleted
|
26
|
+
else
|
27
|
+
@tmpls = WcoEmail::EmailActionTemplate.all
|
28
|
+
end
|
29
|
+
|
30
|
+
if params[:q]
|
31
|
+
q = URI.decode(params[:q])
|
32
|
+
@tmpls = @tmpls.where({ :slug => /#{q}/i })
|
33
|
+
end
|
34
|
+
|
35
|
+
@tmpls = @tmpls.order_by( slug: :asc )
|
26
36
|
end
|
27
37
|
|
28
38
|
def new
|
@@ -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
|
60
|
-
|
61
|
-
|
62
|
-
)
|
63
|
-
|
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
|
@@ -1,8 +1,18 @@
|
|
1
1
|
|
2
|
+
- if defined? tmpls
|
3
|
+
- q = params[:q]
|
4
|
+
- deleted = params[:deleted]
|
5
|
+
- else
|
6
|
+
- tmpls = WcoEmail::EmailActionTemplate.all
|
2
7
|
|
3
|
-
= link_to "Email Action Tmpls (#{
|
4
|
-
.inline-
|
8
|
+
= link_to "Email Action Tmpls (#{tmpls.length})", email_action_templates_path
|
9
|
+
.d-inline-block
|
5
10
|
= form_tag email_action_templates_path, method: :get do
|
6
|
-
= text_field_tag :q
|
11
|
+
= text_field_tag :q, q
|
7
12
|
= link_to '[+]', new_email_action_template_path
|
13
|
+
- if deleted
|
14
|
+
%b
|
15
|
+
= link_to '[deleted]', email_action_templates_path(deleted: true)
|
16
|
+
- else
|
17
|
+
= link_to '[deleted]', email_action_templates_path(deleted: true)
|
8
18
|
|
@@ -1,10 +1,8 @@
|
|
1
1
|
|
2
|
-
.email-action-templates-index.
|
3
|
-
|
2
|
+
.email-action-templates-index.maxwidth
|
4
3
|
.header
|
5
|
-
%
|
6
|
-
|
7
|
-
= link_to '[+]', new_email_action_template_path
|
4
|
+
%h5.title
|
5
|
+
= render 'header', tmpls: @tmpls
|
8
6
|
|
9
7
|
%table.bordered
|
10
8
|
%tr
|
@@ -1,6 +1,11 @@
|
|
1
1
|
|
2
|
-
|
2
|
+
- if defined? templates
|
3
|
+
- q = params[:q]
|
4
|
+
- else
|
5
|
+
- templates = WcoEmail::EmailTemplate.all
|
6
|
+
|
7
|
+
= link_to "Email Templates (#{templates.count})", email_templates_path
|
3
8
|
= form_tag email_templates_path, method: :get do
|
4
|
-
= text_field_tag :q
|
9
|
+
= text_field_tag :q, q
|
5
10
|
= link_to '[+]', new_email_template_path
|
6
|
-
= link_to '[expanded]', email_templates_path({
|
11
|
+
= link_to '[expanded]', email_templates_path({ view: '_index_expanded' })
|
@@ -2,9 +2,9 @@
|
|
2
2
|
.email-templates--index.maxwidth
|
3
3
|
|
4
4
|
%h5.flex-row.collapse-expand#emailTemplatesIndex
|
5
|
-
= render '/wco_email/email_templates/header'
|
5
|
+
= render '/wco_email/email_templates/header', templates: @templates
|
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
|
20
|
-
|
21
|
-
|
22
|
-
|
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]',
|
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.
|
4
|
+
version: 0.1.1.39
|
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-
|
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
|