tramway-admin 2.1.1 → 2.1.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: efe8998e6d28614e1a7bf88a24ac91cd9635c807db0b1f14c912df66c94bf663
4
- data.tar.gz: 4f142c6de6479a892b88b60a29017c7cf791e0c2943e1c8fbb0b038ff279e93c
3
+ metadata.gz: 5070e71c71aebabe975e9a8a0c426b5ce209f0b23720a10d1fc789a11c6b83db
4
+ data.tar.gz: 7abb507822d7a1f4cb80593a40ef1a616a072fdc124142ef0e430391e3ec4477
5
5
  SHA512:
6
- metadata.gz: f1187272662360971342253d641daf9b8ab27e218bea93f68b7dda3505bd791ad1d38872c18aea7fa607e8bf1be9d2b1bb4fe1ea4d8fdce96834d4262d66df46
7
- data.tar.gz: 53b6d3b617ebbf6b53747d6e56b523fe252466654847902b2735a05969a4a23ff95af6ae08537426ccd46c3471ecaf95fd889ea34e8146b3eb57a7c1a6bb417b
6
+ metadata.gz: 36324047630459336866d9fd4bde04421d23307ef60c391c7467e894d3a7ac2bc3c8ab99e73f3ce664b248e767ddd5394cd54d2bb7752245f03aaf317967cef6
7
+ data.tar.gz: 46f856085c47f38907267eef00928b7473993de8cdf9b01cb75264be9e7e97b07223b6b75e9ae17e0e7c6d474a145f8be5e97fddb515332846cd9bd42c00eaba
@@ -1,7 +1,6 @@
1
1
  //= require tramway/core/application
2
2
  //= require jquery
3
3
  //= require jquery_ujs
4
- //= require popper
5
4
  //= require bootstrap-sprockets
6
5
  //= require ckeditor/init
7
6
  //= require selectize
@@ -10,4 +9,7 @@
10
9
 
11
10
  $(document).ready(function() {
12
11
  let clipboard = new Clipboard('.clipboard-btn');
12
+ $(function () {
13
+ $('[data-toggle="popover"]').popover()
14
+ })
13
15
  })
@@ -9,7 +9,7 @@ class Tramway::Admin::RecordsController < ::Tramway::Admin::ApplicationControlle
9
9
  if params[:filter].is_a? String
10
10
  params[:filter] = JSON.parse params[:filter]
11
11
  end
12
- records = records.ransack(params[:filter]).result
12
+ records = records.ransack(params[:filter]).result(distinct: true)
13
13
  end
14
14
  params[:list_filters]&.each do |filter, value|
15
15
  case decorator_class.list_filters[filter.to_sym][:type]
@@ -1,4 +1,3 @@
1
- - association_state_machines = object.send("#{association.name}_state_machines")
2
1
  - if (!association_object.is_a?(Array) || !association_object.empty?) && association_object.present?
3
2
  %tr{ id: "#{association.name}_#{association_object.id}" }
4
3
  %td
@@ -6,8 +5,9 @@
6
5
  %td
7
6
  = link_to association_object.name, record_path(association_object.id, model: association.options[:class_name])
8
7
  %td
9
- - association_state_machines.each do |state_method|
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 }
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
11
  %td
12
12
  - if update_is_available? association_object, object
13
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Admin
5
- VERSION = '2.1.1'
5
+ VERSION = '2.1.3'
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: 2.1.1
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-27 00:00:00.000000000 Z
11
+ date: 2021-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tramway-core