carload 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/carload/application.scss +1 -0
- data/app/assets/stylesheets/carload/common.scss +8 -0
- data/app/controllers/carload/dashboard_controller.rb +4 -1
- data/app/views/carload/dashboard/show_config.html.erb +23 -0
- data/app/views/layouts/carload/dashboard.html.erb +9 -1
- data/config/locales/en.yml +6 -0
- data/config/locales/zh-CN.yml +6 -0
- data/config/routes.rb +1 -0
- data/lib/carload/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27c766c088ec3ce8edf1f94edecf2ca14c091172
|
4
|
+
data.tar.gz: 909bab7cde408385c93317086496b3baeb59648a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1fb953e0b3423fac7174e6963c49d015c59822124734873f18c43a0fc17ac013a995a331372f0dcd1de4e12eec106480716474d92b7957c904b29f216a1f79f
|
7
|
+
data.tar.gz: 58fb0ab76ade1d958c40eaae712b14f9b3cb7b75f38f9e515185913b6776ca6436a29471f4d2af5d9bc7b9ccb0b98b1f89248b78e79e58f904d158b9adce47be
|
@@ -6,7 +6,7 @@ module Carload
|
|
6
6
|
rescue_from ActionView::MissingTemplate, with: :rescue_missing_template
|
7
7
|
rescue_from Carload::UnmanagedModelError, with: :rescue_unmanaged_model_error
|
8
8
|
|
9
|
-
before_action :set_model
|
9
|
+
before_action :set_model, except: [:config]
|
10
10
|
before_action :set_object, only: [:edit, :update, :destroy]
|
11
11
|
before_action :transform_polymorphic_params, only: [:create, :update]
|
12
12
|
|
@@ -69,6 +69,9 @@ module Carload
|
|
69
69
|
index
|
70
70
|
end
|
71
71
|
|
72
|
+
def show_config
|
73
|
+
end
|
74
|
+
|
72
75
|
private
|
73
76
|
|
74
77
|
def set_model
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<div class='panel panel-default'>
|
2
|
+
<div class='panel-heading center'>
|
3
|
+
<%= t('carload.config.title') %>
|
4
|
+
</div>
|
5
|
+
<div class='panel-body'>
|
6
|
+
<table class='table table-striped'>
|
7
|
+
<thead>
|
8
|
+
<tr>
|
9
|
+
<th width='100'><%= t('carload.config.key') %></th>
|
10
|
+
<th width='100'><%= t('carload.config.value') %></th>
|
11
|
+
</tr>
|
12
|
+
</thead>
|
13
|
+
<tbody>
|
14
|
+
<% ['page.title', 'page.footer', 'page.main_color', 'page.text_color', 'page.button_color', 'page.button_text_color', 'auth_solution', 'upload_solution', 'search_engine', 'dashboard.permits_user.all'].each do |key| %>
|
15
|
+
<tr>
|
16
|
+
<td><%= key %></td>
|
17
|
+
<td><%= eval "Carload.#{key}" %></td>
|
18
|
+
</tr>
|
19
|
+
<% end %>
|
20
|
+
</tbody>
|
21
|
+
</table>
|
22
|
+
</div>
|
23
|
+
</div>
|
@@ -25,7 +25,15 @@
|
|
25
25
|
</div>
|
26
26
|
|
27
27
|
<footer class='center'>
|
28
|
-
|
28
|
+
<ul class='horizontal-clean-list'>
|
29
|
+
<li><%= raw Carload.page.footer || t('carload.footer.message') %></li>
|
30
|
+
<li>
|
31
|
+
<ul class='horizontal-clean-list'>
|
32
|
+
<li><%= link_to fa_icon('gears'), dashboard_show_config_path %></li>
|
33
|
+
<li><%= link_to fa_icon('github'), 'https://github.com/dongli/carload' %></li>
|
34
|
+
</ul>
|
35
|
+
</li>
|
36
|
+
</ul>
|
29
37
|
</footer>
|
30
38
|
</div>
|
31
39
|
|
data/config/locales/en.yml
CHANGED
data/config/locales/zh-CN.yml
CHANGED
data/config/routes.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
Carload::Engine.routes.draw do
|
2
2
|
root 'dashboard#index'
|
3
3
|
|
4
|
+
get 'dashboard/config' => 'dashboard#show_config', as: :dashboard_show_config
|
4
5
|
get 'dashboard(/:model)' => 'dashboard#index', as: :dashboard_index
|
5
6
|
match 'dashboard/:model/search' => 'dashboard#search', as: :dashboard_search, via: [:get, :post]
|
6
7
|
get 'dashboard/:model/new' => 'dashboard#new', as: :dashboard_new
|
data/lib/carload/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Li Dong
|
@@ -274,6 +274,7 @@ files:
|
|
274
274
|
- app/views/carload/dashboard/new.html.erb
|
275
275
|
- app/views/carload/dashboard/shared/_index_buttons.html.erb
|
276
276
|
- app/views/carload/dashboard/shared/_search_fields.html.erb
|
277
|
+
- app/views/carload/dashboard/show_config.html.erb
|
277
278
|
- app/views/carload/errors/dashboard_error.html.erb
|
278
279
|
- app/views/carload/errors/unauthorized_error.html.erb
|
279
280
|
- app/views/kaminari/_first_page.html.erb
|