card-mod-rules 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/related_sets.rb +25 -0
- data/set/rstar/rule_user.rb +2 -3
- data/set/rule/rule_form.rb +2 -3
- data/set/rule/rule_form/buttons.rb +1 -2
- data/set/rule/rules.rb +4 -4
- data/set/type/set/html_views/group_panel.haml +1 -1
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87f1fa14f7bc2deb4eeee23382a39fed6d4781dd0b81cf626b6ef09b5fcfbd33
|
4
|
+
data.tar.gz: a22ad4780f33d63a8169b7d1098220ef5e5fab8606e4a51c418281878d877fff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be6ca1c5d1d3c89ffd67e1dc33b6ca681d31618af027d8ec0eb764e3719001f1c1c8ef19dd6429c69cfcd50ea361854936d22119836abf81b7a8cde4ef42f714
|
7
|
+
data.tar.gz: 6f385ff4c896445eb42b785da8fa61f85273892dfebb7d19c849f3b86eb594b1bb6d52332d74c7096bf7da9b3f15fed4c0a3a4035a4a937ffd151f3b2b4ddc8b
|
@@ -0,0 +1,25 @@
|
|
1
|
+
def related_sets with_self=false
|
2
|
+
# refers to sets that users may configure from the current card -
|
3
|
+
# NOT to sets to which the current card belongs
|
4
|
+
|
5
|
+
[].tap do |sets|
|
6
|
+
sets << [self_set_name, self_set_label] if with_self
|
7
|
+
sets << [right_set_name, right_set_label] if known? && simple?
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def self_set_name
|
12
|
+
Name[name, :self]
|
13
|
+
end
|
14
|
+
|
15
|
+
def self_set_label
|
16
|
+
Card::Set::Self.label name
|
17
|
+
end
|
18
|
+
|
19
|
+
def right_set_name
|
20
|
+
Name[name, :right]
|
21
|
+
end
|
22
|
+
|
23
|
+
def right_set_label
|
24
|
+
Card::Set::Right.label name
|
25
|
+
end
|
data/set/rstar/rule_user.rb
CHANGED
data/set/rule/rule_form.rb
CHANGED
@@ -41,7 +41,7 @@ format :html do
|
|
41
41
|
|
42
42
|
def edit_rule_form success_view, &block
|
43
43
|
@rule_context ||= card
|
44
|
-
@edit_rule_success = edit_rule_success
|
44
|
+
@edit_rule_success = edit_rule_success success_view
|
45
45
|
action_args = { action: :update, no_mark: true }
|
46
46
|
card_form action_args, rule_form_args, &block
|
47
47
|
end
|
@@ -51,7 +51,6 @@ format :html do
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def edit_rule_success view="overlay_rule"
|
54
|
-
{
|
55
|
-
view: view }
|
54
|
+
{ mark: @rule_context.name.url_key, view: view }
|
56
55
|
end
|
57
56
|
end
|
data/set/rule/rules.rb
CHANGED
@@ -10,7 +10,7 @@ def rule_set_key
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def rule_set_name
|
13
|
-
if
|
13
|
+
if preference?
|
14
14
|
name.trunk_name.trunk_name
|
15
15
|
else
|
16
16
|
name.trunk_name
|
@@ -22,7 +22,7 @@ def rule_set_pattern_name
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def rule_set
|
25
|
-
if
|
25
|
+
if preference?
|
26
26
|
self[0..-3]
|
27
27
|
else
|
28
28
|
trunk
|
@@ -46,7 +46,7 @@ def rule_setting_title
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def rule_user_setting_name
|
49
|
-
if
|
49
|
+
if preference?
|
50
50
|
"#{rule_user_name}+#{rule_setting_name}"
|
51
51
|
else
|
52
52
|
rule_setting_name
|
@@ -71,7 +71,7 @@ def first_set_option_index candidates
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def set_prototype
|
74
|
-
if
|
74
|
+
if preference?
|
75
75
|
self[0..-3].prototype
|
76
76
|
else
|
77
77
|
trunk.prototype
|
@@ -3,7 +3,7 @@
|
|
3
3
|
.card
|
4
4
|
.card-header{ role: "tab", id: heading_id }
|
5
5
|
%h5.mb-0
|
6
|
-
= link_to (
|
6
|
+
= link_to (t("rules_#{group_key}") || group_key.to_s),
|
7
7
|
href: "##{collapse_id}",
|
8
8
|
"data-toggle": "collapse", "aria-expanded": "false",
|
9
9
|
"data-parent": "#accordion", "aria-controls": collapse_id
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card-mod-rules
|
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,42 +18,42 @@ 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-format
|
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
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: card-mod-search
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.11.
|
49
|
+
version: 0.11.4
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.11.
|
56
|
+
version: 0.11.4
|
57
57
|
description: ''
|
58
58
|
email:
|
59
59
|
- info@decko.org
|
@@ -62,6 +62,7 @@ extensions: []
|
|
62
62
|
extra_rdoc_files: []
|
63
63
|
files:
|
64
64
|
- lib/javascript/script_rules.js.coffee
|
65
|
+
- set/all/related_sets.rb
|
65
66
|
- set/right/self.rb
|
66
67
|
- set/right/type_plus_right.rb
|
67
68
|
- set/rstar/rule_user.rb
|