cmor_core_frontend 0.0.27.pre → 0.0.28.pre
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 67a5937b9b18af0dc90bc4f203b2f7b0dce6055fbaa222572ecce3b8eb11d057
|
|
4
|
+
data.tar.gz: 707a734e5470fb3d792777466616a20bc6ac821b5cbb8252c92472c0676bb49f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96bb1c40699474b8036c41c51742a6e0a79ae00f8ac722cdc225dbe4d7bee6b7d5fb93681c9173400a1416b10d86121fef92860b824858b83b783a06818dfb7e
|
|
7
|
+
data.tar.gz: b2e0b3eea580e8ac168c7fff869aa7b1b413067c9a8686aa104a0ab5870116ceb2c8de3fdab238b55251e6ad21f25fbe4731ab54db86c6470f41d70ffb7bea60
|
|
@@ -30,6 +30,9 @@ module Cmor
|
|
|
30
30
|
|
|
31
31
|
# Are we inside a resources controller?
|
|
32
32
|
if c.controller.class.respond_to?(:resource_class)
|
|
33
|
+
# Add a text breadcrumb for the current engine
|
|
34
|
+
b.push(breadcrumb_for_current_engine)
|
|
35
|
+
|
|
33
36
|
# Add a breadrumb for collection page
|
|
34
37
|
b.push(Breadcrumb.new(label: c.controller.class.resource_class.model_name.human(count: :other), url: c.url_for(action: :index, page: nil)))
|
|
35
38
|
|
|
@@ -51,11 +54,40 @@ module Cmor
|
|
|
51
54
|
end
|
|
52
55
|
end
|
|
53
56
|
end
|
|
57
|
+
|
|
58
|
+
# Are we inside a service controller?
|
|
59
|
+
if c.controller.class.respond_to?(:service_class)
|
|
60
|
+
# Add a text breadcrumb for the engine
|
|
61
|
+
b.push(breadcrumb_for_current_engine)
|
|
62
|
+
|
|
63
|
+
# Add a text breadcrumb for the service name
|
|
64
|
+
b.push(Breadcrumb.new(label: c.controller.class.service_class.model_name.human))
|
|
65
|
+
end
|
|
54
66
|
end
|
|
55
67
|
breadcrumbs.last.url = nil
|
|
56
68
|
render breadcrumbs: breadcrumbs
|
|
57
69
|
end
|
|
58
70
|
|
|
71
|
+
private
|
|
72
|
+
|
|
73
|
+
def breadcrumb_for_current_engine
|
|
74
|
+
return if current_engine.nil?
|
|
75
|
+
breadcrumb_for_engine(current_engine)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def breadcrumb_for_engine(engine)
|
|
79
|
+
Breadcrumb.new(label: I18n.t("classes.#{engine.name.underscore}"))
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def current_engine
|
|
83
|
+
klass_name_parts = c.controller.class.name.split("::")
|
|
84
|
+
klass_name_parts.size.downto(1).each do |i|
|
|
85
|
+
if klass_name_parts.take(i).join("::").constantize.const_defined?("Engine")
|
|
86
|
+
break [klass_name_parts.take(i), ['Engine']].flatten.join("::").constantize
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
59
91
|
def t(identifier, options = {})
|
|
60
92
|
if identifier.start_with?('.')
|
|
61
93
|
prefix = self.class.name.underscore
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cmor_core_frontend
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.28.pre
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Roberto Vasquez Angel
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-07-
|
|
11
|
+
date: 2019-07-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - '='
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 0.0.
|
|
33
|
+
version: 0.0.28.pre
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - '='
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 0.0.
|
|
40
|
+
version: 0.0.28.pre
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: sqlite3
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -414,7 +414,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
414
414
|
- !ruby/object:Gem::Version
|
|
415
415
|
version: 1.3.1
|
|
416
416
|
requirements: []
|
|
417
|
-
rubygems_version: 3.0.
|
|
417
|
+
rubygems_version: 3.0.4
|
|
418
418
|
signing_key:
|
|
419
419
|
specification_version: 4
|
|
420
420
|
summary: Cmor::Core::Frontend.
|