card-mod-layout 0.13.0 → 0.13.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: d118944f69f6a156c860975de73cbe54494323ab843314c0a5a5f0be5f67a012
4
- data.tar.gz: 2c909ce53adeb835030a51758871c039761a8f95a46835799df9aeff2d7702bf
3
+ metadata.gz: b79ba221bbfe29b368db0957bb24f7fe5245c2d30fb5d651929a7c5fc2eadefc
4
+ data.tar.gz: 2d85972536746977ad3a21855a2ac8ab1ef6332f27978b17853098ef3c02639b
5
5
  SHA512:
6
- metadata.gz: 5933463490d623052bbad3be8303aab698ae452cc6e2dd9a1e489be1710b944a980c17640db524725c8f3773cb0fefd24a4cf4733b81f08cbb72185840569e59
7
- data.tar.gz: 80a450d7a1ab2b13a5f2e3c5b25b4161fc0f0a2d0682c670f8f17d608cf77afe082c2abf378be35be5582222446c90daab0eab26247424d3eb980e578f20a0a2
6
+ metadata.gz: '083328ffb3ab5571fceb0f542989ae0649ca0585351b6e4c2eb766ee3f06d5fc92e31969afe26ab1b57f667acbc502adb7ae163540a4b5665a3c2ae64a41a354'
7
+ data.tar.gz: c1868dc0d5fc746c422bd3a15be174b0410d25313c289c79fc0684a28c99a39f07df7aee11d014733b1fb1d21a7bf44c6a38fba637a8b68216c42747ec202f92
data/locales/en.yml ADDED
@@ -0,0 +1,4 @@
1
+ en:
2
+ layout_available_layouts: "Available Layouts: %{available_layouts}"
3
+ layout_unknown_layout: "Unknown layout: %{name}"
4
+ legacy_toc: Table of Contents
data/set/all/layouts.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  format :html do
2
- attr_reader :interior
2
+ delegate :interior, to: :voo
3
3
 
4
4
  def layout_nest
5
5
  wrap_main { interior }
data/set/all/overlay.rb CHANGED
@@ -4,7 +4,7 @@ format :html do
4
4
  type: "button" }.freeze
5
5
 
6
6
  wrapper :overlay do |opts|
7
- class_up "card-slot", "_overlay d0-card-overlay bg-body"
7
+ class_up "card-slot", "_overlay d0-card-overlay bg-body", :single_use
8
8
  @content_body = true
9
9
  voo.hide! :menu
10
10
  overlay_frame true, overlay_header(opts[:title]), opts[:slot] do
@@ -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", card: card
47
+ overlay_menu_link "external-link-square-alt", card: card
48
48
  end
49
49
 
50
50
  def close_overlay_link
@@ -6,26 +6,36 @@ format :html do
6
6
 
7
7
  def show_with_page_layout view, args
8
8
  main!
9
+ layout = page_layout view
9
10
  args = main_render_args view, args
10
- if explicit_modal_wrapper?(view) && page_layout.to_sym != :modal
11
+ if explicit_modal_wrapper?(view) && layout.to_sym != :modal
11
12
  render_outside_of_layout view, args
12
13
  else
13
- render_with_layout view, page_layout, args
14
+ render_with_layout view, layout, args
14
15
  end
15
16
  end
16
17
 
17
- def page_layout
18
- params[:layout] || layout_name_from_rule || :default
18
+ def page_layout view
19
+ params[:layout] || layout_for_view(view) || layout_name_from_rule || :default
20
+ end
21
+
22
+ # for override
23
+ def layout_for_view _view
24
+ nil
19
25
  end
20
26
 
21
27
  def render_with_layout view, layout, args={}
22
28
  view_opts = Layout.main_nest_opts(layout, self)
23
- view ||= view_opts.delete(:view) || default_nest_view
29
+ view ||= view_opts.delete(:view) || default_page_view
24
30
  view_opts[:home_view] = view
25
31
  view_opts[:layout] = layout
26
32
  render! view, view_opts.reverse_merge(args)
27
33
  end
28
34
 
35
+ def default_page_view
36
+ default_nest_view
37
+ end
38
+
29
39
  def show_layout?
30
40
  !Env.ajax? || params[:layout]
31
41
  end
@@ -50,7 +60,7 @@ format :html do
50
60
  end
51
61
 
52
62
  def render_outside_of_layout view, args
53
- body = render_with_layout nil, page_layout, {}
63
+ body = render_with_layout nil, page_layout(view), {}
54
64
  body_with_modal body, render!(view, args)
55
65
  end
56
66
 
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.13.0
4
+ version: 0.13.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-08-06 00:00:00.000000000 Z
13
+ date: 2021-09-24 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.103.0
21
+ version: 1.103.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.103.0
28
+ version: 1.103.4
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.13.0
35
+ version: 0.13.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.13.0
42
+ version: 0.13.4
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.13.0
49
+ version: 0.13.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.13.0
56
+ version: 0.13.4
57
57
  description: ''
58
58
  email:
59
59
  - info@decko.org
@@ -66,6 +66,7 @@ files:
66
66
  - lib/card/layout/code_layout.rb
67
67
  - lib/card/layout/proc_layout.rb
68
68
  - lib/card/layout/unknown_layout.rb
69
+ - locales/en.yml
69
70
  - set/abstract/account_dropdown.rb
70
71
  - set/abstract/pointer/html_views.rb
71
72
  - set/all/alert.rb