tramway-admin 3.0.1 → 3.0.1.1

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: 02b3fd52b732d4e15e693c4cc89aad5e2f631cdeadea0856eedcfdfefa0089c0
4
- data.tar.gz: fdd63869e0e5a63280fce0902e80d23f2f77430c7c1de04d040cb8dba3e38c17
3
+ metadata.gz: aa0b55e83ec3fc784c9d7ca0590c557d62ad24fee0da6ecf86b16bf0358dff4a
4
+ data.tar.gz: d3aaf7cf6a93420787e891c683dfe34cfe40c11cb8acfb9b160e8efc89155672
5
5
  SHA512:
6
- metadata.gz: ab4de60de6b8b1b52f515f234d58dc42d15ab56a6417dce6d25e21c3446d10b684faf34cab7a873d3c29470b5b77187723834e963a4d943b757839514dfdec00
7
- data.tar.gz: '086e0b2ab7575f43e07b4a1925faf826a4d9014cbc2eb61cec7c3c275154f5fb29608ca77136b1f051be9ecee30169c7f99f4f8f9d8ec5dbc3576e15a6d25128'
6
+ metadata.gz: bb05dcd52a0f0597a8e8c29b4e53f0c0cc11e15ab3112888e23f3cf487738817c3984e51092009dfb86ad56bf006dabdabae48e964c766229b5c2ab644dfdc76
7
+ data.tar.gz: 84a270fb558d455bb82238b3ef735e879b3e1ebe655f92b4ef033c467e290a59aa8dfabee5524bd682d00c051fcaa3bf334d613da2b813359f73b0fe450b77db
@@ -4,17 +4,19 @@
4
4
  = association_object.id
5
5
  %td
6
6
  = link_to association_object.name, record_path(association_object.id, model: association.options[:class_name])
7
+ - if association_object.model.class.state_machines_names.count > 1
8
+ %td
9
+ - association_object.model.class.state_machines_names.each do |state_method|
10
+ - unless state_method == 'default'
11
+ = state_events_buttons association_object, state_method: state_method, model_param_name: :record, controller: 'tramway/admin/records', action: :update, parameters: { redirect: current_model_record_path(object.id), model: association_object.class.model_name }, button_options: { class: :smart_button }
7
12
  %td
8
- - association_object.model.class.state_machines_names.each do |state_method|
9
- - unless state_method == 'default'
10
- = state_events_buttons association_object, state_method: state_method, model_param_name: :record, controller: 'tramway/admin/records', action: :update, parameters: { redirect: current_model_record_path(object.id), model: association_object.class.model_name }, button_options: { class: :smart_button }
11
- %td
12
- - if update_is_available? association_object, object
13
- = edit_button url: edit_record_path(association_object.id, model: association.options[:class_name], redirect: current_model_record_path(object.id)), button_options: { class: 'btn btn-xs btn-warning edit' } do
14
- = fa_icon 'pencil-alt'
15
- - if destroy_is_available? association_object, object
16
- = delete_button url: record_path(association_object.id, model: association.options[:class_name], redirect: current_model_record_path(object.id)), button_options: { class: 'btn btn-xs btn-danger delete' } do
17
- = fa_icon 'trash-alt'
18
- - if habtm_destroy_is_available? association_object, object
19
- = delete_button url: has_and_belongs_to_many_record_path(association_object.id, model_class: object.model.class, object_id: object.id, form: "Admin::#{object.model.class.to_s.pluralize}::Remove#{association_object.model.class.to_s}Form", redirect: current_model_record_path(object.id)), button_options: { class: 'btn btn-xs btn-danger delete' } do
20
- = fa_icon 'trash-alt'
13
+ .row{ style: 'justify-content: space-evenly' }
14
+ - if update_is_available? association_object, object
15
+ = edit_button url: edit_record_path(association_object.id, model: association.options[:class_name], redirect: current_model_record_path(object.id)), button_options: { class: 'btn btn-xs btn-warning edit', style: 'height: max-content' } do
16
+ = fa_icon 'pencil-alt'
17
+ - if destroy_is_available? association_object, object
18
+ = delete_button url: record_path(association_object.id, model: association.options[:class_name], redirect: current_model_record_path(object.id)), button_options: { class: 'btn btn-xs btn-danger delete' } do
19
+ = fa_icon 'trash-alt'
20
+ - if habtm_destroy_is_available? association_object, object
21
+ = delete_button url: has_and_belongs_to_many_record_path(association_object.id, model_class: object.model.class, object_id: object.id, form: "Admin::#{object.model.class.to_s.pluralize}::Remove#{association_object.model.class.to_s}Form", redirect: current_model_record_path(object.id)), button_options: { class: 'btn btn-xs btn-danger delete' } do
22
+ = fa_icon 'trash-alt'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Admin
5
- VERSION = '3.0.1'
5
+ VERSION = '3.0.1.1'
6
6
  end
7
7
  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: 3.0.1
4
+ version: 3.0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-13 00:00:00.000000000 Z
11
+ date: 2022-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tramway-core