worker-field-nested_has_many 0.5.0 → 0.6.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: 1392e45a0136c91988b442f216d40e14834e47c98135e2c6d2ae864c5cad45b6
4
- data.tar.gz: f9078c36ae08e09e4eeccd52f2859b2310950158372b9a37b94bb7d31a68a3b8
3
+ metadata.gz: fcebcaab2d6bba5aed9d01b2d969d719fe763ac89afff311da9a0a32282039e3
4
+ data.tar.gz: 18a119afb6baeb980b9193fa716c45e509b818ae8448fee3290dc9fbbeac5b4f
5
5
  SHA512:
6
- metadata.gz: b53fbdba4c255ecee777572dd51e079e465efc28e5d5ab1deebec807a24a1bf7d9a68890cffe5a6ba9376609cc9c8b0dfb82d1c1a9d0cb8da647ef8da3fdf0f8
7
- data.tar.gz: 358a12e90eaa78ccbf55f6b4eaba782c561d2a0ed98994fd066ddf680731e01f6c3118c85c2a5397ac03b850e85c95b903f2fa4422cd45b16f5235ad801a063d
6
+ metadata.gz: 3ed88cb0a35953bbef1611719f3a94888aef0a66e8b38b4201416f8947392babb9ef0aaf98444e7bb511321c3b34a3172be3f88e753ba84c9064778003e14786
7
+ data.tar.gz: 99ec4dd63fdb074af50b36a04e4cd1f98c990891437fa1dac8251c6902339dbea5aeee560577632115086ff7f15996f839e7846a60e3090b4a3aac203937bbc9
@@ -6,11 +6,28 @@
6
6
 
7
7
  }
8
8
  .add_has_many{
9
+ // position: absolute;
10
+ // bottom: 0;
11
+ // right: 0;
12
+ // margin-bottom: 1rem;
13
+ }
14
+ // POSITION button
15
+
16
+ .add_has_many.div_button_add_line_items{
17
+ position: absolute;
18
+ bottom: -50px;
19
+ }
20
+ .add_has_many.div_button_add_working_zones{
9
21
  position: absolute;
10
- bottom: 0;
11
- right: 0;
12
- margin-bottom: 1rem;
22
+ bottom: 0px;
23
+ left: -30px;
24
+ }
25
+ div#button_remove_associated_WorkingZone {
26
+ position: absolute;
27
+ bottom: 0px;
28
+ left: 110px;
13
29
  }
30
+
14
31
  .field-unit--nested{
15
32
  width: 100%;
16
33
  min-height: 100px;
@@ -34,6 +51,7 @@
34
51
  @include administrate-clearfix;
35
52
  width: 43%;
36
53
  border: 1px solid #a8a8a83d;
54
+ border-radius: 6px;
37
55
  margin: 1rem;
38
56
  padding: 1rem 1rem 1rem 1rem;
39
57
  display: flex;
@@ -48,6 +66,9 @@
48
66
  &.line_items{
49
67
  position: relative;
50
68
  min-height: 580px;
69
+ padding: 0.7rem;
70
+ margin: 0.2rem 0.5rem;
71
+ width: 46%;
51
72
  }
52
73
  }
53
74
 
@@ -1,51 +1,33 @@
1
1
 
2
2
 
3
3
  <% if request.env["PATH_INFO"] == "/admin/quotations/new" || "/admin/quotations" %>
4
- <div class="nested-fields <%= field.attribute %>"><%# #todo %>
5
- <div class="<%= field.attribute.to_s.singularize %>_container <%= field.attribute %>"><%# #todo %>
4
+ <div class="nested-fields <%= field.attribute %>">
5
+ <div class="<%= field.attribute.to_s.singularize %>_container <%= field.attribute %>">
6
6
  <% field.nested_fields_for_builder(f).each do |attribute| -%>
7
- <% if attribute.html_class.to_s != "boolean"%>
8
- <div class="field-unit field-unit--<%= attribute.html_class %>">
9
- <%= render_field attribute, f: f %>
10
- </div>
11
- <% else %>
12
- <%= render_field attribute, f: f %>
13
- <% end -%>
7
+ <% if attribute.html_class.to_s != "boolean"%>
8
+ <div class="field-unit field-unit--<%= attribute.html_class %>">
9
+ <%= render_field attribute, f: f %>
10
+ </div>
11
+ <% else %>
12
+ <%= render_field attribute, f: f %>
13
+ <% end -%>
14
14
  <% end -%>
15
15
 
16
16
  </div>
