tramway-admin 4.1.1.5 → 4.1.2.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: fbc4343d5cbd090f126128c0297e8e9f3bf5056a79701e012b561a50ccbb359d
4
- data.tar.gz: 9cff857408d5167428271bff18f34ea5b4d9707615d24c8a03bca80bb6b827fe
3
+ metadata.gz: b0baab938ac5a7920ed5c7919a4f42b400930d3d376d9abfa1afe22778a77f04
4
+ data.tar.gz: d59c6b03855039f153274c16398002a49283dd6f056249cc3ad66e355f6984d5
5
5
  SHA512:
6
- metadata.gz: 84f99f777be52faa2e8f702b64aef5965a63617f12e791def97ae4caf7468d0f08c82ab4a7f7f84aed9e4290054bcbc9eeac52f1ad1c1d605a8a34d3d8c5405b
7
- data.tar.gz: e62a5caf162502c4669c4739b42fab56510694e4ce03bf091b4aa924852080c42708cfa35acd353ac7ba787f1958b791b7c882ad72bbad7d1f4ccc425abc9034
6
+ metadata.gz: 13932bd78438d8db5e8d9dac2cd0e75aeadb9193e0f78dbe3b449525580f84f7040b14a3a4b70c2ff444233c989a05db12c5a6aa241dde28bd11b0ca525a0d4f
7
+ data.tar.gz: dfb5da92d991cc3312f289c13f760482ee1437c807fb0235b264d32380e2b2ce57e9d2af6abe3dd3d908bd5a1bc566649548cf93f69e1ca83127f3a1e078a706
data/README.md CHANGED
@@ -11,7 +11,6 @@ How to use my plugin.
11
11
  ```ruby
12
12
  gem 'tramway-admin'
13
13
  gem 'tramway-user'
14
- gem 'aasm'
15
14
  gem 'bcrypt'
16
15
  gem 'haml-rails'
17
16
  gem 'selectize-rails'
@@ -8,7 +8,7 @@
8
8
  = render 'tramway/core/shared/messages', object: @record_form
9
9
  .row
10
10
  .col-lg-12
11
- - if @record_form.class.is_react_component?
11
+ - if @record_form.class.react_component?
12
12
  = react_component "#{@record_form.class.name.gsub('::', '/')}", react_params(@record_form, action, method)
13
13
  - else
14
14
  = simple_form_for @record_form, url: { controller: :records, action: action, model: @record_form.model.class }, method: method, input_html: { class: 'form-horizontal' } do |f|
@@ -29,7 +29,8 @@
29
29
  %br
30
30
  %br
31
31
  .btn-group{ data: { toggle: :buttons } }
32
- - record.model.class.state_machines_names.each do |state_machine_name|
32
+ - state_machine_names = record.listed_state_machines || record.model.class.state_machines_names
33
+ - state_machine_names.each do |state_machine_name|
33
34
  - unless state_machine_name == 'default'
34
35
  = state_events_buttons record, state_method: state_machine_name, model_param_name: :record, controller: 'tramway/admin/records', action: :update, parameters: { redirect: current_model_records_path(page: params[:page], scope: params[:scope], filter: params[:filter], focus: focus_selector(index)), model: record.class.model_name }, button_options: { class: :smart_button }
35
36
  = paginate @records, theme: 'twitter-bootstrap-4'
@@ -5,8 +5,9 @@
5
5
  %td
6
6
  = link_to association_object.name, record_path(association_object.id, model: association.options[:class_name])
7
7
  - if association_object.model.class.state_machines_names.count > 1
8
+ - state_machine_names = association_object.listed_state_machines || association_object.model.class.state_machines_names
8
9
  %td
9
- - association_object.model.class.state_machines_names.each do |state_method|
10
+ - state_machine_names.each do |state_method|
10
11
  - unless state_method == 'default'
11
12
  = 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 }
12
13
  %td{ style: 'display: flex; justify-content: space-evenly' }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Admin
5
- VERSION = '4.1.1.5'
5
+ VERSION = '4.1.2.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: 4.1.1.5
4
+ version: 4.1.2.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-05-02 00:00:00.000000000 Z
11
+ date: 2022-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tramway-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.18.6
19
+ version: 4.1.3.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 1.18.6
26
+ version: 4.1.3.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: tramway-auth
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -331,7 +331,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
331
331
  - !ruby/object:Gem::Version
332
332
  version: '0'
333
333
  requirements: []
334
- rubygems_version: 3.2.3
334
+ rubygems_version: 3.1.6
335
335
  signing_key:
336
336
  specification_version: 4
337
337
  summary: Engine for admin