common_core_js 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/common_core_js/version.rb +1 -1
- data/lib/generators/common_core/scaffold_generator.rb +24 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b509c4f6a9d3e9948e5a49a3ea649cb693e75ac47ff43f40cc7bf90e3c96590
|
4
|
+
data.tar.gz: d8336db5c37a0db6d82cd7c926d9d6bd9f1b5cdd97c46e18d35ce30a0126dc77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a49c509c20a0e82c30dbadd3ea700a8eb341e943f6d3347898d09ff3bd0ca29e656302265d9c02784ef0948e7a10bf9a1fd0e31b35dfec52704ea73325bfa30e
|
7
|
+
data.tar.gz: 2d882167e819535280cc20a4bb7ba47c3c35c2a179f4e2ac0170f36f8547a78b364d3cccb8a303a72b117ddc3ee4d06d4f0f08a17eb59b3009917035b4e0dbf8
|
@@ -475,16 +475,27 @@ module CommonCore
|
|
475
475
|
when :datetime
|
476
476
|
".row
|
477
477
|
%div{class: \"form-group col-md-4 \#{'alert-danger' if #{singular}.errors.details.keys.include?(:#{col.to_s})}\"}
|
478
|
-
= datetime_field_localized(f, :#{col.to_s},
|
478
|
+
= datetime_field_localized(f, :#{col.to_s}, #{singular}.#{col.to_s}, '#{col.to_s.humanize}', #{@auth ? @auth+'.timezone' : 'nil'})"
|
479
479
|
when :date
|
480
480
|
".row
|
481
481
|
%div{class: \"form-group col-md-4 \#{'alert-danger' if #{singular}.errors.details.keys.include?(:#{col.to_s})}\"}
|
482
|
-
= date_field_localized(f, :#{col.to_s},
|
482
|
+
= date_field_localized(f, :#{col.to_s}, #{singular}.#{col.to_s}, '#{col.to_s.humanize}', #{@auth ? @auth+'.timezone' : 'nil'})"
|
483
483
|
when :time
|
484
484
|
".row
|
485
485
|
%div{class: \"form-group col-md-4 \#{'alert-danger' if #{singular}.errors.details.keys.include?(:#{col.to_s})}\"}
|
486
|
-
= time_field_localized(f, :#{col.to_s},
|
486
|
+
= time_field_localized(f, :#{col.to_s}, #{singular}.#{col.to_s}, '#{col.to_s.humanize}', #{@auth ? @auth+'.timezone' : 'nil'})"
|
487
|
+
when :boolean
|
488
|
+
".row
|
489
|
+
%div{class: \"form-group col-md-4 \#{'alert-danger' if #{singular}.errors.details.keys.include?(:#{col.to_s})}\"}
|
490
|
+
%span
|
491
|
+
#{col.to_s.humanize}
|
492
|
+
= f.radio_button(:#{col.to_s}, '0', checked: #{singular}.#{col.to_s} ? '' : 'checked')
|
493
|
+
= f.label(:#{col.to_s}, value: 'No', for: '#{singular}_#{col.to_s}_0')
|
494
|
+
|
495
|
+
= f.radio_button(:#{col.to_s}, '1', checked: #{singular}.#{col.to_s} ? 'checked' : '')
|
496
|
+
= f.label(:#{col.to_s}, value: 'Yes', for: '#{singular}_#{col.to_s}_1')
|
487
497
|
|
498
|
+
"
|
488
499
|
end
|
489
500
|
|
490
501
|
}.join("\n")
|
@@ -567,7 +578,16 @@ module CommonCore
|
|
567
578
|
%span.alert-danger
|
568
579
|
MISSING
|
569
580
|
"
|
570
|
-
|
581
|
+
when :boolean
|
582
|
+
" %td
|
583
|
+
- if #{singular}.#{col}.nil?
|
584
|
+
%span.alert-danger
|
585
|
+
MISSING
|
586
|
+
- elsif #{singular}.#{col}
|
587
|
+
YES
|
588
|
+
- else
|
589
|
+
NO
|
590
|
+
"
|
571
591
|
end
|
572
592
|
}.join("\n")
|
573
593
|
return res
|