card-mod-layout 0.15.0 → 0.15.1.1

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: eae60ab480a1985e43a70c077377a025e51d30b1b39a395b04c6907c3c57a41d
4
- data.tar.gz: 672b7bf9992a129a5ca1f5ff497fc19511b55b0ff5146226b25152a1d4e9d14c
3
+ metadata.gz: ed9974a5764b34521d3bf89b3d1272df7974dab74318a84410c718a999e27bd4
4
+ data.tar.gz: 4f6be5e5ece5ccc3ec02267cadb067e2d233d19792475730895c5712fa1d7625
5
5
  SHA512:
6
- metadata.gz: 7b08ce988ef614da4dc3c4c675a1b717e0bdbb481c6c4b98b862dab1de79f951a446ecd6837ee49dcbea22c71c2758d7d6040c7415e7d7de2e79b964732788c5
7
- data.tar.gz: ec94cb6a8b07a78e54de66ef5145d13c0c607f338275a5b167f7ddc7a7688a6b57e6f05f7f01893ee76e7a46587dc064d3230e1cdb107a7ed766188e0fff6ee1
6
+ metadata.gz: 5fbb7bad3189c31e3f504813be57d41e8cd6882fd53912145bbb55ca136dd06877eea4c1015451dddb65ae600dc66e2f9e936804879f54a15bfed076ea982a55
7
+ data.tar.gz: d9b0eb274b1983dfd26e35fca4f25cde1a76684dca115ce50b354adfbf415e942f3fe6aa391c60dd133b3340c568326b86bbcfecff99b01c167503d6fd5ac859
@@ -39,4 +39,5 @@
39
39
 
40
40
  .modal-header .btn-close {
41
41
  background: none;
42
+ background-image: none;
42
43
  }
@@ -1,29 +1,36 @@
1
1
  format :html do
2
- def link_to_mycard
3
- link_to_card Auth.current.name, nil,
2
+ def link_to_mycard text=nil
3
+ link_to_card Auth.current.name, text,
4
4
  id: "my-card-link", class: "nav-link #{classy('my-card')}"
5
5
  end
6
6
 
7
- def account_dropdown &render_role_item
7
+ def account_dropdown
8
8
  class_up "dropdown-toggle-split", "nav-link"
9
- split_dropdown_button link_to_mycard do
10
- [
11
- [[Auth.current, :account_settings], "Account"],
12
- [:signin, t("account_sign_out"), { path: { action: :delete } }]
13
- ] + account_dropdown_roles(&render_role_item)
9
+ split_dropdown_button account_dropdown_label do
10
+ account_dropdown_items
14
11
  end
15
12
  end
16
13
 
17
14
  private
18
15
 
19
- def account_dropdown_roles &block
16
+ def account_dropdown_label
17
+ link_to_mycard
18
+ end
19
+
20
+ def account_dropdown_items
21
+ [[[Auth.current, :account_settings], "Account"],
22
+ [:signin, t("account_sign_out"), { path: { action: :delete } }]] +
23
+ account_dropdown_roles
24
+ end
25
+
26
+ def account_dropdown_roles
20
27
  return [] unless special_roles?
21
28
 
22
- [dropdown_header("Roles")] + account_dropdown_role_items(&block)
29
+ [dropdown_header("Roles")] + account_dropdown_role_items
23
30
  end
24
31
 
25
32
  def account_dropdown_role_items
26
- Auth.current_roles.map { |role| block_given? ? yield(role) : [role] }
33
+ Auth.current_roles.map { |role| [role] }
27
34
  end
28
35
 
29
36
  def special_roles?
data/set/all/overlay.rb CHANGED
@@ -29,7 +29,7 @@ format :html do
29
29
  view :overlay_help_link, cache: :never, unknown: true do
30
30
  opts = help_popover_opts
31
31
  add_open_guide_opts opts
32
- overlay_menu_link "question-circle", opts
32
+ overlay_menu_link :help, opts
33
33
  end
34
34
 
35
35
  def add_open_guide_opts opts
@@ -44,7 +44,7 @@ format :html do
44
44
  end
45
45
 
46
46
  def slotify_overlay_link
47
- overlay_menu_link "external-link-square-alt", card: card
47
+ overlay_menu_link :new_window, card: card
48
48
  end
49
49
 
50
50
  def close_overlay_link
@@ -69,7 +69,7 @@ format :html do
69
69
 
70
70
  def overlay_menu_link icon, args={}
71
71
  add_class args, "border-light text-dark p-1 ms-1"
72
- button_link fa_icon(icon, class: "fa-lg"), args.merge(btn_type: "outline-secondary")
72
+ button_link icon_tag(icon), args.merge(btn_type: "outline-secondary")
73
73
  end
74
74
 
75
75
  def overlay_header title=nil
@@ -50,8 +50,9 @@ format :html do
50
50
 
51
51
  def checkbox_input
52
52
  card.ensure_roles
53
+ voo.show! :role_item_checkbox
53
54
  wrap_with :div, class: "pointer-checkbox-list" do
54
- account_dropdown(&method(:role_item_checkbox))
55
+ account_dropdown
55
56
  end
56
57
  end
57
58
 
@@ -60,4 +61,8 @@ format :html do
60
61
  checked: card.item_names.include?(role_name),
61
62
  option_name: role_name
62
63
  end
64
+
65
+ def account_dropdown_role_items
66
+ Auth.current_roles.map { |role| role_item_checkbox role }
67
+ end
63
68
  end
@@ -1,3 +1,3 @@
1
1
  def item_names _args={}
2
- Card.search(type: :layout) + Card::Layout.built_in_layouts
2
+ Card.search(type: :layout_type, return: :name) + Card::Layout.built_in_layouts
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-layout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.15.1.1
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: 2023-01-04 00:00:00.000000000 Z
13
+ date: 2023-03-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: card
@@ -18,56 +18,56 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.105.0
21
+ version: 1.105.1
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.105.0
28
+ version: 1.105.1
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: card-mod-account
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.15.0
35
+ version: 0.15.1.1
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.15.0
42
+ version: 0.15.1.1
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: card-mod-session
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.15.0
49
+ version: 0.15.1.1
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.15.0
56
+ version: 0.15.1.1
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: card-mod-tabs
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.15.0
63
+ version: 0.15.1.1
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.15.0
70
+ version: 0.15.1.1
71
71
  description: ''
72
72
  email:
73
73
  - info@decko.org
@@ -81,6 +81,8 @@ files:
81
81
  - assets/style/layout.scss
82
82
  - assets/style/modal.scss
83
83
  - assets/style/overlay.scss
84
+ - config/locales/de.yml
85
+ - config/locales/en.yml
84
86
  - data/files/mod_layout_script_asset_output/file.js
85
87
  - data/real.yml
86
88
  - data/test.yml
@@ -89,8 +91,6 @@ files:
89
91
  - lib/card/layout/code_layout.rb
90
92
  - lib/card/layout/proc_layout.rb
91
93
  - lib/card/layout/unknown_layout.rb
92
- - locales/de.yml
93
- - locales/en.yml
94
94
  - set/abstract/account_dropdown.rb
95
95
  - set/abstract/items.rb
96
96
  - set/abstract/list.rb
File without changes
File without changes