viniBaxter-spa-nested_has_many 5.0.1 → 300.0.4

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: 1e68a41c702bb3313eea6119e6b4d0a4db43402d55fb6e36494bc6491fd3e245
4
- data.tar.gz: b19da7170dd83c62554d9dfd99bfb7ce6f9da0530d2e886ef9d73204cfa37f43
3
+ metadata.gz: 5f8f90f324f87686fdcee69242d47a220b9d9ea8390151f234595a0dbc9a81d8
4
+ data.tar.gz: b73df336299a0e0992adc5540d99a6bcc48f7eb86d6eb3b7d70f7aeeeb359b90
5
5
  SHA512:
6
- metadata.gz: 49603f18207c06b86a5dfd0ca6ee7ee43aecfae68eb9894e9b0bea53df3e29cf34b44af392f1162e73f2381544c9d4d1ca470e9552e755a13f6744240634ae9d
7
- data.tar.gz: 918f92f8768fa4f6843296103d302198ec11cd10b42852d25dea9d3a42b71f96524712e6f8dfc59a27ccf81c7912519b5daeddbe52a4870ef5729487a6817a89
6
+ metadata.gz: e586da0325c5d163a72590960cd177b5838b603d5861fd949018e3f37d3b5e764ecd669f2057e994b7f3fe1ba865469548fe6aaf94bd43c839d2940fb477e69d
7
+ data.tar.gz: 6175681f01d50d920386ce0989c799fbc741d7b6a15dcacb046695544c82c6e6318bdbdce82eb25622b819b112a208da738991d6c08c01e2c72f15e0b7557554
data/.DS_Store CHANGED
Binary file
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.6.3
1
+ 3.0.3
data/app/.DS_Store ADDED
Binary file
Binary file
@@ -1,104 +1,68 @@
1
- <% if @page.class == PeriodPack %>
2
- <!-- / page is PeriodPack and weekly and period_refunds -->
3
- <% if field.attribute == :period_selected_ranges%>
4
- <div class="col-12 col-lg-6 col-xl-6">
5
- <div class="nested-fields nested-fields_<%= field.attribute %> ">
6
- <div class="card light-shadow">
7
- <div class="card-body d-flex justify-content-between align-items-center">
8
- <% if giveArrayOfNonDateForm(field,f).any? %>
9
- <% giveArrayOfNonDateForm(field,f).each do |attribute| -%>
10
- <!-- / Date -->
11
- <div class="form-group field-unit field-unit--<%= attribute.html_class %> flex-grow-1 mr-5">
12
- <%= render_field attribute, f: f, page: @page %>
13
- </div>
14
- <% end -%>
15
- <%end %>
16
- <% if giveArrayOfDateForm(field,f).any? %>
17
- <div class="row">
18
- <% giveArrayOfDateForm(field,f).each do |attribute| -%>
19
- <!-- / not a Date -->
20
- <div class="col-12 col-lg-6 col-xl-6">
21
- <div class="form-group field-unit field-unit--<%= attribute.html_class %>">
22
- <%= render_field attribute, f: f, page: @page %>
23
- </div>
24
- </div>
25
- <% end -%>
1
+ <div class="nested-fields nested-fields_<%= field.attribute %> w-100">
2
+ <div class="card light-shadow">
3
+ <div class="card-body dfsfqsff">
4
+ <% if giveArrayOrderedField(field,f)[:non_date_array].any? %>
5
+ <div class="row mt-2">
6
+ <% giveArrayOrderedField(field,f)[:non_date_array].each do |attribute| -%>
7
+ <div class="col-<%= giveArrayOrderedField(field,f)[:non_date_array].count > 1 ? 6 : 12 %>">
8
+ <div class="form-group field-unit field-unit--<%= attribute.html_class %>">
9
+ <%= render_field attribute, f: f, page: @page %>
26
10
  </div>
27
- <%end %>
28
- <div class="">
29
- <%= link_to_remove_association( t("administrate.fields.nested_has_many.remove.#{field.association_name}").html_safe,
30
- f,
31
- # class: 'btn btn-outline-danger mb-2 mt-3',
32
- class: 'mb-2 mt-3'
33
- )%>
34
11
  </div>
35
- </div>
12
+ <% end -%>
36
13
  </div>
37
- </div>
38
- </div>
39
- <% else %>
40
- <div class="nested-fields nested-fields_<%= field.attribute %> w-100">
41
- <div class="card light-shadow">
42
- <div class="card-body dfsfqsff">
43
- <% if giveArrayOfNonDateForm(field,f).any? %>
44
- <% giveArrayOfNonDateForm(field,f).each do |attribute| -%>
14
+ <%end %>
15
+ <% if giveArrayOrderedField(field,f)[:date_array].any? %>
16
+ <div class="row mt-2">
17
+ <% giveArrayOrderedField(field,f)[:date_array].each do |attribute| -%>
18
+ <div class="col-6">
45
19
  <div class="form-group field-unit field-unit--<%= attribute.html_class %>">
