sinatra-hexacta 0.3.3 → 0.3.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 486d724d40440586e2c909583687a5aa34f9d4f348ff6d56cd6d35085f5ab9fb
|
4
|
+
data.tar.gz: d0ed9a2ded7adcc993e4e4cdbeed68938793e7da4b3510c108ec66222af94844
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd96c1d6eef238d9c1a929c0339483c9ee9e934b2bed2399fffe776543506ae930c700898a16bade0df3ca4e8672fa57cc8a14b0be6393fde0bc2b4d5e46bc9a
|
7
|
+
data.tar.gz: 0726a9d33be03576cceab798ad59aae29e8df592929ad89150d5827c3c8d35a8e1d2b5ac368c156e064a3bec475b64f0b17e3894f5e89779fd46b166c5e69b7a
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
class GeneralMailNoLink < Mail
|
3
|
+
|
4
|
+
def initialize(args)
|
5
|
+
super(args)
|
6
|
+
@subject = args[:subject]
|
7
|
+
@description = args[:description]
|
8
|
+
end
|
9
|
+
|
10
|
+
def template
|
11
|
+
'general_no_link'
|
12
|
+
end
|
13
|
+
|
14
|
+
def subject
|
15
|
+
@subject
|
16
|
+
end
|
17
|
+
|
18
|
+
def values
|
19
|
+
data = {}
|
20
|
+
data["{description}"] = @description
|
21
|
+
data
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
@@ -28,11 +28,20 @@ class MailBuilder
|
|
28
28
|
|
29
29
|
def send
|
30
30
|
@from ||= "apps@hexacta.com"
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
31
|
+
if @link.nil?
|
32
|
+
GeneralMailNoLink.new({ :to => @to,
|
33
|
+
:from => @from,
|
34
|
+
:subject => @subject,
|
35
|
+
:description => @description
|
36
|
+
}).send
|
37
|
+
else
|
38
|
+
GeneralMail.new({ :to => @to,
|
39
|
+
:from => @from,
|
40
|
+
:subject => @subject,
|
41
|
+
:description => @description,
|
42
|
+
:link => @link
|
43
|
+
}).send
|
44
|
+
|
45
|
+
end
|
37
46
|
end
|
38
47
|
end
|
@@ -4,15 +4,16 @@
|
|
4
4
|
- id = "#{name}_#{rand(1000)}"
|
5
5
|
- unless defined? placeholder
|
6
6
|
- placeholder = "..."
|
7
|
-
|
7
|
+
-unless defined? onkeyup
|
8
|
+
-onkeyup = ''
|
8
9
|
|
9
10
|
-if required
|
10
11
|
.form-group.has-feedback.has-success
|
11
12
|
label #{title}
|
12
13
|
.fg-line
|
13
|
-
input.form-control.fg-input id="#{id}" type="#{type}" placeholder=("#{placeholder}") name="#{name}" required="" value="#{value}"
|
14
|
+
input.form-control.fg-input id="#{id}" type="#{type}" placeholder=("#{placeholder}") name="#{name}" required="" value="#{value}" onkeyup="#{onkeyup}"
|
14
15
|
-else
|
15
16
|
.form-group
|
16
17
|
label #{title}
|
17
18
|
.fg-line
|
18
|
-
input.form-control.fg-input id="#{id}" type="#{type}" placeholder=("#{placeholder}") name="#{name}" value="#{value}"
|
19
|
+
input.form-control.fg-input id="#{id}" type="#{type}" placeholder=("#{placeholder}") name="#{name}" value="#{value}" onkeyup="#{onkeyup}"
|
@@ -4,11 +4,13 @@
|
|
4
4
|
- id = "#{name}_#{rand(1000)}"
|
5
5
|
- unless defined? placeholder
|
6
6
|
- placeholder = "Escribe aquí..."
|
7
|
+
- unless defined? rows
|
8
|
+
- rows = 5
|
7
9
|
|
8
10
|
.form-group
|
9
11
|
.fg-line
|
10
12
|
label.fg-label #{title}
|
11
13
|
- if required
|
12
|
-
textarea.form-control name="#{name}" placeholder=("#{placeholder}") rows="
|
14
|
+
textarea.form-control name="#{name}" placeholder=("#{placeholder}") rows="#{rows}" maxlength="#{length}" required="" #{value}
|
13
15
|
- else
|
14
|
-
textarea.form-control name="#{name}" placeholder=("#{placeholder}") rows="
|
16
|
+
textarea.form-control name="#{name}" placeholder=("#{placeholder}") rows="#{rows}" maxlength="#{length}" #{value}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-hexacta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marco Zanger
|
@@ -61,6 +61,7 @@ files:
|
|
61
61
|
- lib/sinatra/extensions/antiquity.rb
|
62
62
|
- lib/sinatra/extensions/date.rb
|
63
63
|
- lib/sinatra/extensions/generalmail.rb
|
64
|
+
- lib/sinatra/extensions/generalmailnolink.rb
|
64
65
|
- lib/sinatra/extensions/init.rb
|
65
66
|
- lib/sinatra/extensions/mail.rb
|
66
67
|
- lib/sinatra/extensions/mailbuilder.rb
|