tramway-admin 1.10.0.1 → 1.11

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: 5e0e686fa86cb34adcc6565121f5ba1852abe3e214a5a55a72357a6082bd8a77
4
- data.tar.gz: b98c6983fd12173eb3f61efccfd882a08856467f8c3671d67ed87c9a95ac2017
3
+ metadata.gz: 5292206fd2dff592351b3f2335bae56d462926bf8a20c5dca9ce85a03ea9ba83
4
+ data.tar.gz: 65a647ef6159f4f9a4148c942fcf7d671450d3d022f47576a8736d322a57e9ff
5
5
  SHA512:
6
- metadata.gz: 3bfaa9df86b618622abde2433a9f09c8175aba2e7fdc7690c72f5e8e30ab011a33282563faa2db9ffc7a714e2b2fa4f9e81b309207d92829498b01f9d6ad1635
7
- data.tar.gz: 763f3a570920642ab2b76288ea6f477a8ca2318a2b179e1472c8f9c15d4c7443896275f1dbe4f298ef20d1e52e168e2d47735e748484c0b0f9fa5d323ed850c1
6
+ metadata.gz: 5ca14f4b9d31900d20ade7f333b9e1a751029e000443f95cda94b2507b414b851a9c9b7e07d20bf9d3f9ff0470397389491847d6a74e73a4ab83a168b17081dd
7
+ data.tar.gz: 4127497b8ae0c8f1ca1dc76b0c0ba5f06205343b460e662d634bc1e0cca62369f9d08070c5e36f38afdd5c74b93acfb9bcec3da44c4a3a31801e215da60061fe
@@ -16,25 +16,23 @@
16
16
  %hr
17
17
  .row
18
18
  %table.table.table-striped.table-bordered
19
- - object.attributes.each do |attribute_name, value|
20
- %tr
21
- %td
22
- = model_class.human_attribute_name attribute_name
23
- %td
24
- = value
25
- %td
26
- - if attribute_name != 'state' && object.model.class.state_machines.keys.include?(attribute_name.to_sym)
27
- = state_events_buttons object, state_method: attribute_name, model_param_name: :record, route_method: :current_model_record_path
28
- - object.associations(:has_many).each do |association|
29
- %tr
30
- %td
31
- = model_class.human_attribute_name association.name
32
- = link_to fa_icon(:plus), new_record_path(model: association.class_name, redirect: current_model_record_path(object)), class: 'btn btn-primary'
33
- %td{ colspan: 2 }
34
- %table.table.table-striped.table-bordered
35
- - object.send(association.name).each do |association_object|
36
- %tr
37
- %td
38
- = association_object.id
39
- %td
40
- = association_object.name
19
+ - if object.class.show_attributes.any?
20
+ - object.class.show_attributes.each do |attribute_name|
21
+ - value = object.send attribute_name
22
+ = render 'tramway/admin/shared/show/attribute_tr', attribute_name: attribute_name, value: value, object: object
23
+ - else
24
+ - object.attributes.each do |attribute_name, value|
25
+ = render 'tramway/admin/shared/show/attribute_tr', attribute_name: attribute_name, value: value, object: object
26
+ - object.associations(:has_many).each do |association|
27
+ %tr
28
+ %td
29
+ = model_class.human_attribute_name association.name
30
+ = link_to fa_icon(:plus), new_record_path(model: association.class_name, redirect: current_model_record_path(object)), class: 'btn btn-primary'
31
+ %td{ colspan: 2 }
32
+ %table.table.table-striped.table-bordered
33
+ - object.send(association.name).each do |association_object|
34
+ %tr
35
+ %td
36
+ = association_object.id
37
+ %td
38
+ = association_object.name
@@ -0,0 +1,8 @@
1
+ %tr
2
+ %td
3
+ = model_class.human_attribute_name attribute_name
4
+ %td
5
+ = value
6
+ %td
7
+ - if attribute_name != 'state' && object.model.class.state_machines.keys.include?(attribute_name.to_sym)
8
+ = state_events_buttons object, state_method: attribute_name, model_param_name: :record, route_method: :current_model_record_path
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Admin
3
- VERSION = '1.10.0.1'
3
+ VERSION = '1.11'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0.1
4
+ version: '1.11'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-15 00:00:00.000000000 Z
11
+ date: 2019-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap-kaminari-views
@@ -234,6 +234,7 @@ files:
234
234
  - app/views/tramway/admin/shared/_input.html.haml
235
235
  - app/views/tramway/admin/shared/_show.html.haml
236
236
  - app/views/tramway/admin/shared/errors/server_error.html.haml
237
+ - app/views/tramway/admin/shared/show/_attribute_tr.html.haml
237
238
  - app/views/tramway/admin/singletons/_form.html.haml
238
239
  - app/views/tramway/admin/singletons/edit.html.haml
239
240
  - app/views/tramway/admin/singletons/new.html.haml