carload 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d5d1d3a7f3e97896ff9b45fa30f927c1a756c296
4
- data.tar.gz: 46caa37af3202cadadf73b9fc0bdaaab897fd836
3
+ metadata.gz: 27c766c088ec3ce8edf1f94edecf2ca14c091172
4
+ data.tar.gz: 909bab7cde408385c93317086496b3baeb59648a
5
5
  SHA512:
6
- metadata.gz: 3f34d338ed639ed46ffdd1a12b88a5a1968db40000e570342ac3918e550238408a4d5cd44501fab8c2f51546aeb8cd8af6134397ce6301a0164773ccdaedbb19
7
- data.tar.gz: 7d3d656a076f377364a49ff78aa853108a7369f95ca43e1aab7ef3d8604ada87e7156379a404c28215ee38077f9f6511432aac80a88ba72a413c8aec9a7ea291
6
+ metadata.gz: d1fb953e0b3423fac7174e6963c49d015c59822124734873f18c43a0fc17ac013a995a331372f0dcd1de4e12eec106480716474d92b7957c904b29f216a1f79f
7
+ data.tar.gz: 58fb0ab76ade1d958c40eaae712b14f9b3cb7b75f38f9e515185913b6776ca6436a29471f4d2af5d9bc7b9ccb0b98b1f89248b78e79e58f904d158b9adce47be
@@ -16,6 +16,7 @@
16
16
  */
17
17
 
18
18
  $spacing: 16px;
19
+ $half-spacing: 8px;
19
20
 
20
21
  @import 'bootstrap-sprockets';
21
22
  @import 'bootstrap';
@@ -81,3 +81,11 @@ th {
81
81
  .label-primary {
82
82
  background-color: $main-color;
83
83
  }
84
+
85
+ ul.horizontal-clean-list {
86
+ -webkit-padding-start: 0;
87
+ li {
88
+ display: inline-block;
89
+ margin-right: $half-spacing;
90
+ }
91
+ }
@@ -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
- <%= raw Carload.page.footer || t('carload.footer.message') %>
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
 
@@ -19,6 +19,12 @@ en:
19
19
  placeholder:
20
20
  select: Select %{thing}
21
21
 
22
+ config:
23
+ show: View config
24
+ title: Carload configuration list
25
+ key: Configuration name
26
+ value: Configuration value
27
+
22
28
  error:
23
29
  title:
24
30
  dashboard: Encounter web operation error!
@@ -19,6 +19,12 @@ zh-CN:
19
19
  placeholder:
20
20
  select: 请选择%{thing}
21
21
 
22
+ config:
23
+ show: 查看配置
24
+ title: Carload配置列表
25
+ key: 配置名称
26
+ value: 配置值
27
+
22
28
  error:
23
29
  title:
24
30
  dashboard: 遇到操作错误!
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
@@ -1,3 +1,3 @@
1
1
  module Carload
2
- VERSION = '0.4.3'
2
+ VERSION = '0.4.4'
3
3
  end
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.3
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