17
- <!-- <div class="button remove-field button remove-field__option_buton">
18
- <%#= link_to(
19
- t("add option"),
20
- [:showproductoption,
21
- # order_number: "toto",
22
- # quotation_id: "#{page.resource.id}",
23
- # user_id: "#{page.resource.user_id}"
24
- ],
25
- remote: :true,
26
- :'data-dismiss' => "modal",
27
- :'data-toggle' => "modal",
28
- :'data-target' => "#exampleModal",
29
- # method: :get,
30
- ) %>
31
-
32
- </div> -->
33
- <!-- <div class="button remove-field button remove-field__option_buton" >
34
- <%#= link_to showproductoption_path, remote: true,:'data-dismiss' =>'modal', :'data-toggle' => 'modal', :'data-target' => '#exampleModal' do%>
35
- <div class="specialite">réseau</div>
36
- <%# end %>
37
- </div> -->
38
17
  <div class="lineItem_button_action">
39
18
  <div class="sophieTolouba_<%= field.attribute.to_s %>">
40
19
  <% if field.attribute.to_s == "line_items"%>
41
20
  <div class="button remove-field__option_buton executer-button" >
42
21
  <span>Ajouter des options</span>
43
- <!-- <div class="specialite">Ajouter des options</div> -->
44
22
  </div>
45
23
  <% end %>
46
- <!-- <a href='#' id='executer-button' class='btn btn-default'>Executer</a> -->
47
- <div class="button remove-field remove_field_<%= field.attribute %>">
48
- <%= link_to_remove_association I18n.t("administrate.fields.nested_has_many.remove", resource: field.associated_class_name.titleize), f %>
24
+ <div class="btn-warning button remove-field remove_field_<%= field.attribute %>" id= "button_remove_associated_<%=field.associated_class_name%>">
25
+ <% if field.attribute.to_s == "working_zones"%>
26
+ <%= link_to_remove_association ('remove''<i class="ml-3 tim-icons icon-settings"></i>').html_safe, f %>
27
+ <% end %>
28
+ <% if field.attribute.to_s == "line_items"%>
29
+ <%= link_to_remove_association ('remove''<i class="ml-3 tim-icons icon-app"></i>').html_safe, f %>
30
+ <% end %>
49
31
 
50
32
  </div>
51
33
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  <% if request.env["PATH_INFO"] == "/admin/quotations/new" || "/admin/quotations/edit"%>
3
-
3
+ <!-- for quotation view -->
4
4
  <fieldset class="field-unit--nested fieldset_<%= field.attribute %>">
5
5
  <div class="container-flex_<%= field.attribute %>">
6
6
  <!-- <legend><%= f.label field.attribute %></legend> -->
@@ -16,11 +16,11 @@
16
16
  <div class = "add_has_many div_button_add_<%= field.attribute %>">
17
17
  <% if field.attribute.to_s == "line_items"%>
18
18
  <%= link_to_add_association(
19
- ('<i class="fab fa-slack-hash"></i>').html_safe,
19
+ ('ajouter' '<i class="ml-3 tim-icons icon-app"></i>').html_safe,
20
20
  f,
21
21
  field.association_name,
22
- class: "button toto button_add_associated_#{field.associated_class_name}",
23
- # class: "button toto button_add_associated_#{field.associated_class_name}",
22
+ class: "button btn-rework button_add_associated_#{field.associated_class_name}",
23
+ # class: "button button_add_associated_#{field.associated_class_name}",
24
24
  # # id usefull for the JS inside New quotation
25
25
  # id: "button_add_associated_#{field.associated_class_name}",
26
26
  partial: "fields/nested_has_many/fields",
@@ -29,11 +29,11 @@
29
29
  <% end %>
30
30
  <% if field.attribute.to_s == "working_zones"%>
31
31
  <%= link_to_add_association(
32
- ('<i class="fas fa-home"></i>').html_safe,
32
+ ('ajouter''<i class="ml-3 tim-icons icon-settings"></i>').html_safe,
33
33
  f,
34
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}",
35
+ class: "btn-rework button button_add_associated_#{field.associated_class_name}",
36
+ # class: "button button_add_associated_#{field.associated_class_name}",
37
37
  # # id usefull for the JS inside New quotation
38
38
  # id: "button_add_associated_#{field.associated_class_name}",
39
39
  partial: "fields/nested_has_many/fields",
@@ -42,9 +42,11 @@
42
42
  <% end %>
43
43
  </div>
44
44
  </div>
45
+
45
46
  </fieldset>
46
47
 
47
48
  <% else %>
49
+ <!-- when it's not for quotation view -->
48
50
  <fieldset class="field-unit--nested">
49
51
  <legend><%= f.label field.attribute %></legend>
50
52
  <%= f.fields_for field.association_name do |nested_form| %>
@@ -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.5.0"
6
+ gem.version = "0.6.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.5.0
4
+ version: 0.6.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-27 00:00:00.000000000 Z
11
+ date: 2019-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: administrate