tramway-admin 1.26 → 1.26.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +34 -0
- data/app/views/tramway/admin/shared/show/_associations.html.haml +1 -1
- data/lib/tramway/admin/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75ba7ea302dbcf40204001ef1b1c4da36d8770e03e9ddc66003599675a3dfc60
|
4
|
+
data.tar.gz: 90dcc8b1b71bc8736f355fb460f66262ce3068bbf7781470215901c28902a18e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdcb05da2908890b5febaaedc3fc5766126a3713d323d88f664eccb950b539af3850af9437aa77933a80993a2b1d65ff03d463388f9499cfea0956b8545f8c74
|
7
|
+
data.tar.gz: 9f436e8682481b4ecfd29ce785317fb2b192d939881b04708578db204ccc701e14ed2ad70a25c6cbb0d28319da325eb2d6597ac40c9d76db58c265fed55890dd
|
data/README.md
CHANGED
@@ -148,6 +148,40 @@ Example:
|
|
148
148
|
end
|
149
149
|
```
|
150
150
|
|
151
|
+
## Navbar management
|
152
|
+
|
153
|
+
### Navbar structure
|
154
|
+
|
155
|
+
You can manage your navbar easy
|
156
|
+
|
157
|
+
*config/initializers/tramway.rb*
|
158
|
+
```ruby
|
159
|
+
Tramway::Admin.navbar_structure(
|
160
|
+
YourModel, # this line will create first-level link in your navbar, which will send you to the YourModel management
|
161
|
+
{
|
162
|
+
my_dropdown: [ # this line contains dropdown link name
|
163
|
+
AnotherYourModel # this line will create 2nd-level link in your navbar, which will send you to the YourModel management,
|
164
|
+
:divider # this line adds bootstrap divider to the dropdown list
|
165
|
+
]
|
166
|
+
}
|
167
|
+
)
|
168
|
+
```
|
169
|
+
|
170
|
+
**NOTE:** navbar structure is the same for all roles, but users will see only available models for them
|
171
|
+
|
172
|
+
### Dropdown localization
|
173
|
+
|
174
|
+
To set human-read name for dropdown link you can use i18n:
|
175
|
+
|
176
|
+
*config/locales/admin.yml*
|
177
|
+
|
178
|
+
```yaml
|
179
|
+
en:
|
180
|
+
admin:
|
181
|
+
navbar:
|
182
|
+
links:
|
183
|
+
my_dropdown: Very important dropdown
|
184
|
+
```
|
151
185
|
|
152
186
|
## Contributing
|
153
187
|
Contribution directions go here.
|
@@ -18,5 +18,5 @@
|
|
18
18
|
= 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 }
|
19
19
|
%td
|
20
20
|
- if ::Tramway::Admin.action_is_available?(association_object, project: (@application_engine || @application.name), model: association_object.model.class, role: current_user.role, action: :destroy)
|
21
|
-
= delete_button url: record_path(association_object.id, model: association.options[:class_name], redirect: current_model_record_path(object.id)), button_options: { class: 'btn btn-xs btn-danger' } do
|
21
|
+
= delete_button url: record_path(association_object.id, model: association.options[:class_name], redirect: current_model_record_path(object.id)), button_options: { class: 'btn btn-xs btn-danger delete' } do
|
22
22
|
= fa_icon 'trash-alt'
|
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:
|
4
|
+
version: 1.26.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: 2020-02-
|
11
|
+
date: 2020-02-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootstrap-kaminari-views
|