tramway-admin 2.1.0.2 → 2.1.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b04661941fd718463a77ca9d7d1ba31d1c1a5a9882a16640b501d70fcb2e1461
|
4
|
+
data.tar.gz: d7a75415b362ba8a3af46eb4f5beed8a76ab7f293105623edfa7788f4c5a9333
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73154a5f4b23b474571327bf947a930d21047e889a6f6cd3d53109df95f4fe327c2bd7b42dbdb4c6966945142fb9dbe47c68d85027405944d5775d8912125cf6
|
7
|
+
data.tar.gz: d1bd6d2ea3612ae4070dfa2bfa5aa0400039b173592629ee0b917aee91b94ea091c4b7e38fcb779d78c59499c392a74b83cf481ad1b4c0674c3895f8f0a8f8c3
|
@@ -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
|
})
|
@@ -1,16 +1,19 @@
|
|
1
|
-
- if object.class.show_associations.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
=
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
- if object.class.show_associations.nil?
|
2
|
+
= "Please, fill show associations method in decorator"
|
3
|
+
- else
|
4
|
+
- if object.class.show_associations.map(&:to_s).include? association.name.to_s
|
5
|
+
- association_type = association.class.to_s.split('::').last.sub(/Reflection$/, '').underscore.to_sym
|
6
|
+
%tr
|
7
|
+
%td
|
8
|
+
= model_class.human_attribute_name association.name
|
9
|
+
%hr
|
10
|
+
- if association_type != :has_one || !object.send(association.name).present?
|
11
|
+
= link_to "#{I18n.t('helpers.actions.add')} #{model_class.human_attribute_name(association.name).singularize.downcase}", new_associated_record_path(association: association, object: object, as: object.send("#{association.name}_as")), class: 'btn btn-primary'
|
12
|
+
%td{ colspan: 2 }
|
13
|
+
- if association_type.in? [ :has_one, :belongs_to ]
|
14
|
+
%table.table.table-striped.table-bordered
|
15
|
+
= render 'tramway/admin/shared/show/associations/table_row', object: object, association: association, association_object: object.send(association.name)
|
16
|
+
- else
|
17
|
+
%table.table.table-striped.table-bordered
|
18
|
+
- object.send(association.name)&.each do |association_object|
|
19
|
+
= render 'tramway/admin/shared/show/associations/table_row', object: object, association: association, association_object: association_object
|
@@ -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
|
-
-
|
10
|
-
|
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
|
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.
|
4
|
+
version: 2.1.2
|
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-
|
11
|
+
date: 2021-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tramway-core
|
@@ -310,7 +310,7 @@ files:
|
|
310
310
|
- lib/tramway/admin/tramway_model_helper.rb
|
311
311
|
- lib/tramway/admin/version.rb
|
312
312
|
- lib/tramway/admin/welcome_page_actions.rb
|
313
|
-
homepage: https://github.com/
|
313
|
+
homepage: https://github.com/purple-magic/tramway-admin
|
314
314
|
licenses:
|
315
315
|
- MIT
|
316
316
|
metadata: {}
|
@@ -329,7 +329,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
329
329
|
- !ruby/object:Gem::Version
|
330
330
|
version: '0'
|
331
331
|
requirements: []
|
332
|
-
rubygems_version: 3.1.
|
332
|
+
rubygems_version: 3.1.6
|
333
333
|
signing_key:
|
334
334
|
specification_version: 4
|
335
335
|
summary: Engine for admin
|