46
- <%= render_field attribute, f: f, page: @page %>
20
+ <%= render_field attribute, f: f, page: @page %>
47
21
  </div>
48
- <% end -%>
49
- <%end %>
50
- <% if giveArrayOfDateForm(field,f).any? %>
51
- <div class="row">
52
- <% giveArrayOfDateForm(field,f).each do |attribute| -%>
53
- <div class="col-12 col-md-6">
54
- <div class="form-group field-unit field-unit--<%= attribute.html_class %>">
55
- <%= render_field attribute, f: f, page: @page %>
56
- </div>
57
- </div>
58
- <% end -%>
59
22
  </div>
60
- <%end %>
61
- <div>
62
- <%= link_to_remove_association( t("administrate.fields.nested_has_many.remove.#{field.association_name}").html_safe,
63
- f,
64
- # class: 'btn btn-outline-danger mb-2 mt-3',
65
- class: 'mb-2 mt-3'
66
- )%>
67
- </div>
23
+ <% end -%>
68
24
  </div>
69
- </div>
70
- </div>
71
- <% end %>
72
- <%else %>
73
- <div class="nested-fields nested-fields_<%= field.attribute %> ">
74
- <div class="card light-shadow">
75
- <div class="card-body dfsfqsff">
76
- <% if giveArrayOfNonDateForm(field,f).any? %>
77
- <% giveArrayOfNonDateForm(field,f).each do |attribute| -%>
78
- <div class="form-group field-unit field-unit--<%= attribute.html_class %>">
79
- <%= render_field attribute, f: f, page: @page %>
25
+ <%end %>
26
+ <% if giveArrayOrderedField(field,f)[:text_form_array].any? %>
27
+ <div class="row mt-2">
28
+ <% giveArrayOrderedField(field,f)[:text_form_array].each do |attribute| -%>
29
+ <div class="col-12">
30
+ <div class="form-group field-unit field-unit--<%= attribute.html_class %>">
31
+ <%= render_field attribute, f: f, page: @page %>
32
+ </div>
33
+ </div>
34
+ <% end -%>
35
+ </div>
36
+ <%end %>
37
+ <% if giveArrayOrderedField(field,f)[:assets_array].any? %>
38
+ <div class="row mt-2">
39
+ <% giveArrayOrderedField(field,f)[:assets_array].each do |attribute| -%>
40
+ <div class="offset-3 col-6">
41
+ <div class="form-group field-unit field-unit--<%= attribute.html_class %>">
42
+ <%= render_field attribute, f: f, page: @page %>
43
+ </div>
80
44
  </div>
81
45
  <% end -%>
82
- <%end %>
83
- <% if giveArrayOfDateForm(field,f).any? %>
84
- <div class="row">
85
- <% giveArrayOfDateForm(field,f).each do |attribute| -%>
86
- <div class="col-12 col-md-6">
87
- <div class="form-group field-unit field-unit--<%= attribute.html_class %>">
88
- <%= render_field attribute, f: f, page: @page %>
89
- </div>
46
+ </div>
47
+ <%end %>
48
+ <% if giveArrayOrderedField(field,f)[:boolean_form_array].any? %>
49
+ <div class="row mt-2">
50
+ <% giveArrayOrderedField(field,f)[:boolean_form_array].each do |attribute| -%>
51
+ <div class="col-12">
52
+ <div class="form-group field-unit field-unit--<%= attribute.html_class %>">
53
+ <%= render_field attribute, f: f, page: @page %>
90
54
  </div>
