viniBaxter-spa-nested_has_many 5.4.0 → 300.0.1
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 +19 -92
- 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: 19b86ab829fecc27ce39273720712e6be5d6d60167c5568136a298152a54ae47
|
4
|
+
data.tar.gz: 538b083e442eba0edbe7b0bdad65a8b5ab78c131d73d4c7150608956012e5058
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3409cb60831f00c5ab4220d8b58284276e4695891b74568c5295fd5d35d32e0c569f100f1e99e665ac883c2a41fe0aca947aaa06bd7edaf191c76072adb54e9
|
7
|
+
data.tar.gz: 30266f7a7254fe108ced568348378338f6941c9f548fcc4a1eb18cf2045f6293b14ee117a0def7b71e3b3f8a20d99070c5e025bcf85e284829959661622509d0
|
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,31 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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>
|
1
|
+
<div class="nested-fields nested-fields_<%= field.attribute %> ">
|
2
|
+
<div class="card light-shadow">
|
3
|
+
<div class="card-body dfsfqsff">
|
4
|
+
<% if giveArrayOfNonDateForm(field,f).any? %>
|
5
|
+
<% giveArrayOfNonDateForm(field,f).each do |attribute| -%>
|
6
|
+
<div class="form-group field-unit field-unit--<%= attribute.html_class %>">
|
7
|
+
<%= render_field attribute, f: f, page: @page %>
|
35
8
|
</div>
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
<div class="card-body dfsfqsff">
|
43
|
-
<% if giveArrayOfNonDateForm(field,f).any? %>
|
44
|
-
<% giveArrayOfNonDateForm(field,f).each do |attribute| -%>
|
9
|
+
<% end -%>
|
10
|
+
<%end %>
|
11
|
+
<% if giveArrayOfDateForm(field,f).any? %>
|
12
|
+
<div class="row">
|
13
|
+
<% giveArrayOfDateForm(field,f).each do |attribute| -%>
|
14
|
+
<div class="col-12 col-md-6">
|
45
15
|
<div class="form-group field-unit field-unit--<%= attribute.html_class %>">
|
46
|
-
<%= render_field attribute, f: f, page: @page
|
16
|
+
<%= render_field attribute, f: f, page: @page %>
|
47
17
|
</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
|
-
</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
18
|
</div>
|
81
19
|
<% end -%>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
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>
|
90
|
-
</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,
|
20
|
+
</div>
|
21
|
+
<%end %>
|
22
|
+
<div>
|
23
|
+
<%= link_to_remove_association( t("administrate.fields.nested_has_many.remove.#{field.association_name}").html_safe,
|
96
24
|
f,
|
97
25
|
# class: 'btn btn-outline-danger mb-2 mt-3',
|
98
26
|
class: 'mb-2 mt-3'
|
99
27
|
)%>
|
100
|
-
</div>
|
101
28
|
</div>
|
102
29
|
</div>
|
103
30
|
</div>
|
104
|
-
|
31
|
+
</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.1
|
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-02 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 -->
|