card-mod-format 0.11.3 → 0.11.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/set/all/error.rb +6 -6
- data/set/all/html_content.rb +1 -1
- data/set/all/html_error.rb +10 -10
- data/set/all/html_wrapper.rb +6 -1
- data/set/type/cardtype.rb +3 -3
- data/set/type/json.rb +1 -1
- data/set/type/number.rb +1 -1
- data/set/type/toggle.rb +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2f8f38464d708a80ec6d82de49efc7c016ded54fcd7e87268ce69bc4e8088bc
|
4
|
+
data.tar.gz: 587e9ed394e5dbbdf8069f1393f9099a3d58dc2af6688e8a7925dc763484933d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2b52b883aaba30ee4b4a13acf5962eda386168681beff490ac225f055cfd0f7b0218555beb7b625bfcc199e2507413739a81dde3932788d8cfcc4055edea598
|
7
|
+
data.tar.gz: bfbd609e94133af311de8d05c05c15d662aeacde4b1e35a2b5594aa4a86529b1b4028485e133e6dff47236488aef8d81b2bac04a90d521c422387d2453741f28
|
data/set/all/error.rb
CHANGED
@@ -8,21 +8,21 @@ format do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
view :server_error, perms: :none do
|
11
|
-
|
11
|
+
t(:format_server_error)
|
12
12
|
end
|
13
13
|
|
14
14
|
view :denial, perms: :none do
|
15
|
-
focal? ?
|
15
|
+
focal? ? t(:format_denial) : ""
|
16
16
|
end
|
17
17
|
|
18
18
|
view :not_found, perms: :none do
|
19
|
-
error_name = card.name.present? ? safe_name :
|
20
|
-
|
19
|
+
error_name = card.name.present? ? safe_name : t(:format_not_found_no_name)
|
20
|
+
t(:format_not_found_named, cardname: error_name)
|
21
21
|
end
|
22
22
|
|
23
23
|
view :bad_address, perms: :none do
|
24
24
|
root.error_status = 404
|
25
|
-
|
25
|
+
t(:format_bad_address)
|
26
26
|
end
|
27
27
|
|
28
28
|
view :errors do
|
@@ -50,7 +50,7 @@ format do
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def unsupported_view_error_message view
|
53
|
-
|
53
|
+
t(:format_unsupported_view, view: view, cardname: card.name)
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
data/set/all/html_content.rb
CHANGED
data/set/all/html_error.rb
CHANGED
@@ -52,7 +52,7 @@ format :html do
|
|
52
52
|
view :errors, perms: :none do
|
53
53
|
return if card.errors.empty?
|
54
54
|
|
55
|
-
voo.title = card.name.blank? ? "Problems" :
|
55
|
+
voo.title = card.name.blank? ? "Problems" : t(:format_problems_name, cardname: card.name)
|
56
56
|
voo.hide! :menu
|
57
57
|
class_up "alert", "card-error-msg"
|
58
58
|
standard_errors voo.title
|
@@ -133,21 +133,21 @@ format :html do
|
|
133
133
|
def sign_in_or_up_links to_task
|
134
134
|
return if Auth.signed_in?
|
135
135
|
|
136
|
-
links = [signin_link, signup_link].compact.join " #{
|
136
|
+
links = [signin_link, signup_link].compact.join " #{t(:format_or)} "
|
137
137
|
wrap_with(:div) do
|
138
|
-
[
|
138
|
+
[t(:format_please), links, to_task].join(" ") + "."
|
139
139
|
end
|
140
140
|
end
|
141
141
|
|
142
142
|
def signin_link
|
143
|
-
link_to_card :signin,
|
143
|
+
link_to_card :signin, t(:account_sign_in)&.downcase,
|
144
144
|
class: "signin-link", slotter: true, path: { view: :open }
|
145
145
|
end
|
146
146
|
|
147
147
|
def signup_link
|
148
148
|
return unless signup_ok?
|
149
149
|
|
150
|
-
link_to_card :signup,
|
150
|
+
link_to_card :signup, t(:account_sign_up)&.downcase,
|
151
151
|
class: "signup-link", slotter: true, path: { action: :new }
|
152
152
|
end
|
153
153
|
|
@@ -164,19 +164,19 @@ format :html do
|
|
164
164
|
def loud_denial
|
165
165
|
voo.hide :menu
|
166
166
|
frame do
|
167
|
-
[wrap_with(:h1,
|
167
|
+
[wrap_with(:h1, t(:format_sorry)),
|
168
168
|
wrap_with(:div, loud_denial_message)]
|
169
169
|
end
|
170
170
|
end
|
171
171
|
|
172
172
|
def loud_denial_message
|
173
|
-
to_task = @denied_task ?
|
173
|
+
to_task = @denied_task ? t(:format_denied_task, denied_task: @denied_task) : t(:format_to_do_that)
|
174
174
|
|
175
175
|
case
|
176
176
|
when not_denied_task_read?
|
177
|
-
|
177
|
+
t(:format_read_only)
|
178
178
|
when Auth.signed_in?
|
179
|
-
|
179
|
+
t(:format_need_permission_task, task: to_task)
|
180
180
|
else
|
181
181
|
Env.save_interrupted_action request.env["REQUEST_URI"]
|
182
182
|
sign_in_or_up_links to_do_unauthorized_task
|
@@ -188,6 +188,6 @@ format :html do
|
|
188
188
|
end
|
189
189
|
|
190
190
|
def to_do_unauthorized_task
|
191
|
-
@denied_task ?
|
191
|
+
@denied_task ? t(:format_denied_task, denied_task: @denied_task) : t(:format_to_do_that)
|
192
192
|
end
|
193
193
|
end
|
data/set/all/html_wrapper.rb
CHANGED
@@ -37,7 +37,12 @@ format :html do
|
|
37
37
|
|
38
38
|
def wrap_data slot=true
|
39
39
|
with_slot_data slot do
|
40
|
-
{
|
40
|
+
{
|
41
|
+
"card-id": card.id,
|
42
|
+
"card-name": slot_cardname,
|
43
|
+
"card-link-name": card.name.url_key,
|
44
|
+
"slot-id": SecureRandom.hex(10)
|
45
|
+
}
|
41
46
|
end
|
42
47
|
end
|
43
48
|
|
data/set/type/cardtype.rb
CHANGED
@@ -5,7 +5,7 @@ format :html do
|
|
5
5
|
|
6
6
|
def type_formgroup args={}
|
7
7
|
if card.cards_of_type_exist?
|
8
|
-
wrap_with :div,
|
8
|
+
wrap_with :div, t(:format_cards_exist, scope: "core", cardname: safe_name)
|
9
9
|
else
|
10
10
|
super
|
11
11
|
end
|
@@ -20,7 +20,7 @@ format :html do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def add_link opts={}
|
23
|
-
voo.title ||=
|
23
|
+
voo.title ||= t(:format_add_card, cardname: safe_name)
|
24
24
|
link_to render_title, add_link_opts(opts)
|
25
25
|
end
|
26
26
|
|
@@ -67,7 +67,7 @@ format :html do
|
|
67
67
|
def configure_link css_class=nil
|
68
68
|
return "" unless Card.fetch(card, :type, :structure, new: {}).ok? :update
|
69
69
|
|
70
|
-
voo.title ||=
|
70
|
+
voo.title ||= t(:format_configure_card, cardname: safe_name.pluralize)
|
71
71
|
title = _render_title
|
72
72
|
link_to_card card, title,
|
73
73
|
path: { view: :bridge,
|
data/set/type/json.rb
CHANGED
data/set/type/number.rb
CHANGED
@@ -6,7 +6,7 @@ format :html do
|
|
6
6
|
end
|
7
7
|
|
8
8
|
event :validate_number, :validate, on: :save do
|
9
|
-
errors.add :content,
|
9
|
+
errors.add :content, t(:format_not_numeric, content: content) unless valid_number?(content)
|
10
10
|
end
|
11
11
|
|
12
12
|
def valid_number? string
|
data/set/type/toggle.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card-mod-format
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-05-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: card
|
@@ -18,28 +18,28 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.101.
|
21
|
+
version: 1.101.4
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 1.101.
|
28
|
+
version: 1.101.4
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: card-mod-content
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.11.
|
35
|
+
version: 0.11.4
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.11.
|
42
|
+
version: 0.11.4
|
43
43
|
description: ''
|
44
44
|
email:
|
45
45
|
- info@decko.org
|