viniBaxter-spa-nested_has_many 5.4.0 → 300.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/.ruby-version +1 -1
- data/app/.DS_Store +0 -0
- data/app/assets/.DS_Store +0 -0
- data/app/views/fields/nested_has_many/_fields.html.erb +51 -87
- data/app/views/fields/nested_has_many/_form.html.erb +0 -20
- data/app/views/fields/nested_has_many/_index.html.erb +1 -9
- data/lib/viniBaxter/version.rb +13 -0
- data/viniBaxter-spa-nested_has_many.gemspec +2 -2
- metadata +10 -9
- data/app/views/fields/nested_has_many/period/_logic_if_period_page.html.erb +0 -59
- data/app/views/fields/nested_has_many/periodPack/_logic_if_periodPack_page.html.erb +0 -59
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 509e36da0b8d4e8f8de3c58e116d8b1625dd50c26d4e94d37e632bef0202889e
|
4
|
+
data.tar.gz: a2fb499d50efa707a115881edf635e3077d0872df2f278de975ab5e6891554f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c70c008ff503b1d9b52823f7a48d6b30a12d2061b13c4b8bfeddc6d1909e6735aae8deed48d4d504b2b72f85a3958c5ccfa4e571c14a15480e53a7997bc4506
|
7
|
+
data.tar.gz: 227e9db4451922e856b061543dc2e84d87b21fb580b87bf78f0b498dc48b689b9903375ad70d6ac5a5900dbb7f6a4f7d39a0430bb5f45c9e72e8d1e6ee7f6604
|
data/.DS_Store
CHANGED
Binary file
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.0.3
|
data/app/.DS_Store
ADDED
Binary file
|
Binary file
|
@@ -1,104 +1,68 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
-
|
12
|
+
<% end -%>
|
36
13
|
</div>
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
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
|
-
|
70
|
-
|
71
|
-
|
72
|
-
<%
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
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="col-12">
|
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
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
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
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
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
|
-
|
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
|
-
|
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 %>
|
@@ -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
|
+
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:
|
4
|
+
version: 300.0.5
|
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:
|
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.
|
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 -->
|