viniBaxter-spa-nested_has_many 5.0.0 → 300.0.2
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 +13 -84
- 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 +3 -3
- metadata +11 -11
- 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: 413c7debe232cba975c38bb13b82d300320e22a15c1c32d90b6e27add4bb82ba
|
4
|
+
data.tar.gz: 00c02b83e0f5410fd94bfc80bd0897553b57fb0f6f71f48fc51e2b0e1f4ccc7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 606371b6e0ac428d75d437d61dac72fc0af57bf22f1c9245c90d02f85f408956a588397f16b5e6a69e55bc899f534770dbea345717a87776ab0c60f92941e763
|
7
|
+
data.tar.gz: 80c447c3b516eab6b0a9374446cc3dc374bc863fd5a1ac71757e196097a5b3c7643c0a6aa2805e85ed84de0bec4f3e6986d1ee289c34931df5d2167e5208e3e6
|
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,95 +1,25 @@
|
|
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 -%>
|
26
|
-
</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
|
-
</div>
|
35
|
-
</div>
|
36
|
-
</div>
|
37
|
-
</div>
|
38
|
-
</div>
|
39
|
-
<% else %>
|
40
1
|
<div class="nested-fields nested-fields_<%= field.attribute %> w-100">
|
41
2
|
<div class="card light-shadow">
|
42
3
|
<div class="card-body dfsfqsff">
|
43
4
|
<% if giveArrayOfNonDateForm(field,f).any? %>
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
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 %>
|
5
|
+
<% giveArrayOfNonDateForm(field,f).each do |attribute| -%>
|
6
|
+
<div class="col-12">
|
7
|
+
<div class="form-group field-unit field-unit--<%= attribute.html_class %>">
|
8
|
+
<%= render_field attribute, f: f, page: @page %>
|
9
|
+
</div>
|
56
10
|
</div>
|
57
|
-
</div>
|
58
11
|
<% end -%>
|
59
|
-
</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>
|
68
|
-
</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 %>
|
80
|
-
</div>
|
81
|
-
<% end -%>
|
82
12
|
<%end %>
|
83
13
|
<% if giveArrayOfDateForm(field,f).any? %>
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
14
|
+
<div class="row">
|
15
|
+
<% giveArrayOfDateForm(field,f).each do |attribute| -%>
|
16
|
+
<div class="col-12 col-md-6">
|
17
|
+
<div class="form-group field-unit field-unit--<%= attribute.html_class %>">
|
18
|
+
<%= render_field attribute, f: f, page: @page %>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
<% end -%>
|
90
22
|
</div>
|
91
|
-
<% end -%>
|
92
|
-
</div>
|
93
23
|
<%end %>
|
94
24
|
<div>
|
95
25
|
<%= link_to_remove_association( t("administrate.fields.nested_has_many.remove.#{field.association_name}").html_safe,
|
@@ -101,4 +31,3 @@
|
|
101
31
|
</div>
|
102
32
|
</div>
|
103
33
|
</div>
|
104
|
-
<% end %>
|
@@ -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,9 +1,9 @@
|
|
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 =
|
6
|
-
gem.authors = ["
|
5
|
+
gem.version = ViniBaxter::ViniBaxterFieldActiveStorage::VERSION
|
6
|
+
gem.authors = ["vini baxter"]
|
7
7
|
gem.email = ["vinybaxter@gmail.com"]
|
8
8
|
# gem.homepage = "https://github.com/nickcharlton/" \
|
9
9
|
# "administrate-field-nested_has_many"
|
metadata
CHANGED
@@ -1,15 +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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
|
9
|
-
autorequire:
|
7
|
+
- vini baxter
|
8
|
+
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2022-02-03 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: administrate
|
@@ -179,6 +178,8 @@ files:
|
|
179
178
|
- Gemfile
|
180
179
|
- README.md
|
181
180
|
- Rakefile
|
181
|
+
- app/.DS_Store
|
182
|
+
- app/assets/.DS_Store
|
182
183
|
- app/assets/javascripts/administrate-field-nested_has_many/application.js
|
183
184
|
- app/assets/stylesheets/administrate-field-nested_has_many/application.css
|
184
185
|
- app/assets/stylesheets/administrate-field-nested_has_many/base.scss
|
@@ -190,8 +191,6 @@ files:
|
|
190
191
|
- app/views/fields/nested_has_many/_show.html.erb
|
191
192
|
- app/views/fields/nested_has_many/_show_current.html.erb
|
192
193
|
- app/views/fields/nested_has_many/_show_old.html.erb
|
193
|
-
- app/views/fields/nested_has_many/period/_logic_if_period_page.html.erb
|
194
|
-
- app/views/fields/nested_has_many/periodPack/_logic_if_periodPack_page.html.erb
|
195
194
|
- bin/rails
|
196
195
|
- config/i18n-tasks.yml
|
197
196
|
- config/locales/administrate-field-nested_has_many.en.yml
|
@@ -205,6 +204,7 @@ files:
|
|
205
204
|
- gemfiles/administrate_master.gemfile
|
206
205
|
- gemfiles/administrate_master.gemfile.lock
|
207
206
|
- lib/viniBaxter/spa/nested_has_many.rb
|
207
|
+
- lib/viniBaxter/version.rb
|
208
208
|
- spec/dummy/.gitignore
|
209
209
|
- spec/dummy/Rakefile
|
210
210
|
- spec/dummy/app/assets/config/manifest.js
|
@@ -276,11 +276,11 @@ files:
|
|
276
276
|
- spec/rails_helper.rb
|
277
277
|
- spec/spec_helper.rb
|
278
278
|
- viniBaxter-spa-nested_has_many.gemspec
|
279
|
-
homepage:
|
279
|
+
homepage:
|
280
280
|
licenses:
|
281
281
|
- MIT
|
282
282
|
metadata: {}
|
283
|
-
post_install_message:
|
283
|
+
post_install_message:
|
284
284
|
rdoc_options: []
|
285
285
|
require_paths:
|
286
286
|
- lib
|
@@ -295,8 +295,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
295
295
|
- !ruby/object:Gem::Version
|
296
296
|
version: '0'
|
297
297
|
requirements: []
|
298
|
-
rubygems_version: 3.
|
299
|
-
signing_key:
|
298
|
+
rubygems_version: 3.2.32
|
299
|
+
signing_key:
|
300
300
|
specification_version: 4
|
301
301
|
summary: Plugin for nested has_many forms in Administrate
|
302
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 -->
|