wallaby 6.1.0 → 6.1.1

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
  SHA256:
3
- metadata.gz: bf461ecdd7f1605b7a79e4440e7b9b7f2bbe24aac0389252633cc5afc22f15de
4
- data.tar.gz: 4d6357a2e6c241e382769b39e8ad26acae965210e2ff0ab3bc89c4e187ac9d72
3
+ metadata.gz: 1f7abdcdde877c817216d2a8d14784843ec2310ce33ca9b68f728a7aef905894
4
+ data.tar.gz: 51ebc679c153d6a7c51e6d95d47e2d748b6ae922a9dc34146e262aa5de1e1ea6
5
5
  SHA512:
6
- metadata.gz: 43add18799226503ac25d194ad88df0f251c262eaab54e0fc7a25cd7c14d519eaf9cb390569a8b0737267ccb46356f44ba940c1b615f4461ed910dfaccbd6899
7
- data.tar.gz: 72fa73cdf02ecb7efe8875b819cdcdb70b3cd76cf8f172bf4f7517723408882e2a4869727dd741ee4eb0b0fe58c83c623ea40c377fbd3d29bacb690fe948ef56
6
+ metadata.gz: adce40822c23e8a7ad741736b1570798807c63d1fe72d321c157faf1153458cea35a2327761ba77f73050581009e4528305696115000a2d73492eab02586e419
7
+ data.tar.gz: a3b4ef4ebd8ae855d59937f2c50079afa807cb0aee4d8d32aad60d09c3ef8e8c20f3e932fc66c17b181cee8a960f05e04fff4b3a6dc05cf5bb5f3e3c1fc6fc69
@@ -8,5 +8,5 @@
8
8
  <% decorated.form_field_names.each do |field_name| %>
9
9
  <%= type_render decorated.form_type_of(field_name), field_name: field_name, form: form %>
10
10
  <% end %>
11
- <%= form.button t('buttons.save'), class: 'btn btn-primary' %>
11
+ <%= form.button wt('buttons.save'), class: 'btn btn-primary' %>
12
12
  <%= cancel_link html_options: { class: 'btn btn-default' } %>
@@ -8,7 +8,7 @@ filter = filter_name_by params[:filter], filters
8
8
  <%= filter_label(filter, filters) || all_label %>
9
9
  </a>
10
10
  <ul class="dropdown-menu" aria-labelledby="all_filters">
11
- <li><em><%= t 'filters.title' %></em></li>
11
+ <li><em><%= wt 'filters.title' %></em></li>
12
12
  <% filters.keys.unshift(:all).each do |filter_name| %>
13
13
  <%= content_tag :li, filter_link(current_model_class, filter_name, filters: filters), { class: filter.to_s == filter_name.to_s && 'filters--current' } %>
14
14
  <% end %>
@@ -1,11 +1,11 @@
1
1
  <% if current_paginator.try(:paginatable?) %>
2
2
  <%
3
3
  # Get variables ready for use
4
- from_to = t 'pagination.from_to', from: current_paginator.from, to: current_paginator.to
5
- of = t 'pagination.of'
6
- total_count = t 'pagination.total_count', total: current_paginator.total
7
- pers_title = t 'pagination.pers'
8
- pages_title = t 'pagination.pages'
4
+ from_to = wt 'pagination.from_to', from: current_paginator.from, to: current_paginator.to
5
+ of = wt 'pagination.of'
6
+ total_count = wt 'pagination.total_count', total: current_paginator.total
7
+ pers_title = wt 'pagination.pers'
8
+ pages_title = wt 'pagination.pages'
9
9
  %>
10
10
  <nav class="pagination">
11
11
  <span class="pagination__metadata">
@@ -14,7 +14,7 @@
14
14
  <%= from_to %>
15
15
  </a>
16
16
  <ul class="dropdown-menu" aria-labelledby="all_pers">
17
- <li><em><%= t 'pagination.pers' %></em></li>
17
+ <li><em><%= wt 'pagination.pers' %></em></li>
18
18
  <% Wallaby::PERS.each do |per| %>
