scaffold_pico 2.2.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f40c45aedc54a1d8b3d4ff82328f5d761178d50c7cd4831dad57c998aab869a0
4
- data.tar.gz: 3fe140a777902bc7e23ef277d27feb841303c0c9ebf817879c45dfbc93c969b7
3
+ metadata.gz: 6b46ccfdaeb94290ae485382afddb96a71306367cffa07f9904bc3d34cdcfae1
4
+ data.tar.gz: 4102b389ee0c84cc7f11cca76b8a76dd94754b25ff08d175af7b1ec20c09dcb2
5
5
  SHA512:
6
- metadata.gz: 9d92d5cd66c69f825c406de7d252436238e212362c3d001a507dc204ce15848b8f7ac71686a59d057f501963d933207baf9ee52822f7120390b94c89a9f93d83
7
- data.tar.gz: b3780c528fabe7d0fc73104bb9c084a5004332b37cce3578f75023b6dd178ccbfc7aa01a8da6235b7fefdec11b93691b384f7f3ac11a52bbdfc5aa6ff64366a9
6
+ metadata.gz: 5e1221e9fa6844c96b0c41aa07033a6dd006242408eec6481a15bdf5ed857131717d5dceb30a650a8da95c3741c9ff1f11e49f5c3b5f3290fd6073d64ee96e9b
7
+ data.tar.gz: 74bd020646b2b5af40204c283e118bf041690ca68d56dddabc7f74463d9b9edbcd1f1344861d86414111a25e36e6e5235eaf23364bb851a93c2b4c0ada39bb58
@@ -39,13 +39,13 @@ h1 = t('scaffold.index.title', model: <%= @rails.resource.class_name_with_module
39
39
  .form-inputs
40
40
  <% @rails.resource.fields.select {|k,v| @rails.controller.search_fields.include?(k) }.each_pair do |field_name, field_type| %>
41
41
  <% if field_type == 'belongs_to' -%>
42
- = form.input :<%= field_name -%>_id
42
+ = form.input :<%= field_name -%>_id
43
43
  <% elsif ['date', 'datetime'].include?(field_type) -%>
44
- = form.input :<%= field_name -%>, as: :date, html5: true
44
+ = form.input :<%= field_name -%>, as: :date, html5: true
45
45
  <% elsif field_type == 'boolean' -%>
46
- = form.input :<%= field_name -%>, as: :boolean, input_html: {class: 'filled-in'}
47
- <% else %>
48
- = form.input :<%= field_name -%>
46
+ = form.input :<%= field_name -%>, as: :boolean, input_html: {class: 'filled-in'}
47
+ <% else -%>
48
+ = form.input :<%= field_name -%>
49
49
  <% end -%>
50
50
  <% end %>
51
51
 
@@ -1,16 +1,18 @@
1
- h1 = t('scaffold.show.title', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 1).mb_chars.downcase)
1
+ .d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center.pb-2.mb-3.border-bottom
2
+ h1 = t('scaffold.show.title', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 1).mb_chars.downcase)
2
3
 
3
- .callout.clearfix
4
- .float-left
5
- = link_to t('scaffold.show.actions.index', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 2).mb_chars.downcase), <%= @rails.path.collection %>, class: 'button small primary'
6
- .float-right
7
- = link_to t('scaffold.actions.edit', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 1).mb_chars.downcase), <%= @rails.path.edit_instance_resource %>, class: 'button small warning'
8
- = link_to t('scaffold.actions.new', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 1).mb_chars.downcase), <%= @rails.path.new_resource %>, class: 'button small secondary'
4
+ .btn-toolbar.mb-2.mb-md-0
5
+ .btn-group.mr-2
6
+ = link_to t('scaffold.actions.edit', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 1).mb_chars.downcase), <%= @rails.path.edit_instance_resource %>, class: 'btn btn-sm btn-outline-secondary'
7
+ = link_to t('scaffold.actions.new', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 1).mb_chars.downcase), <%= @rails.path.new_resource %>, class: 'btn btn-sm btn-outline-secondary'
8
+ .btn-group
9
+ = link_to t('scaffold.show.actions.index', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 2).mb_chars.downcase), <%= @rails.path.collection %>, class: 'btn btn-sm btn-outline-primary'
9
10
 
10
- table
11
- tbody
12
- <% @rails.resource.fields.keys.each do |field_name| %>
13
- tr
14
- td = <%= @rails.resource.class_name_with_modules -%>.human_attribute_name(:<%= field_name -%>)
15
- td = @<%= @rails.resource.name %>.<%= field_name -%>
16
- <% end %>
11
+ .table-responsive
12
+ table.table.table-striped
13
+ tbody
14
+ <% @rails.resource.fields.keys.each do |field_name| %>
15
+ tr
16
+ td = <%= @rails.resource.class_name_with_modules -%>.human_attribute_name(:<%= field_name -%>)
17
+ td = @<%= @rails.resource.name %>.<%= field_name -%>
18
+ <% end %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scaffold_pico
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - gudata
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-11 00:00:00.000000000 Z
11
+ date: 2020-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport