worker-field-nested_has_many 0.4.0 → 0.5.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1392e45a0136c91988b442f216d40e14834e47c98135e2c6d2ae864c5cad45b6
|
4
|
+
data.tar.gz: f9078c36ae08e09e4eeccd52f2859b2310950158372b9a37b94bb7d31a68a3b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b53fbdba4c255ecee777572dd51e079e465efc28e5d5ab1deebec807a24a1bf7d9a68890cffe5a6ba9376609cc9c8b0dfb82d1c1a9d0cb8da647ef8da3fdf0f8
|
7
|
+
data.tar.gz: 358a12e90eaa78ccbf55f6b4eaba782c561d2a0ed98994fd066ddf680731e01f6c3118c85c2a5397ac03b850e85c95b903f2fa4422cd45b16f5235ad801a063d
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
|
3
|
-
<% if request.env["PATH_INFO"] == "/admin/quotations/new" || "/admin/quotations
|
3
|
+
<% if request.env["PATH_INFO"] == "/admin/quotations/new" || "/admin/quotations" %>
|
4
4
|
<div class="nested-fields <%= field.attribute %>"><%# #todo %>
|
5
5
|
<div class="<%= field.attribute.to_s.singularize %>_container <%= field.attribute %>"><%# #todo %>
|
6
6
|
<% field.nested_fields_for_builder(f).each do |attribute| -%>
|
@@ -44,7 +44,7 @@
|
|
44
44
|
</div>
|
45
45
|
<% end %>
|
46
46
|
<!-- <a href='#' id='executer-button' class='btn btn-default'>Executer</a> -->
|
47
|
-
<div class="button remove-field">
|
47
|
+
<div class="button remove-field remove_field_<%= field.attribute %>">
|
48
48
|
<%= link_to_remove_association I18n.t("administrate.fields.nested_has_many.remove", resource: field.associated_class_name.titleize), f %>
|
49
49
|
|
50
50
|
</div>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% if request.env["PATH_INFO"] == "/admin/quotations/new" || "/admin/quotations/edit"%>
|
3
3
|
|
4
4
|
<fieldset class="field-unit--nested fieldset_<%= field.attribute %>">
|
5
|
-
<div class="container-
|
5
|
+
<div class="container-flex_<%= field.attribute %>">
|
6
6
|
<!-- <legend><%= f.label field.attribute %></legend> -->
|
7
7
|
<%= f.fields_for field.association_name do |nested_form| %>
|
8
8
|
<%= render(
|
@@ -13,9 +13,10 @@
|
|
13
13
|
},
|
14
14
|
) %>
|
15
15
|
<% end %>
|
16
|
-
<div class = "add_has_many">
|
17
|
-
|
18
|
-
|
16
|
+
<div class = "add_has_many div_button_add_<%= field.attribute %>">
|
17
|
+
<% if field.attribute.to_s == "line_items"%>
|
18
|
+
<%= link_to_add_association(
|
19
|
+
('<i class="fab fa-slack-hash"></i>').html_safe,
|
19
20
|
f,
|
20
21
|
field.association_name,
|
21
22
|
class: "button toto button_add_associated_#{field.associated_class_name}",
|
@@ -24,7 +25,21 @@
|
|
24
25
|
# id: "button_add_associated_#{field.associated_class_name}",
|
25
26
|
partial: "fields/nested_has_many/fields",
|
26
27
|
render_options: { locals: { field: field } },
|
27
|
-
|
28
|
+
) %>
|
29
|
+
<% end %>
|
30
|
+
<% if field.attribute.to_s == "working_zones"%>
|
31
|
+
<%= link_to_add_association(
|
32
|
+
('<i class="fas fa-home"></i>').html_safe,
|
33
|
+
f,
|
34
|
+
field.association_name,
|
35
|
+
class: "button toto button_add_associated_#{field.associated_class_name}",
|
36
|
+
# class: "button toto button_add_associated_#{field.associated_class_name}",
|
37
|
+
# # id usefull for the JS inside New quotation
|
38
|
+
# id: "button_add_associated_#{field.associated_class_name}",
|
39
|
+
partial: "fields/nested_has_many/fields",
|
40
|
+
render_options: { locals: { field: field } },
|
41
|
+
) %>
|
42
|
+
<% end %>
|
28
43
|
</div>
|
29
44
|
</div>
|
30
45
|
</fieldset>
|
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "worker-field-nested_has_many"
|
5
5
|
# gem.version = Worker::Field::NestedHasMany::VERSION
|
6
|
-
gem.version = "0.
|
6
|
+
gem.version = "0.5.0"
|
7
7
|
gem.authors = ["v baxter"]
|
8
8
|
gem.email = ["vincent.viricel@gmail.com"]
|
9
9
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: worker-field-nested_has_many
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- v baxter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: administrate
|