dynamic_scaffold 1.1.0 → 1.1.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2f35e786a0533764f007895348ab6d65c43e2a42e643f10a67ebba0368e67ff
|
4
|
+
data.tar.gz: f71a2767b197d12f3d37092bec87deecafa0ffbb49cfd387c068d3a3da0c4f29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee85e233f68f59d1e1145dc2f0986b760df0c82d89ea8e49b2631ae7ba288df089f97e381c5040d76bca92ada0f698702ccb383c31d3f7632f08ed8cbd3d3f6f
|
7
|
+
data.tar.gz: 14a4ef08800ca836ffbaa9b9a67f93d96797523690f61058752be94d0c956240f1c0f07c352b7794be101d62adf59e22e5c89a8aa05c30a61218a38fd8f73877
|
data/README.md
CHANGED
@@ -210,7 +210,7 @@ class ShopController < ApplicationController
|
|
210
210
|
# You can use form helper methods for type,
|
211
211
|
# text_field, check_box, radio_button, password_field, hidden_field, file_field, text_area, color_field,
|
212
212
|
# collection_check_boxes, collection_radio_buttons, collection_select, grouped_collection_select,
|
213
|
-
# time_select, date_select, datetime_select, number_field, telephone_field
|
213
|
+
# time_select, date_select, datetime_select, date_field, number_field, telephone_field
|
214
214
|
|
215
215
|
|
216
216
|
# Default label is I18n model attribute name.
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<%- errors = elem.errors(form) -%>
|
6
6
|
<div class="<%= class_names('form-group', 'has-error': errors.present?) %>">
|
7
7
|
<%= elem.render_label(self, depth) %>
|
8
|
-
<div
|
8
|
+
<div>
|
9
9
|
<%- elem.insert(:before).each do |block| -%>
|
10
10
|
<%= self.instance_exec(@record, &block) %>
|
11
11
|
<%-end-%>
|
@@ -79,6 +79,13 @@
|
|
79
79
|
partial: 'dynamic_scaffold/bootstrap/form/cocoon',
|
80
80
|
render_options: { locals: { items: elem.form.items, depth: depth } }
|
81
81
|
) %>
|
82
|
+
<% elsif elem.type?(:date_select, :datetime_select) %>
|
83
|
+
<div class="form-inline">
|
84
|
+
<%== elem.render(self, form, class_names('form-control mr-2', {'is-invalid': errors.present?}))
|
85
|
+
.gsub(/ — /, '<span class="m-2" style="display: inline-block;"> </span>')
|
86
|
+
.gsub(/ : /, '<span class="mr-2" style="display: inline-block;">:</span>')
|
87
|
+
%>
|
88
|
+
</div>
|
82
89
|
<% else %>
|
83
90
|
<%= elem.render(self, form, class_names('form-control', {'is-invalid': errors.present?})) %>
|
84
91
|
<% end %>
|
@@ -7,6 +7,7 @@ module DynamicScaffold
|
|
7
7
|
radio_button: Form::Item::SingleOption,
|
8
8
|
text_area: Form::Item::SingleOption,
|
9
9
|
text_field: Form::Item::SingleOption,
|
10
|
+
date_field: Form::Item::SingleOption,
|
10
11
|
password_field: Form::Item::SingleOption,
|
11
12
|
hidden_field: Form::Item::SingleOption,
|
12
13
|
file_field: Form::Item::SingleOption,
|
@@ -77,8 +78,8 @@ module DynamicScaffold
|
|
77
78
|
view.safe_join(htmls)
|
78
79
|
end
|
79
80
|
|
80
|
-
def type?(
|
81
|
-
@type
|
81
|
+
def type?(*args)
|
82
|
+
args.include?(@type)
|
82
83
|
end
|
83
84
|
|
84
85
|
def label?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamic_scaffold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masamoto Miyata
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: classnames-rails-view
|