gestart-admino 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/gestart-admino.gemspec +1 -1
- data/lib/gestart_admino/query/base_presenter.rb +2 -2
- data/lib/gestart_admino/query/filter_group_presenter.rb +4 -4
- data/lib/gestart_admino/query/scope_presenter.rb +2 -2
- data/lib/gestart_admino/query/sorting_presenter.rb +3 -3
- data/lib/gestart_admino/table/head_row.rb +2 -2
- data/lib/gestart_admino/table/presenter.rb +3 -3
- data/lib/gestart_admino/table/resource_row.rb +3 -3
- data/lib/gestart_admino/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 576292443287e49e641f58374a71998a7b22f495bf55aeb4e002d6ad1afeba04
|
|
4
|
+
data.tar.gz: 3fa6cc8fe5fa209113b26f656600eaa49072fb6ea66946daa4f900881ee00691
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 161818d2fc869089fa7c6fb9ea4ffe16f9aa51a91a364484fdce686541dfdad3b8b41a7b9362a3615c9d1a3145324f4ba40fe66676f176dbb3523a3489cc1a8e
|
|
7
|
+
data.tar.gz: 32d718e86ffee8943eef0f6e55a8a709ae8ec5908c026f1ff4e1d76e8acf815f61864cb7548d514c6d1976fc2115d46cc9c3bd36ee558332b7b05a74b9fb99db
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
# v2.1.0 — off showcase, onto gestart-showcase
|
|
2
|
+
|
|
3
|
+
The `showcase` dependency becomes `gestart-showcase ~> 1.0`, and the eight files
|
|
4
|
+
that named `Showcase::` now name `GestartShowcase::`. With this, no third-party
|
|
5
|
+
code is left in the rendering path of a Gestart index page.
|
|
6
|
+
|
|
7
|
+
No behaviour change: `gestart-showcase` 1.0.0 is the same presenter
|
|
8
|
+
implementation, pruned of what nobody calls.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
1
12
|
# v2.0.0 — the namespace
|
|
2
13
|
|
|
3
14
|
**Breaking.** The namespace goes from `Admino::` to `GestartAdmino::`, and the
|
data/gestart-admino.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require 'i18n'
|
|
2
|
-
require '
|
|
3
|
-
require '
|
|
2
|
+
require 'gestart_showcase'
|
|
3
|
+
require 'gestart_showcase/helpers/html_options'
|
|
4
4
|
require 'active_support/core_ext/object/deep_dup'
|
|
5
5
|
require 'active_support/core_ext/array/extract_options'
|
|
6
6
|
require 'active_support/hash_with_indifferent_access'
|
|
@@ -8,14 +8,14 @@ require 'active_support/core_ext/hash'
|
|
|
8
8
|
|
|
9
9
|
module GestartAdmino
|
|
10
10
|
module Query
|
|
11
|
-
class FilterGroupPresenter <
|
|
11
|
+
class FilterGroupPresenter < GestartShowcase::Presenter
|
|
12
12
|
def scope_link(scope, *args)
|
|
13
13
|
options = args.extract_options!
|
|
14
14
|
|
|
15
15
|
label = args.first || scope_name(scope)
|
|
16
16
|
|
|
17
17
|
active_class = options.delete(:active_class) { 'is-active' }
|
|
18
|
-
options =
|
|
18
|
+
options = GestartShowcase::Helpers::HtmlOptions.new(options)
|
|
19
19
|
|
|
20
20
|
if is_scope_active?(scope)
|
|
21
21
|
options.add_class!(active_class)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
require '
|
|
1
|
+
require 'gestart_showcase'
|
|
2
2
|
|
|
3
3
|
module GestartAdmino
|
|
4
4
|
module Query
|
|
5
|
-
class ScopePresenter <
|
|
5
|
+
class ScopePresenter < GestartShowcase::Presenter
|
|
6
6
|
def initialize(object, parent, view_context)
|
|
7
7
|
super(object, view_context)
|
|
8
8
|
@parent = parent
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
require '
|
|
1
|
+
require 'gestart_showcase'
|
|
2
2
|
require 'active_support/core_ext/object/deep_dup'
|
|
3
3
|
|
|
4
4
|
module GestartAdmino
|
|
5
5
|
module Query
|
|
6
|
-
class SortingPresenter <
|
|
6
|
+
class SortingPresenter < GestartShowcase::Presenter
|
|
7
7
|
def scope_link(scope, *args)
|
|
8
8
|
options = args.extract_options!
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ module GestartAdmino
|
|
|
12
12
|
desc_class = options.delete(:desc_class) { 'is-desc' }
|
|
13
13
|
asc_class = options.delete(:asc_class) { 'is-asc' }
|
|
14
14
|
|
|
15
|
-
options =
|
|
15
|
+
options = GestartShowcase::Helpers::HtmlOptions.new(options)
|
|
16
16
|
|
|
17
17
|
if is_scope_active?(scope)
|
|
18
18
|
options.add_class!(ascending? ? asc_class : desc_class)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require 'gestart_admino/table/row'
|
|
2
|
-
require '
|
|
2
|
+
require 'gestart_showcase/helpers/html_options'
|
|
3
3
|
|
|
4
4
|
module GestartAdmino
|
|
5
5
|
module Table
|
|
@@ -72,7 +72,7 @@ module GestartAdmino
|
|
|
72
72
|
end
|
|
73
73
|
|
|
74
74
|
default_options = column_html_options(attribute_name)
|
|
75
|
-
html_options =
|
|
75
|
+
html_options = GestartShowcase::Helpers::HtmlOptions.new(default_options)
|
|
76
76
|
html_options.merge_attrs!(final_html_options)
|
|
77
77
|
html_options = html_options.to_h
|
|
78
78
|
end
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
require '
|
|
1
|
+
require 'gestart_showcase'
|
|
2
2
|
require 'gestart_admino/table/head_row'
|
|
3
3
|
require 'gestart_admino/table/resource_row'
|
|
4
4
|
|
|
5
5
|
module GestartAdmino
|
|
6
6
|
module Table
|
|
7
|
-
class Presenter <
|
|
7
|
+
class Presenter < GestartShowcase::Presenter
|
|
8
8
|
attr_reader :collection_klass
|
|
9
9
|
attr_reader :query
|
|
10
10
|
|
|
@@ -15,7 +15,7 @@ module GestartAdmino
|
|
|
15
15
|
options = args.extract_options!
|
|
16
16
|
if respond_to?(options_method, true)
|
|
17
17
|
default_options = send(options_method, *args)
|
|
18
|
-
html_options =
|
|
18
|
+
html_options = GestartShowcase::Helpers::HtmlOptions.new(default_options)
|
|
19
19
|
html_options.merge_attrs!(options)
|
|
20
20
|
options = html_options.to_h
|
|
21
21
|
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require 'gestart_admino/table/row'
|
|
2
|
-
require '
|
|
2
|
+
require 'gestart_showcase/helpers/html_options'
|
|
3
3
|
|
|
4
4
|
module GestartAdmino
|
|
5
5
|
module Table
|
|
@@ -94,7 +94,7 @@ module GestartAdmino
|
|
|
94
94
|
def complete_action_html_options(action_name, final_html_options)
|
|
95
95
|
if action_name
|
|
96
96
|
default_options = action_html_options(action_name)
|
|
97
|
-
html_options =
|
|
97
|
+
html_options = GestartShowcase::Helpers::HtmlOptions.new(default_options)
|
|
98
98
|
|
|
99
99
|
action_html_options_method = "#{action_name}_action_html_options"
|
|
100
100
|
if respond_to?(action_html_options_method, true)
|
|
@@ -111,7 +111,7 @@ module GestartAdmino
|
|
|
111
111
|
def complete_column_html_options(attribute_name, final_html_options)
|
|
112
112
|
if attribute_name
|
|
113
113
|
default_options = column_html_options(attribute_name)
|
|
114
|
-
html_options =
|
|
114
|
+
html_options = GestartShowcase::Helpers::HtmlOptions.new(default_options)
|
|
115
115
|
html_options.merge_attrs!(final_html_options)
|
|
116
116
|
html_options.to_h
|
|
117
117
|
else
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gestart-admino
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gestart Cloud S.r.l.
|
|
@@ -11,19 +11,19 @@ cert_chain: []
|
|
|
11
11
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name: showcase
|
|
14
|
+
name: gestart-showcase
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0
|
|
19
|
+
version: '1.0'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 0
|
|
26
|
+
version: '1.0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: activesupport
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|