tramway-admin 1.6 → 1.6.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: 4fa0fea44dd6c194a226a07a0e3e452923729205ae2af50ca63f806ac4b27ee8
4
- data.tar.gz: 5186616e83cf9501af64046780161d10a8fc12005d71378b8ca362ed1f1d4f83
3
+ metadata.gz: 85f40db0710236d6072efbf9e0ed2cc655b2861b6ce35276c3df8566352cfd71
4
+ data.tar.gz: 65b02df783c8d36f489f4188fe3de3d9ebcaecacbe69b2e5321c48941300a414
5
5
  SHA512:
6
- metadata.gz: 5f9be9c38f89f4e06e53643132d79db09a321d07f4f99aa660487d76d46e40dea8141cf4c6040da4e08f9bb9e1ee6235ba0e060289c080cc23bd02de9c59539e
7
- data.tar.gz: c38a90985516d236cc72c96cda96ff922de383d3ac96da8a02078dcecf9f906cae3943eea31e1c66e393409205f8b745c2ff2a04b303c10dc296ed24b6366658
6
+ metadata.gz: 8fe7466d4c08627f24cce44ff8420f23612338c58992ca35ebedc1f4b05178d88e42e4ec2a6fa376b30335e5bef4308e55f741a85c8b33b2ea67dc40c1a90107
7
+ data.tar.gz: d8728ed473167a901ed41ba072efd369a6f4e9272f8f81499f3987740f48f0527e32415f883607549bbaee6785227f3ce04ee5c55b9684f19e536c6f3203156e
@@ -10,3 +10,5 @@
10
10
  .container
11
11
  padding-top: 2rem
12
12
 
13
+ td.actions
14
+ width: 8rem
@@ -1,5 +1,5 @@
1
1
  = paginate @records, theme: 'twitter-bootstrap-4'
2
- %table.table.table-condensed.table-hover
2
+ %table.table.table-striped.table-bordered
3
3
  %thead
4
4
  %tr
5
5
  %th= model_class.human_attribute_name(:id)
@@ -1,7 +1,7 @@
1
1
  - default_page_title ||= nil; on_site_link ||= nil
2
2
  - current_title = default_page_title || model_class.model_name.human.pluralize(:ru)
3
3
  - title current_title
4
-
4
+ - object_type = ::Tramway::Admin.available_models_for(@application_engine).include?(object.class) ? :record : :singleton
5
5
  = content_for :sidebar do
6
6
  - buttons = ::Tramway::Admin.additional_buttons(record: object.model.class.to_s, view: :show)
7
7
  - if buttons
@@ -12,7 +12,8 @@
12
12
  .col-md-6
13
13
  %h2
14
14
  = current_title
15
- = link_to fa_icon(:pencil), edit_current_model_singleton_path, class: 'btn btn-warning btn-xs'
15
+ - edit_path = object_type == :singleton ? edit_current_model_singleton_path : edit_current_model_record_path(object.id)
16
+ = link_to fa_icon(:pencil), edit_path, class: 'btn btn-warning btn-xs'
16
17
  %hr
17
18
  .row
18
19
  %table.table.table-striped.table-bordered
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Admin
3
- VERSION = '1.6'
3
+ VERSION = '1.6.1'
4
4
  end
5
5
  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: '1.6'
4
+ version: 1.6.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: 2018-10-07 00:00:00.000000000 Z
11
+ date: 2018-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap-kaminari-views