tramway-admin 1.20.2.4 → 1.20.3

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: b5506fc9b7fda0cb381cca7c53c0c8ec2f619842c68c6e76e4a53a1c572c60ce
4
- data.tar.gz: 63c23ac24b142ab7ee8491459b9e81a5438f4cd0c048ebfaaa558a14a970111d
3
+ metadata.gz: cb01a97126046445dc8cad97bf599ccfba88834d79fcc81f3d4fb9c69dfb88c2
4
+ data.tar.gz: a721e3e880cb80a0aa1f4de92ec69a0700acabe37a9d9079c48d192066422850
5
5
  SHA512:
6
- metadata.gz: f7a43f33273870a19570f6a8368c71f64ed01e479724a203a6de02a5f41ed033fe44b216d497f5bc6d262697c0c3df1ea73e5da545ba112aa27aa22002089aeb
7
- data.tar.gz: 11aabe89945d0b2b1f0f2a55b7faee6801a985508f1eb6d5a0a5e3501d560ce4170ca8e83d6d1dfc40c255e0b9c0b2eb2a92d7e4deee65c8ae023a0bbef4af19
6
+ metadata.gz: 8814ec26d243b314ebe174098446905ebaaf95c1c4cf334f537e4edb14449fd3edbc78568a2e1a168d9121cbed29122d2037379306cc85698b25b25447f3188c
7
+ data.tar.gz: 5900f6be25d35c92632a22a55ba83fc19c71365da52508f7443a3f9cf1f82920874e1f5571e7d2f8fcb016a34f7f0635ac5c6ea39e531841e15e37a22f9937ab
data/README.md CHANGED
@@ -31,6 +31,7 @@ gem 'bootstrap-kaminari-views', github: 'kalashnikovisme/bootstrap-kaminari-view
31
31
  gem 'state_machine_buttons'
32
32
  gem 'ckeditor', '4.2.4'
33
33
  gem 'ransack'
34
+ gem 'smart_buttons'
34
35
  ```
35
36
 
36
37
  You should remove gem `turbolinks` from your application
@@ -1,3 +1,5 @@
1
+ #= require jquery
2
+ #= require jquery_ujs
1
3
  #= require bootstrap-sprockets
2
4
  #= require ckeditor/init
3
5
  #= require selectize
@@ -22,3 +22,7 @@ td.actions
22
22
  margin-right: 25px
23
23
  span.badge:hover
24
24
  filter: brightness(90%)
25
+
26
+ .smart_button
27
+ float: right
28
+ margin-bottom: 0
@@ -6,6 +6,7 @@ module Tramway
6
6
  include ::FontAwesome5::Rails::IconHelper
7
7
  include AuthManagement
8
8
  include AdditionalButtonsBuilder
9
+ include SmartButtons
9
10
  include CasesHelper
10
11
  include RussianCasesHelper
11
12
  include ::Tramway::Admin::RecordsHelper
@@ -19,11 +19,12 @@
19
19
  = record.send attribute
20
20
  %td.actions
21
21
  = link_to fa_icon('pencil-alt'), edit_current_model_record_path(record.id), class: 'btn btn-warning btn-xs'
22
- = link_to fa_icon('trash-alt'), current_model_record_path(record.id), method: :delete, class: 'btn btn-xs btn-danger'
22
+ = delete_button url: current_model_record_path(record.id), form_options: { class: :smart_button }, button_options: { class: 'btn btn-xs btn-danger' } do
23
+ = fa_icon 'trash-alt'
23
24
  %br
24
25
  %br
25
26
  .btn-group{ data: { toggle: :buttons } }
26
27
  - record.model.class.state_machines.keys.each do |state_method|
27
28
  - unless state_method == :state
28
- = state_events_buttons record, state_method: state_method, model_param_name: :record, route_method: :current_model_record_path, parameters: { redirect: current_model_records_path(page: params[:page], scope: params[:scope], focus: focus_selector(index)) }
29
+ = state_events_buttons record, state_method: state_method, model_param_name: :record, controller: 'tramway/admin/records', action: :update, parameters: { redirect: current_model_records_path(page: params[:page], scope: params[:scope], focus: focus_selector(index)), model: record.class.model_name }, button_options: { class: :smart_button }
29
30
  = paginate @records, theme: 'twitter-bootstrap-4'
@@ -5,4 +5,4 @@
5
5
  = value
6
6
  %td
7
7
  - if attribute_name.to_s != '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
8
+ = state_events_buttons object, state_method: attribute_name, model_param_name: :record, controller: 'tramway/admin/records', action: :update, parameters: { model: object.class.model_name }, button_options: { class: :smart_button }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Admin
5
- VERSION = '1.20.2.4'
5
+ VERSION = '1.20.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.20.2.4
4
+ version: 1.20.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
@@ -118,20 +118,28 @@ dependencies:
118
118
  requirements:
119
119
  - - ">="
120
120
  - !ruby/object:Gem::Version
121
- version: 0.4.1
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: 0.4.1
121
+ version: '1.0'
125
122
  type: :runtime
126
123
  prerelease: false
127
124
  version_requirements: !ruby/object:Gem::Requirement
128
125
  requirements:
129
126
  - - ">="
130
127
  - !ruby/object:Gem::Version
131
- version: 0.4.1
132
- - - "~>"
128
+ version: '1.0'
129
+ - !ruby/object:Gem::Dependency
130
+ name: smart_buttons
131
+ requirement: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - ">="
134
+ - !ruby/object:Gem::Version
135
+ version: '1.0'
136
+ type: :runtime
137
+ prerelease: false
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - ">="
133
141
  - !ruby/object:Gem::Version
134
- version: 0.4.1
142
+ version: '1.0'
135
143
  description: Engine for admin
136
144
  email:
137
145
  - kalashnikovisme@gmail.com