19
19
  <%= content_tag :li, class: current_paginator.page_size == per && 'pagination__pers--current' do %>
20
20
  <%= index_link(current_model_class, url_params: { per: per, with_query: true }) { per.to_s } %>
@@ -22,7 +22,7 @@
22
22
  <% end %>
23
23
  </ul>
24
24
  </span>
25
- <%= t 'pagination.of' %>
25
+ <%= wt 'pagination.of' %>
26
26
  <span class="pagination__pages">
27
27
  <a id="all_pages" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
28
28
  <%= total_count %>
@@ -32,7 +32,7 @@
32
32
  <%= hidden_field_tag key, value %>
33
33
  <% end %>
34
34
  <label for="page_number">
35
- <%= t 'pagination.pages' %>
35
+ <%= wt 'pagination.pages' %>
36
36
  </label>
37
37
  <%= number_field_tag 'page', current_paginator.page_number, id: 'page_number' %>
38
38
  <% end %>
@@ -40,12 +40,12 @@
40
40
  </span>
41
41
  <% if current_paginator.prev_page? # has prev page %>
42
42
  <span>
43
- <%= index_link(current_model_class, url_params: { page: current_paginator.prev_page_number, with_query: true }) { t 'pagination.prev' } %>
43
+ <%= index_link(current_model_class, url_params: { page: current_paginator.prev_page_number, with_query: true }) { wt 'pagination.prev' } %>
44
44
  </span>
45
45
  <% end %>
46
46
  <% if current_paginator.next_page? # has next page %>
47
47
  <span>
48
- <%= index_link(current_model_class, url_params: { page: current_paginator.next_page_number, with_query: true }) { t 'pagination.next' } %>
48
+ <%= index_link(current_model_class, url_params: { page: current_paginator.next_page_number, with_query: true }) { wt 'pagination.next' } %>
49
49
  </span>
50
50
  <% end %>
51
51
  </nav>
@@ -10,7 +10,7 @@
10
10
  <%= hidden_field_tag key, value %>
11
11
  <% end %>
12
12
  <label for="q">
13
- <%= text_field_tag :q, params[:q], placeholder: t('search.hint') %>
13
+ <%= text_field_tag :q, params[:q], placeholder: wt('search.hint') %>
14
14
  </label>
15
15
  <% end %>
16
16
  <% end %>
@@ -4,6 +4,6 @@
4
4
  decorated = decorate resource
5
5
  json.error do
6
6
  json.code 400
7
- json.message t('json_errors.bad_request')
7
+ json.message wt('json_errors.bad_request')
8
8
  json.errors decorated.errors
9
9
  end
@@ -4,7 +4,7 @@ decorated = decorate resource
4
4
  %>
5
5
  <article class="resource">
6
6
  <div class="resource__header">
7
- <h1><%= t 'labels.edit', id: decorated.id %></h1>
7
+ <h1><%= wt 'labels.edit', id: decorated.id %></h1>
8
8
  <%= render 'resource_navs' %>
9
9
  </div>
10
10
  <%= render 'flash_messages' %>
@@ -7,11 +7,11 @@
7
7
  <div class="card-body">
8
8
  <h1 class="card-title">
9
9
  <em><%= @code %></em>
10
- <span><%= t "http_errors.#{@symbol}" %></span>
10
+ <span><%= wt "http_errors.#{@symbol}" %></span>
11
11
  </h1>
12
12
  <p class="card-text">
13
13
  <% if @code >= 500 && @code != 501 %>
14
- <%= t "http_errors.report_error_html" %>
14
+ <%= wt "http_errors.report_error_html" %>
15
15
  <% else %>
16
16
  <%= @exception.try(:message) || flash[:alert] %>
17
17
  <% end %>
@@ -5,6 +5,6 @@ json.error do
5
5
  if @code < 500 && @exception.present?
6
6
  json.message @exception.message
7
7
  else
8
- json.message t("json_errors.#{@symbol}")
8
+ json.message wt("json_errors.#{@symbol}")
9
9
  end
