ish_manager 0.1.8.334 → 0.1.8.336
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28209cd961617c020d01031f836cf312836b759a59f93a4126d96e16e8638f25
|
4
|
+
data.tar.gz: 87ba7d3183fb3ce417df0e55daa16c7c4586b07ab1a1ace13138caabc1c6e35a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f11d03c08dd05be68126116be45baccc904146d2739916cfce79cf9f251e1658952a0eb6366ba9b48decde688c5e53a046928dfe0729520d7ad905b7687e969
|
7
|
+
data.tar.gz: 46d41f6306aaafe4c4638b6ca98edfc842639c57762e8917204e79b11f994af3f5cabd83a9808741436019ed5758193a2254041299058c1c2e1d6735a35bba03
|
@@ -52,6 +52,11 @@
|
|
52
52
|
.email-contexts--form,
|
53
53
|
.email-templates--form {
|
54
54
|
|
55
|
+
textarea {
|
56
|
+
width: 100%;
|
57
|
+
min-height: 200px;
|
58
|
+
}
|
59
|
+
|
55
60
|
.field-subject {
|
56
61
|
display: flex;
|
57
62
|
width: calc( 100% - 20px );
|
@@ -63,8 +68,6 @@
|
|
63
68
|
}
|
64
69
|
}
|
65
70
|
|
66
|
-
|
67
|
-
|
68
71
|
.body {
|
69
72
|
border: 1px solid red;
|
70
73
|
padding: 10px;
|
@@ -8,6 +8,7 @@ class ::IshManager::EmailContextsController < ::IshManager::ApplicationControlle
|
|
8
8
|
def create
|
9
9
|
authorize! :create, ::Ish::EmailContext
|
10
10
|
@email_ctx = ::Ish::EmailContext.new params[:ish_email_context].permit!
|
11
|
+
@email_ctx.tmpl = JSON.parse(@email_ctx.tmpl)
|
11
12
|
if @email_ctx.save
|
12
13
|
flash[:notice] = 'Saved.'
|
13
14
|
redirect_to action: 'show', id: @email_ctx.id
|
@@ -60,8 +61,7 @@ class ::IshManager::EmailContextsController < ::IshManager::ApplicationControlle
|
|
60
61
|
render 'ish_manager/email_templates/iframe_src', layout: false
|
61
62
|
return
|
62
63
|
when 'plain'
|
63
|
-
@body = @
|
64
|
-
@body.gsub!('{name}', @email_ctx.tmpl_name)
|
64
|
+
@body = @email_ctx.body_templated
|
65
65
|
render 'ish_manager/email_templates/plain', layout: false
|
66
66
|
return
|
67
67
|
end
|
@@ -95,7 +95,9 @@ class ::IshManager::EmailContextsController < ::IshManager::ApplicationControlle
|
|
95
95
|
def update
|
96
96
|
@email_ctx = ::Ish::EmailContext.find params[:id]
|
97
97
|
authorize! :update, @email_ctx
|
98
|
-
|
98
|
+
pparams = params[:ish_email_context].permit!
|
99
|
+
pparams[:tmpl] = JSON.parse(pparams[:tmpl])
|
100
|
+
if @email_ctx.update_attributes pparams
|
99
101
|
flash[:notice] = 'Saved.'
|
100
102
|
redirect_to action: 'show', id: @email_ctx.id
|
101
103
|
return
|
@@ -59,8 +59,7 @@ class IshManager::OfficeMailer < IshManager::ApplicationMailer
|
|
59
59
|
template = "render/_#{@email_ctx.email_template.slug}"
|
60
60
|
rendered_str = ac.render_to_string("ish_manager/email_templates/_#{@email_ctx.email_template.slug}")
|
61
61
|
when 'plain'
|
62
|
-
@body = @email_ctx.
|
63
|
-
@body.gsub!('{name}', @email_ctx.name)
|
62
|
+
@body = @email_ctx.body_templated
|
64
63
|
template = "render/plain"
|
65
64
|
rendered_str = ac.render_to_string("ish_manager/email_templates/plain")
|
66
65
|
end
|
@@ -30,9 +30,9 @@
|
|
30
30
|
= f.label :to_email
|
31
31
|
= f.text_field :to_email
|
32
32
|
%h5 Templating
|
33
|
+
%div Commonly: name, companyName
|
33
34
|
.field
|
34
|
-
= f.
|
35
|
-
= f.text_field :tmpl_name
|
35
|
+
= f.text_area :tmpl, value: JSON.pretty_generate( email_ctx.tmpl )
|
36
36
|
|
37
37
|
.field.field-subject
|
38
38
|
= f.label :subject
|
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.
|
4
|
+
version: 0.1.8.336
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|