91
- <% end -%>
92
- </div>
93
- <%end %>
94
- <div>
95
- <%= link_to_remove_association( t("administrate.fields.nested_has_many.remove.#{field.association_name}").html_safe,
55
+ </div>
56
+ <% end -%>
57
+ </div>
58
+ <%end %>
59
+ <div>
60
+ <%= link_to_remove_association( t("administrate.fields.nested_has_many.remove.#{field.association_name}").html_safe,
96
61
  f,
97
62
  # class: 'btn btn-outline-danger mb-2 mt-3',
98
63
  class: 'mb-2 mt-3'
99
64
  )%>
100
- </div>
101
65
  </div>
102
66
  </div>
103
67
  </div>
104
- <% end %>
68
+ </div>
@@ -1,22 +1,3 @@
1
- <% if @page.class == PeriodPack %>
2
- <%= render(
3
- partial: "fields/nested_has_many/periodPack/logic_if_periodPack_page",
4
- locals: {
5
- field: field,
6
- f: f,
7
- fieldset: "fieldset"
8
- },
9
- ) %>
10
- <% elsif @page.class == Period %>
11
- <%= render(
12
- partial: "fields/nested_has_many/period/logic_if_period_page",
13
- locals: {
14
- field: field,
15
- f: f,
16
- fieldset: "fieldset"
17
- },
18
- ) %>
19
- <%else %>
20
1
  <%= render(
21
2
  partial: "fields/nested_has_many/fieldset",
22
3
  locals: {
@@ -25,4 +6,3 @@
25
6
  fieldset: "fieldset"
26
7
  },
27
8
  ) %>
28
- <% end %>
@@ -16,12 +16,4 @@ as a count of how many objects are associated through the relationship.
16
16
  [1]: http://www.rubydoc.info/gems/administrate/Administrate/Field/HasMany
17
17
  %>
18
18
  <%#= pluralize(field.data.size, field.attribute.to_s.humanize.downcase) %>
19
- <% if field.attribute == :period_selected_ranges && @page.class == Place%>
20
- <% if @page.period_pack.weekly? %>
21
- Option semaine aucun range
22
- <% else %>
23
- <%= t("administrate.fields.#{field.attribute.to_s}",total_count: field.data.count).html_safe %>
24
- <% end %>
25
- <% else %>
26
- <%= t("administrate.fields.#{field.attribute.to_s}",total_count: field.data.count).html_safe %>
27
- <% end %>
19
+ <%= t("administrate.fields.#{field.attribute.to_s}",total_count: field.data.count).html_safe %>
@@ -0,0 +1,13 @@
1
+ module ViniBaxter
2
+ # module SpaLanding
3
+ # VERSION = '15.0.0'
4
+ # end
5
+ module ViniBaxterFieldActiveStorage
6
+ MAJOR = 300
7
+ MINOR = 0
8
+ TINY = 4
9
+ PRE = "STUDIO"
10
+
11
+ VERSION = [MAJOR, MINOR, TINY].compact.join(".")
12
+ end
13
+ end
@@ -1,8 +1,8 @@
1
1
  $:.push File.expand_path("../lib", __FILE__)
2
-
2
+ require "viniBaxter/version"
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "viniBaxter-spa-nested_has_many"
5
- gem.version = "5.0.1"
5
+ gem.version = ViniBaxter::ViniBaxterFieldActiveStorage::VERSION
6
6
  gem.authors = ["vini baxter"]
7
7
  gem.email = ["vinybaxter@gmail.com"]
8
8
  # gem.homepage = "https://github.com/nickcharlton/" \
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: viniBaxter-spa-nested_has_many
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 300.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - vini baxter
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-01 00:00:00.000000000 Z
11
+ date: 2022-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: administrate
@@ -178,6 +178,8 @@ files:
178
178
  - Gemfile
179
179
  - README.md
180
180
  - Rakefile
181
+ - app/.DS_Store
182
+ - app/assets/.DS_Store
181
183
  - app/assets/javascripts/administrate-field-nested_has_many/application.js
182
184
  - app/assets/stylesheets/administrate-field-nested_has_many/application.css
183
185
  - app/assets/stylesheets/administrate-field-nested_has_many/base.scss
@@ -189,8 +191,6 @@ files:
189
191
  - app/views/fields/nested_has_many/_show.html.erb
190
192
  - app/views/fields/nested_has_many/_show_current.html.erb
191
193
  - app/views/fields/nested_has_many/_show_old.html.erb
192
- - app/views/fields/nested_has_many/period/_logic_if_period_page.html.erb
193
- - app/views/fields/nested_has_many/periodPack/_logic_if_periodPack_page.html.erb
194
194
  - bin/rails
195
195
  - config/i18n-tasks.yml
196
196
  - config/locales/administrate-field-nested_has_many.en.yml
@@ -204,6 +204,7 @@ files:
204
204
  - gemfiles/administrate_master.gemfile
205
205
  - gemfiles/administrate_master.gemfile.lock
206
206
  - lib/viniBaxter/spa/nested_has_many.rb
207
+ - lib/viniBaxter/version.rb
207
208
  - spec/dummy/.gitignore
208
209
  - spec/dummy/Rakefile
209
210
  - spec/dummy/app/assets/config/manifest.js
@@ -275,11 +276,11 @@ files:
275
276
  - spec/rails_helper.rb
276
277
  - spec/spec_helper.rb
277
278
  - viniBaxter-spa-nested_has_many.gemspec
278
- homepage:
279
+ homepage:
279
280
  licenses:
280
281
  - MIT
281
282
  metadata: {}
282
- post_install_message:
283
+ post_install_message:
283
284
  rdoc_options: []
284
285
  require_paths:
285
286
  - lib
@@ -294,8 +295,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
294
295
  - !ruby/object:Gem::Version
295
296
  version: '0'
296
297
  requirements: []
297
- rubygems_version: 3.0.3
298
- signing_key:
298
+ rubygems_version: 3.2.32
299
+ signing_key:
299
300
  specification_version: 4
300
301
  summary: Plugin for nested has_many forms in Administrate
301
302
  test_files:
@@ -1,59 +0,0 @@
1
- <% if current_owner.super_admin? %>
2
- <ul>
3
- <li><%= "page weekly : #{@page.weekly}" %></li>
4
- <li><%= "page yearly : #{@page.yearly}" %></li>
5
- <li><%= "page display refund : #{@page.refund_on_period}" %></li>
6
- </ul>
7
- <% end %>
8
- <% if @page.weekly %>
9
- <!-- / page is PeriodPack and weekly -->
10
- <% if @page.refund_on_period %>
11
- <!-- / page is PeriodPack and weekly and period_refunds -->
12
- <% if field.attribute != :period_selected_ranges%>
13
- <%= render(
14
- partial: "fields/nested_has_many/fieldset",
15
- locals: {
16
- field: field,
17
- f: f,
18
- fieldset: "fieldset"
19
- },
20
- ) %>
21
- <% end %>
22
- <% else %>
23
- <!-- / .weekly but hide period_selected_ranges and hide period_refunds-->
24
- <% if field.attribute != :period_selected_ranges && field.attribute != :period_refunds%>
25
- <%= render(
26
- partial: "fields/nested_has_many/fieldset",
27
- locals: {
28
- field: field,
29
- f: f,
30
- fieldset: "fieldset"
31
- },
32
- ) %>
33
- <% end %>
34
- <% end %>
35
- <!-- / page is PeriodPack but not weekly -->
36
- <%else %>
37
- <% if @page.refund_on_period %>
38
- <%= render(
39
- partial: "fields/nested_has_many/fieldset",
40
- locals: {
41
- field: field,
42
- f: f,
43
- fieldset: field.attribute == :period_selected_ranges ? "div" : "fieldset"
44
- },
45
- ) %>
46
- <% else %>
47
- <% if field.attribute != :period_refunds%>
48
- <%= render(
49
- partial: "fields/nested_has_many/fieldset",
50
- locals: {
51
- field: field,
52
- f: f,
53
- fieldset: field.attribute == :period_selected_ranges ? "div" : "fieldset"
54
- },
55
- ) %>
56
- <% end %>
57
- <% end %>
58
- <% end %>
59
- <!-- / page is not PeriodPack -->
@@ -1,59 +0,0 @@
1
- <% if current_owner.super_admin? %>
2
- <ul>
3
- <li><%= "page weekly : #{@page.weekly}" %></li>
4
- <li><%= "page yearly : #{@page.yearly}" %></li>
5
- <li><%= "page display refund : #{@page.refund_on_period}" %></li>
6
- </ul>
7
- <% end %>
8
- <% if @page.weekly %>
9
- <!-- / page is PeriodPack and weekly -->
10
- <% if @page.refund_on_period %>
11
- <!-- / page is PeriodPack and weekly and period_refunds -->
12
- <% if field.attribute != :period_selected_ranges%>
13
- <%= render(
14
- partial: "fields/nested_has_many/fieldset",
15
- locals: {
16
- field: field,
17
- f: f,
18
- fieldset: "fieldset"
19
- },
20
- ) %>
21
- <% end %>
22
- <% else %>
23
- <!-- / .weekly but hide period_selected_ranges and hide period_refunds-->
24
- <% if field.attribute != :period_selected_ranges && field.attribute != :period_refunds%>
25
- <%= render(
26
- partial: "fields/nested_has_many/fieldset",
27
- locals: {
28
- field: field,
29
- f: f,
30
- fieldset: "fieldset"
31
- },
32
- ) %>
33
- <% end %>
34
- <% end %>
35
- <!-- / page is PeriodPack but not weekly -->
36
- <%else %>
37
- <% if @page.refund_on_period %>
38
- <%= render(
39
- partial: "fields/nested_has_many/fieldset",
40
- locals: {
41
- field: field,
42
- f: f,
43
- fieldset: field.attribute == :period_selected_ranges ? "div" : "fieldset"
44
- },
45
- ) %>
46
- <% else %>
47
- <% if field.attribute != :period_refunds%>
48
- <%= render(
49
- partial: "fields/nested_has_many/fieldset",
50
- locals: {
51
- field: field,
52
- f: f,
53
- fieldset: field.attribute == :period_selected_ranges ? "div" : "fieldset"
54
- },
55
- ) %>
56
- <% end %>
57
- <% end %>
58
- <% end %>
59
- <!-- / page is not PeriodPack -->