wallaby 6.1.0 → 6.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/wallaby/resources/_form.html.erb +1 -1
- data/app/views/wallaby/resources/_index_filters.html.erb +1 -1
- data/app/views/wallaby/resources/_index_pagination.html.erb +10 -10
- data/app/views/wallaby/resources/_index_query.html.erb +1 -1
- data/app/views/wallaby/resources/bad_request.json.jbuilder +1 -1
- data/app/views/wallaby/resources/edit.html.erb +1 -1
- data/app/views/wallaby/resources/error.html.erb +2 -2
- data/app/views/wallaby/resources/error.json.jbuilder +1 -1
- data/app/views/wallaby/resources/form/_active_storage.html.erb +1 -1
- data/app/views/wallaby/resources/form/_belongs_to.html.erb +1 -1
- data/app/views/wallaby/resources/form/_binary.html.erb +1 -1
- data/app/views/wallaby/resources/form/_blob.html.erb +1 -1
- data/app/views/wallaby/resources/form/_file.html.erb +1 -1
- data/app/views/wallaby/resources/form/_has_and_belongs_to_many.html.erb +2 -2
- data/app/views/wallaby/resources/form/_has_many.html.erb +2 -2
- data/app/views/wallaby/resources/form/_longblob.html.erb +1 -1
- data/app/views/wallaby/resources/form/_mediumblob.html.erb +1 -1
- data/app/views/wallaby/resources/form/_tinyblob.html.erb +1 -1
- data/app/views/wallaby/resources/index.html.erb +1 -1
- data/app/views/wallaby/resources/new.html.erb +1 -1
- data/app/views/wallaby/resources/show.html.erb +1 -1
- data/lib/wallaby/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f7abdcdde877c817216d2a8d14784843ec2310ce33ca9b68f728a7aef905894
|
4
|
+
data.tar.gz: 51ebc679c153d6a7c51e6d95d47e2d748b6ae922a9dc34146e262aa5de1e1ea6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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><%=
|
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 =
|
5
|
-
of =
|
6
|
-
total_count =
|
7
|
-
pers_title =
|
8
|
-
pages_title =
|
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><%=
|
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
|
-
<%=
|
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
|
-
<%=
|
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 }) {
|
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 }) {
|
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>
|
@@ -4,7 +4,7 @@ decorated = decorate resource
|
|
4
4
|
%>
|
5
5
|
<article class="resource">
|
6
6
|
<div class="resource__header">
|
7
|
-
<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><%=
|
10
|
+
<span><%= wt "http_errors.#{@symbol}" %></span>
|
11
11
|
</h1>
|
12
12
|
<p class="card-text">
|
13
13
|
<% if @code >= 500 && @code != 501 %>
|
14
|
-
<%=
|
14
|
+
<%= wt "http_errors.report_error_html" %>
|
15
15
|
<% else %>
|
16
16
|
<%= @exception.try(:message) || flash[:alert] %>
|
17
17
|
<% 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' %> <%=
|
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:
|
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' %> <%=
|
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' %> <%=
|
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' %> <%=
|
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:
|
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"><%=
|
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:
|
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"><%=
|
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' %> <%=
|
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' %> <%=
|
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' %> <%=
|
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
|
-
<%=
|
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><%=
|
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
|
-
<%=
|
31
|
+
<%= wt 'errors.not_found.resource', resource: to_model_label(current_model_class) %>
|
32
32
|
</div>
|
33
33
|
</section>
|
34
34
|
<% end %>
|
data/lib/wallaby/version.rb
CHANGED
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.
|
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-
|
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.
|
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.
|
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.
|
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.
|
40
|
+
version: 0.2.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bootstrap
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|