worker-field-nested_has_many 0.4.0 → 0.5.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: 15098b415d70ab23fe17257daf1fcf7dd9539c356899fcee522e960d435c3a8c
4
- data.tar.gz: 56fdb9468b552e1b788ecd85c2aa4279b3669a53ca13e433cdc53605058c5d1d
3
+ metadata.gz: 1392e45a0136c91988b442f216d40e14834e47c98135e2c6d2ae864c5cad45b6
4
+ data.tar.gz: f9078c36ae08e09e4eeccd52f2859b2310950158372b9a37b94bb7d31a68a3b8
5
5
  SHA512:
6
- metadata.gz: 6ee721323c1d225438cb2edd29569534ba3090ddec05f8b05d7b6cab54271fdff00da40369791124f3f3d8567b925ddfaa7f5558ee19d9a4806db35b6ddfddf3
7
- data.tar.gz: 9064fa5fadee7cc04ad14cb888248e9d66f55a77f2532c3338ba1333b50c3c99da76b3ca2fcd0e0167424c89ca075ae61388fe48f859708830cd3803f55b6fb8
6
+ metadata.gz: b53fbdba4c255ecee777572dd51e079e465efc28e5d5ab1deebec807a24a1bf7d9a68890cffe5a6ba9376609cc9c8b0dfb82d1c1a9d0cb8da647ef8da3fdf0f8
7
+ data.tar.gz: 358a12e90eaa78ccbf55f6b4eaba782c561d2a0ed98994fd066ddf680731e01f6c3118c85c2a5397ac03b850e85c95b903f2fa4422cd45b16f5235ad801a063d
@@ -35,7 +35,7 @@
35
35
  width: 43%;
36
36
  border: 1px solid #a8a8a83d;
37
37
  margin: 1rem;
38
- padding: 1rem 1rem 4rem 1rem;
38
+ padding: 1rem 1rem 1rem 1rem;
39
39
  display: flex;
40
40
  flex-direction: column;
41
41
  justify-content: space-between;
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- <% if request.env["PATH_INFO"] == "/admin/quotations/new" || "/admin/quotations/edit"%>
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-flex">
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
- <%= link_to_add_association(
18
- I18n.t("administrate.fields.nested_has_many.add", resource: field.associated_class_name.titleize),
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.4.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.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-08 00:00:00.000000000 Z
11
+ date: 2019-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: administrate