viniBaxter-spa-nested_has_many 2.0.0 → 3.0.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3f0681883855d076314d1abf5c0f7d58a09964b64084e0d4fcb97e0983ddd7e0
|
|
4
|
+
data.tar.gz: 22b48b33944d5632503d980a12c938457df237645469e9f2077039be395cb816
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 325ed2793bf85e0f51f56cade39cd088ebcaef8a76d4b65c24971c7d3e8ab219578121f93e3b5160b65ac5f65ac0afa066ac58aa10e8b90ca768f95000a709d2
|
|
7
|
+
data.tar.gz: d79b6fb66eecc9daab6e58ae1e550758e9a014008693872905f76cc6ce481a06f41651e50ce923f6260ffd5ffb245a4d4275d0be2928e7683f9cd7ebe7754edd
|
|
@@ -1,9 +1,37 @@
|
|
|
1
|
-
<div class="nested-fields">
|
|
2
|
-
<% field.nested_fields_for_builder(f).each do |attribute| -%>
|
|
3
|
-
<div class="field-unit field-unit--<%= attribute.html_class %>">
|
|
4
|
-
<%= render_field attribute, f: f %>
|
|
5
|
-
</div>
|
|
6
|
-
<% end -%>
|
|
7
1
|
|
|
8
|
-
|
|
2
|
+
|
|
3
|
+
<div class="nested-fields nested-fields_<%= field.attribute %>">
|
|
4
|
+
<div class="card light-shadow">
|
|
5
|
+
<div class="card-body">
|
|
6
|
+
|
|
7
|
+
<% if giveArrayOfNonDateForm(field,f).any? %>
|
|
8
|
+
<% giveArrayOfNonDateForm(field,f).each do |attribute| -%>
|
|
9
|
+
<div class="form-group field-unit field-unit--<%= attribute.html_class %>">
|
|
10
|
+
<%= render_field attribute, f: f %>
|
|
11
|
+
</div>
|
|
12
|
+
<% end -%>
|
|
13
|
+
<%end %>
|
|
14
|
+
<% if giveArrayOfDateForm(field,f).any? %>
|
|
15
|
+
<div class="row">
|
|
16
|
+
<% giveArrayOfDateForm(field,f).each do |attribute| -%>
|
|
17
|
+
<div class="col-12 col-md-6">
|
|
18
|
+
<div class="form-group field-unit field-unit--<%= attribute.html_class %>">
|
|
19
|
+
<%= render_field attribute, f: f %>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<% end -%>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<%end %>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
<%= link_to_remove_association( I18n.t(
|
|
29
|
+
"administrate.fields.nested_has_many.remove", resource: field.associated_class_name.titleize).html_safe,
|
|
30
|
+
f,
|
|
31
|
+
class: 'btn btn-outline-danger mb-2 mt-3'
|
|
32
|
+
)%>
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
9
37
|
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
<div class="nested-fields nested-fields_<%= field.attribute %>">
|
|
4
|
+
<div class="card light-shadow">
|
|
5
|
+
<div class="card-body">
|
|
6
|
+
|
|
7
|
+
<% field.nested_fields_for_builder(f).each do |attribute| -%>
|
|
8
|
+
<div class="form-group field-unit field-unit--<%= attribute.html_class %>">
|
|
9
|
+
<%= render_field attribute, f: f %>
|
|
10
|
+
</div>
|
|
11
|
+
<% end -%>
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
<%= link_to_remove_association( I18n.t(
|
|
16
|
+
"administrate.fields.nested_has_many.remove", resource: field.associated_class_name.titleize).html_safe,
|
|
17
|
+
f,
|
|
18
|
+
class: 'btn btn-outline-danger mb-2 mt-3'
|
|
19
|
+
)%>
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
<fieldset
|
|
1
|
+
<fieldset
|
|
2
|
+
class="field-unit--nested field-unit--nested_<%= field.attribute %>"
|
|
3
|
+
data="field-unit--nested_<%= field.attribute %>">
|
|
2
4
|
<legend><%= f.label field.attribute %></legend>
|
|
3
5
|
<%= f.fields_for field.association_name do |nested_form| %>
|
|
4
6
|
<%= render(
|
|
@@ -10,14 +12,16 @@
|
|
|
10
12
|
) %>
|
|
11
13
|
<% end %>
|
|
12
14
|
|
|
15
|
+
|
|
16
|
+
|
|
13
17
|
<div>
|
|
14
18
|
<%= link_to_add_association(
|
|
15
|
-
I18n.t("administrate.fields.nested_has_many.add", resource: field.associated_class_name.titleize),
|
|
19
|
+
I18n.t("administrate.fields.nested_has_many.add", resource: field.associated_class_name.titleize).html_safe,
|
|
16
20
|
f,
|
|
17
21
|
field.association_name,
|
|
18
|
-
class: '
|
|
22
|
+
class: 'btn btn-outline-primary mb-2',
|
|
19
23
|
partial: "fields/nested_has_many/fields",
|
|
20
|
-
render_options: { locals: { field: field
|
|
24
|
+
render_options: { locals: { field: field} },
|
|
21
25
|
) %>
|
|
22
26
|
</div>
|
|
23
27
|
</fieldset>
|
|
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |gem|
|
|
4
4
|
gem.name = "viniBaxter-spa-nested_has_many"
|
|
5
|
-
gem.version = "
|
|
5
|
+
gem.version = "3.0.0"
|
|
6
6
|
gem.authors = ["Nick Charlton", "Grayson Wright"]
|
|
7
7
|
gem.email = ["vinybaxter@gmail.com"]
|
|
8
8
|
# gem.homepage = "https://github.com/nickcharlton/" \
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: viniBaxter-spa-nested_has_many
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 3.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nick Charlton
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2020-04-
|
|
12
|
+
date: 2020-04-30 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: administrate
|
|
@@ -183,6 +183,7 @@ files:
|
|
|
183
183
|
- app/assets/stylesheets/administrate-field-nested_has_many/application.css
|
|
184
184
|
- app/assets/stylesheets/administrate-field-nested_has_many/base.scss
|
|
185
185
|
- app/views/fields/nested_has_many/_fields.html.erb
|
|
186
|
+
- app/views/fields/nested_has_many/_fields_backUp.html.erb
|
|
186
187
|
- app/views/fields/nested_has_many/_form.html.erb
|
|
187
188
|
- app/views/fields/nested_has_many/_index.html.erb
|
|
188
189
|
- app/views/fields/nested_has_many/_show.html.erb
|