10
10
  end
@@ -18,7 +18,7 @@ The following params are the variables that can be used in this partial.
18
18
  <div class="col-sm-12">
19
19
  <%= form.label field_name, class: 'btn btn-default' do %>
20
20
  <%= form.file_field field_name, class: 'sr-only' %>
21
- <%= fa_icon 'upload' %> <%= t 'labels.upload' %>
21
+ <%= fa_icon 'upload' %> <%= wt 'labels.upload' %>
22
22
  <% end %>
23
23
  </div>
24
24
  </div>
@@ -34,7 +34,7 @@ readonly = metadata[:class] && unauthorized?(:edit, metadata[:class])
34
34
  </div>
35
35
  <% end %>
36
36
  <div class="col-6 col-sm-4">
37
- <%= form.text_field metadata[:foreign_key], value: nil, class: 'form-control', placeholder: t('labels.auto_select_hint') %>
37
+ <%= form.text_field metadata[:foreign_key], value: nil, class: 'form-control', placeholder: wt('labels.auto_select_hint') %>
38
38
  </div>
39
39
  </div>
40
40
  <div class="row">
@@ -13,7 +13,7 @@ The following params are the variables that can be used in this partial.
13
13
  <div class="col-sm-12">
14
14
  <%= form.label field_name, class: 'btn btn-default' do %>
15
15
  <%= form.file_field field_name, class: 'sr-only' %>
16
- <%= fa_icon 'upload' %> <%= t 'labels.upload' %>
16
+ <%= fa_icon 'upload' %> <%= wt 'labels.upload' %>
17
17
  <% end %>
18
18
  </div>
19
19
  </div>
@@ -13,7 +13,7 @@ The following params are the variables that can be used in this partial.
13
13
  <div class="col-sm-12">
14
14
  <%= form.label field_name, class: 'btn btn-default' do %>
15
15
  <%= form.file_field field_name, class: 'sr-only' %>
16
- <%= fa_icon 'upload' %> <%= t 'labels.upload' %>
16
+ <%= fa_icon 'upload' %> <%= wt 'labels.upload' %>
17
17
  <% end %>
18
18
  </div>
19
19
  </div>
@@ -13,7 +13,7 @@ The following params are the variables that can be used in this partial.
13
13
  <div class="col-sm-12">
14
14
  <%= form.label field_name, class: 'btn btn-default' do %>
15
15
  <%= form.file_field field_name, class: 'sr-only' %>
16
- <%= fa_icon 'upload' %> <%= t 'labels.upload' %>
16
+ <%= fa_icon 'upload' %> <%= wt 'labels.upload' %>
17
17
  <% end %>
18
18
  </div>
19
19
  </div>
@@ -26,9 +26,9 @@ readonly = unauthorized? :edit, metadata[:class]
26
26
  %>
27
27
  <span class="auto_select" data-init="has_and_belongs_to_many" data-url="<%= url %>" data-wildcard="<%= wildcard %>">
28
28
  <div class="col-12 col-sm-6">
29
- <%= form.text_field metadata[:foreign_key], value: nil, class: 'form-control', multiple: true, placeholder: t('labels.auto_select_hint') %>
29
+ <%= form.text_field metadata[:foreign_key], value: nil, class: 'form-control', multiple: true, placeholder: wt('labels.auto_select_hint') %>
30
30
  </div>
31
- <strong class="auto_select__count"><%= t 'labels.count' %><span></span></strong>
31
+ <strong class="auto_select__count"><%= wt 'labels.count' %><span></span></strong>
32
32
  <ul>
33
33
  <% decorated.each do |v| %>
34
34
  <li>
@@ -25,9 +25,9 @@ readonly = unauthorized? :edit, metadata[:class]
25
25
  %>
26
26
  <span class="auto_select" data-init="has_many" data-url="<%= url %>" data-wildcard="<%= wildcard %>">
27
27
  <div class="col-12 col-sm-6">
