rails_admin_json_editor 0.0.19 → 0.0.20
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
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8e342d259bb8c313f2484df4f2625e6c387f309f
|
|
4
|
+
data.tar.gz: 5191e52b5f6ca29939a08f1bc90443653f68bbc1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 923974f6580d8dd9bb13a1b6ca860ccaa28b4d038ac1cbf1fe4a904e395f3a89738879e1e51b62e58293ab5e9847a22b0771744c1d629cef3986df6b38ad5d3e
|
|
7
|
+
data.tar.gz: ad7f24ce7e334880cd5019629783d7ca57ae65facfa0ecbfc3482d31a8f5515e568d8dc2e16b4fa22f7a1d6e573fd36a166eaeca3082bcf0989dd9f1224909d5
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
|
|
157
157
|
<ul class="dropdown-menu">
|
|
158
158
|
<li v-repeat="model: scheme.models">
|
|
159
|
-
<a href="#" v-on="click: addComponent($event, model)">{{ model.label }}</a>
|
|
159
|
+
<a href="#" v-if="!model.hide_in_root" v-on="click: addComponent($event, model)">{{ model.label }}</a>
|
|
160
160
|
</li>
|
|
161
161
|
</ul>
|
|
162
162
|
</div>
|
|
@@ -51,6 +51,7 @@ module RailsAdmin
|
|
|
51
51
|
class Model
|
|
52
52
|
attr_accessor :name, :fields
|
|
53
53
|
attr_accessor :label, :help
|
|
54
|
+
attr_accessor :hide_in_root
|
|
54
55
|
|
|
55
56
|
def initialize(model)
|
|
56
57
|
@name = JsonEditor.parse_model_name(model)
|
|
@@ -73,6 +74,10 @@ module RailsAdmin
|
|
|
73
74
|
def help(s = nil)
|
|
74
75
|
if s.nil? then return @help else @help = s end
|
|
75
76
|
end
|
|
77
|
+
|
|
78
|
+
def hide_in_root(b = nil)
|
|
79
|
+
if b.nil? then return @hide_in_root else @hide_in_root = b end
|
|
80
|
+
end
|
|
76
81
|
end
|
|
77
82
|
|
|
78
83
|
class Field
|