tramway-admin 1.4 → 1.5
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: dd0e10fbb7082bbc3f96167efe408d6b0f8155217e8d3cdc90580e334b1517b4
|
4
|
+
data.tar.gz: d4b07758fd9edc84474cb48fe7cb36710c34a50a9dd6325656e31021c68343dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: deecac04f5293e8dd199ccd91e3a35bfed6ebf949427977bf12a239eb82654b327f747a63e7b628881688f1998c6c869ab5885e7438891313fdfd287f855b5ac
|
7
|
+
data.tar.gz: df5736c254a52accfc11e511dea50e27c3d1f705c6581e1fd42d2da2e5a1d5f7192496c6f0c9bf62a57600c729e347021ffc5be3357f77897aee1861870f4326
|
@@ -1,22 +1 @@
|
|
1
|
-
|
2
|
-
- current_title = default_page_title || model_class.model_name.human.pluralize(:ru)
|
3
|
-
- title current_title
|
4
|
-
.page-header
|
5
|
-
.row
|
6
|
-
.col-md-6
|
7
|
-
%h1
|
8
|
-
= current_title
|
9
|
-
= link_to fa_icon(:pencil), edit_current_model_record_path(@record.id), class: 'btn btn-warning btn-xs'
|
10
|
-
= ::Tramway::Admin.additional_buttons(record: @record.model.model_name, view: :show, project: @application_engine)
|
11
|
-
%hr
|
12
|
-
.row
|
13
|
-
%table.table.table-striped.table-bordered
|
14
|
-
- @record.attributes.each do |attribute_name, value|
|
15
|
-
%tr
|
16
|
-
%td
|
17
|
-
= model_class.human_attribute_name attribute_name
|
18
|
-
%td
|
19
|
-
= value
|
20
|
-
%td
|
21
|
-
- if attribute_name != 'state' && @record.model.class.state_machines.keys.include?(attribute_name.to_sym)
|
22
|
-
= state_events_buttons @record, state_method: attribute_name, model_param_name: :record, route_method: :current_model_record_path
|
1
|
+
= render 'tramway/admin/shared/show', object: @record
|
@@ -0,0 +1,39 @@
|
|
1
|
+
- default_page_title ||= nil; on_site_link ||= nil
|
2
|
+
- current_title = default_page_title || model_class.model_name.human.pluralize(:ru)
|
3
|
+
- title current_title
|
4
|
+
|
5
|
+
= content_for :sidebar do
|
6
|
+
- buttons = ::Tramway::Admin.additional_buttons(record: object.model.class.to_s, view: :show)
|
7
|
+
- if buttons
|
8
|
+
.btn-group-vertical
|
9
|
+
= build_buttons buttons
|
10
|
+
.page-header
|
11
|
+
.row
|
12
|
+
.col-md-6
|
13
|
+
%h2
|
14
|
+
= current_title
|
15
|
+
= link_to fa_icon(:pencil), edit_current_model_singleton_path, class: 'btn btn-warning btn-xs'
|
16
|
+
%hr
|
17
|
+
.row
|
18
|
+
%table.table.table-striped.table-bordered
|
19
|
+
- object.attributes.each do |attribute_name, value|
|
20
|
+
%tr
|
21
|
+
%td
|
22
|
+
= model_class.human_attribute_name attribute_name
|
23
|
+
%td
|
24
|
+
= value
|
25
|
+
%td
|
26
|
+
- if attribute_name != 'state' && object.model.class.state_machines.keys.include?(attribute_name.to_sym)
|
27
|
+
= state_events_buttons object, state_method: attribute_name, model_param_name: :record, route_method: :current_model_record_path
|
28
|
+
- object.associations.each do |association|
|
29
|
+
%tr
|
30
|
+
%td
|
31
|
+
= model_class.human_attribute_name association.name
|
32
|
+
%td{ colspan: 2 }
|
33
|
+
%table.table.table-striped.table-bordered
|
34
|
+
- object.send(association.name).each do |association_object|
|
35
|
+
%tr
|
36
|
+
%td
|
37
|
+
= association_object.id
|
38
|
+
%td
|
39
|
+
= association_object.name
|
@@ -1,22 +1 @@
|
|
1
|
-
|
2
|
-
- current_title = default_page_title || model_class.model_name.human.pluralize(:ru)
|
3
|
-
- title current_title
|
4
|
-
|
5
|
-
= content_for :sidebar do
|
6
|
-
.btn-group-vertical
|
7
|
-
= build_buttons ::Tramway::Admin.additional_buttons(record: @singleton.model.class.to_s, view: :show)
|
8
|
-
.page-header
|
9
|
-
.row
|
10
|
-
.col-md-6
|
11
|
-
%h2
|
12
|
-
= current_title
|
13
|
-
= link_to fa_icon(:pencil), edit_current_model_singleton_path, class: 'btn btn-warning btn-xs'
|
14
|
-
%hr
|
15
|
-
.row
|
16
|
-
%table.table.table-striped.table-bordered
|
17
|
-
- @singleton.attributes.each do |attribute_name, value|
|
18
|
-
%tr
|
19
|
-
%td
|
20
|
-
= model_class.human_attribute_name attribute_name
|
21
|
-
%td
|
22
|
-
= value
|
1
|
+
= render 'tramway/admin/shared/show', object: @singleton
|
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.
|
4
|
+
version: '1.5'
|
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-
|
11
|
+
date: 2018-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootstrap-kaminari-views
|
@@ -228,6 +228,7 @@ files:
|
|
228
228
|
- app/views/tramway/admin/records/new.html.haml
|
229
229
|
- app/views/tramway/admin/records/show.html.haml
|
230
230
|
- app/views/tramway/admin/shared/_input.html.haml
|
231
|
+
- app/views/tramway/admin/shared/_show.html.haml
|
231
232
|
- app/views/tramway/admin/singletons/_form.html.haml
|
232
233
|
- app/views/tramway/admin/singletons/edit.html.haml
|
233
234
|
- app/views/tramway/admin/singletons/new.html.haml
|