28
- <%= form.text_field metadata[:foreign_key], value: nil, class: 'form-control', multiple: true, placeholder: t('labels.auto_select_hint') %>
28
+ <%= form.text_field metadata[:foreign_key], value: nil, class: 'form-control', multiple: true, placeholder: wt('labels.auto_select_hint') %>
29
29
  </div>
30
- <strong class="auto_select__count"><%= t 'labels.count' %><span></span></strong>
30
+ <strong class="auto_select__count"><%= wt 'labels.count' %><span></span></strong>
31
31
  <ul>
32
32
  <% decorated.each do |v| %>
33
33
  <li>
@@ -13,7 +13,7 @@ The following params are the variables that can be used in this partial.
13
13
  <div class="col-sm-12">
14
14
  <%= form.label field_name, class: 'btn btn-default' do %>
15
15
  <%= form.file_field field_name, class: 'sr-only' %>
16
- <%= fa_icon 'upload' %> <%= t 'labels.upload' %>
16
+ <%= fa_icon 'upload' %> <%= wt 'labels.upload' %>
17
17
  <% end %>
18
18
  </div>
19
19
  </div>
@@ -13,7 +13,7 @@ The following params are the variables that can be used in this partial.
13
13
  <div class="col-sm-12">
14
14
  <%= form.label field_name, class: 'btn btn-default' do %>
15
15
  <%= form.file_field field_name, class: 'sr-only' %>
16
- <%= fa_icon 'upload' %> <%= t 'labels.upload' %>
16
+ <%= fa_icon 'upload' %> <%= wt 'labels.upload' %>
17
17
  <% end %>
18
18
  </div>
19
19
  </div>
@@ -13,7 +13,7 @@ The following params are the variables that can be used in this partial.
13
13
  <div class="col-sm-12">
14
14
  <%= form.label field_name, class: 'btn btn-default' do %>
15
15
  <%= form.file_field field_name, class: 'sr-only' %>
16
- <%= fa_icon 'upload' %> <%= t 'labels.upload' %>
16
+ <%= fa_icon 'upload' %> <%= wt 'labels.upload' %>
17
17
  <% end %>
18
18
  </div>
19
19
  </div>
@@ -46,7 +46,7 @@ decorated_collection = decorate collection
46
46
  <% else %>
47
47
  <div class="resources__not-found">
48
48
  <%= image_tag 'wallaby/not_found.png' %>
49
- <%= t 'errors.not_found.collection' %>
49
+ <%= wt 'errors.not_found.collection' %>
50
50
  </div>
51
51
  <% end %>
52
52
  <% # /Data table %>
@@ -1,7 +1,7 @@
1
1
  <% decorated = decorate resource %>
2
2
  <article class="resource">
3
3
  <div class="resource__header">
4
- <h1><%= t 'labels.create', model: to_model_label(current_model_class) %></h1>
4
+ <h1><%= wt 'labels.create', model: to_model_label(current_model_class) %></h1>
5
5
  <%= render 'resource_navs' %>
6
6
  </div>
7
7
  <%= render 'flash_messages' %>
@@ -28,7 +28,7 @@
28
28
  <section>
29
29
  <div class="resource__not-found">
30
30
  <%= image_tag 'wallaby/not_found.png' %>
31
- <%= t 'errors.not_found.resource', resource: to_model_label(current_model_class) %>
31
+ <%= wt 'errors.not_found.resource', resource: to_model_label(current_model_class) %>
32
32
  </div>
33
33
  </section>
34
34
  <% end %>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wallaby
4
- VERSION = '6.1.0' # :nodoc:
4
+ VERSION = '6.1.1' # :nodoc:
5
5
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wallaby
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.0
4
+ version: 6.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tianwen Chen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-20 00:00:00.000000000 Z
11
+ date: 2020-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: wallaby-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.0
19
+ version: 0.2.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.2.0
26
+ version: 0.2.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: wallaby-active_record
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.2.1
33
+ version: 0.2.4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.2.1
40
+ version: 0.2.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bootstrap
43
43
  requirement: !ruby/object:Gem::Requirement