wallaby 6.1.0 → 6.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/app/views/wallaby/resources/_form.html.erb +1 -1
  3. data/app/views/wallaby/resources/_header.html.erb +1 -1
  4. data/app/views/wallaby/resources/_index_filters.html.erb +1 -1
  5. data/app/views/wallaby/resources/_index_pagination.html.erb +10 -10
  6. data/app/views/wallaby/resources/_index_query.html.erb +1 -1
  7. data/app/views/wallaby/resources/bad_request.json.jbuilder +1 -1
  8. data/app/views/wallaby/resources/edit.html.erb +1 -1
  9. data/app/views/wallaby/resources/error.html.erb +2 -2
  10. data/app/views/wallaby/resources/error.json.jbuilder +1 -1
  11. data/app/views/wallaby/resources/form/_active_storage.html.erb +1 -1
  12. data/app/views/wallaby/resources/form/_belongs_to.html.erb +1 -1
  13. data/app/views/wallaby/resources/form/_binary.html.erb +1 -1
  14. data/app/views/wallaby/resources/form/_blob.html.erb +1 -1
  15. data/app/views/wallaby/resources/form/_file.html.erb +1 -1
  16. data/app/views/wallaby/resources/form/_has_and_belongs_to_many.html.erb +2 -2
  17. data/app/views/wallaby/resources/form/_has_many.html.erb +2 -2
  18. data/app/views/wallaby/resources/form/_longblob.html.erb +1 -1
  19. data/app/views/wallaby/resources/form/_mediumblob.html.erb +1 -1
  20. data/app/views/wallaby/resources/form/_tinyblob.html.erb +1 -1
  21. data/app/views/wallaby/resources/index.html.erb +1 -1
  22. data/app/views/wallaby/resources/new.html.erb +1 -1
  23. data/app/views/wallaby/resources/show.html.erb +1 -1
  24. data/lib/generators/wallaby/install/templates/application_controller.rb.erb +1 -1
  25. data/lib/wallaby/version.rb +1 -1
  26. metadata +11 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf461ecdd7f1605b7a79e4440e7b9b7f2bbe24aac0389252633cc5afc22f15de
4
- data.tar.gz: 4d6357a2e6c241e382769b39e8ad26acae965210e2ff0ab3bc89c4e187ac9d72
3
+ metadata.gz: 193972ca366ee3de3c37d87c9ddaa57e120c450ee45e16e6be22cb9d7c6d34a2
4
+ data.tar.gz: c4f5319366121053b6b9e1e6ae925d98098b3bc61f501914400c7b58430e2ecf
5
5
  SHA512:
6
- metadata.gz: 43add18799226503ac25d194ad88df0f251c262eaab54e0fc7a25cd7c14d519eaf9cb390569a8b0737267ccb46356f44ba940c1b615f4461ed910dfaccbd6899
7
- data.tar.gz: 72fa73cdf02ecb7efe8875b819cdcdb70b3cd76cf8f172bf4f7517723408882e2a4869727dd741ee4eb0b0fe58c83c623ea40c377fbd3d29bacb690fe948ef56
6
+ metadata.gz: 0126a84017969ffc4647456390e394bd88c16763b29fa96d398ac874f20f89c077fc45c13ce609ed246c03b956abc6398f1f92c26cb26907a8603b8bcced0882
7
+ data.tar.gz: b9343daef36fede5b6394b62e8c0a35632b03c827ca98b18d9de31829c52dfcb7f440de7eae037144ba3025f8b42e33f05ece031f2d3bdc9025e3f4c8b171e63
@@ -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' } %>
@@ -14,7 +14,7 @@
14
14
  <%# //Resources navigation %>
15
15
  <%# User account %>
16
16
  <ul class="navbar-nav ml-auto">
17
- <% if current_user.present? %>
17
+ <% if wallaby_user.present? %>
18
18
  <li class="nav-item dropdown">
19
19
  <a id="user_menu" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
20
20
  class="nav-link dropdown-toggle">
@@ -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 %>
@@ -34,7 +34,7 @@ module <%= class_name %>
34
34
  # end
35
35
 
36
36
  # # customize how user record should be returned
37
- # def current_user
37
+ # def wallaby_user
38
38
  # super # do something for all the subclasses
39
39
  # end
40
40
 
@@ -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.4' # :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.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tianwen Chen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-20 00:00:00.000000000 Z
11
+ date: 2022-02-03 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'
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'
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.7
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.7
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bootstrap
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -962,7 +962,7 @@ homepage: https://github.com/wallaby-rails/wallaby
962
962
  licenses:
963
963
  - MIT
964
964
  metadata: {}
965
- post_install_message:
965
+ post_install_message:
966
966
  rdoc_options: []
967
967
  require_paths:
968
968
  - lib
@@ -978,7 +978,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
978
978
  version: '0'
979
979
  requirements: []
980
980
  rubygems_version: 3.0.3
981
- signing_key:
981
+ signing_key:
982
982
  specification_version: 4
983
983
  summary: Autocomplete the resourceful actions and views for ORMs for admin interface
984
984
  and other purposes.