bhf 1.0.0.beta14 → 1.0.0.beta16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/app/views/bhf/pages/_platform.html.haml +1 -1
- data/bhf.gemspec +5 -5
- data/config/locales/de.yml +4 -4
- data/config/locales/en.yml +5 -5
- data/config/locales/pt.yml +5 -5
- data/lib/bhf/platform/pagination.rb +16 -8
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3eade6bcba108b7540734cdf65ca9ed614ab2cfd64ec4934fbad4a1672191e1
|
4
|
+
data.tar.gz: 5e44a86b58952cafa8cd27c85f7b87c39f421aa4d6f3c3fcc6159fcdf05531e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4dd961161d6f083d5c1963d5272c450fca87a165bcc2479ee7786a14113d562469cbdb0d8afe732319683479ab344be66ad64a844d1583ddd432378880c387a
|
7
|
+
data.tar.gz: 49e8e4bfdc24fe1adc6fcdb3d18689e8e4ec32aa115c7a3d8f566d021dafa042cb7f5a65c585f5fc978a80a860d944e981e7b9626357f7819e4e71344ca6e749
|
data/Gemfile.lock
CHANGED
@@ -134,14 +134,14 @@ GEM
|
|
134
134
|
nokogiri (~> 1)
|
135
135
|
rake
|
136
136
|
mini_mime (1.0.2)
|
137
|
-
mini_portile2 (2.
|
137
|
+
mini_portile2 (2.8.0)
|
138
138
|
minitest (5.14.1)
|
139
139
|
multi_json (1.14.1)
|
140
140
|
multi_xml (0.6.0)
|
141
141
|
multipart-post (2.1.1)
|
142
142
|
nio4r (2.5.2)
|
143
|
-
nokogiri (1.
|
144
|
-
mini_portile2 (~> 2.
|
143
|
+
nokogiri (1.13.4)
|
144
|
+
mini_portile2 (~> 2.8.0)
|
145
145
|
racc (~> 1.4)
|
146
146
|
oauth2 (1.4.2)
|
147
147
|
faraday (>= 0.8, < 2.0)
|
@@ -150,7 +150,7 @@ GEM
|
|
150
150
|
multi_xml (~> 0.5)
|
151
151
|
rack (>= 1.2, < 3)
|
152
152
|
psych (3.1.0)
|
153
|
-
racc (1.
|
153
|
+
racc (1.6.0)
|
154
154
|
rack (2.2.3)
|
155
155
|
rack-test (1.1.0)
|
156
156
|
rack (>= 1.0, < 3)
|
@@ -181,7 +181,7 @@ GEM
|
|
181
181
|
rake (>= 0.8.7)
|
182
182
|
thor (>= 0.20.3, < 2.0)
|
183
183
|
rake (13.0.1)
|
184
|
-
rdoc (6.
|
184
|
+
rdoc (6.3.1)
|
185
185
|
ruby_parser (3.14.1)
|
186
186
|
sexp_processor (~> 4.9)
|
187
187
|
sass-rails (6.0.0)
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -14,7 +14,7 @@ require 'rake'
|
|
14
14
|
require 'jeweler'
|
15
15
|
Jeweler::Tasks.new do |gem|
|
16
16
|
gem.name = 'bhf'
|
17
|
-
gem.homepage = '
|
17
|
+
gem.homepage = 'https://antpaw.github.io/bhf'
|
18
18
|
gem.licenses = 'MIT'
|
19
19
|
gem.summary = 'A simple to use Rails-Engine-Gem that offers an admin interface for trusted user.'
|
20
20
|
gem.description = 'A simple to use Rails-Engine-Gem that offers an admin interface for trusted user. Easy integratable and highly configurable and agnostic. Works with ActiveRecord and Mongoid.'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.0.
|
1
|
+
1.0.0.beta16
|
@@ -79,7 +79,7 @@
|
|
79
79
|
= link_to delete_t(platform), entry_path(platform.name, object), method: :delete, remote: true, class: 'icon delete js_delete', data: {type: :json, confirm: t('bhf.helpers.promts.confirm', platform_title: platform.title_singular.titleize)}
|
80
80
|
- else
|
81
81
|
%td.no_entries{colspan: platform.columns_count}
|
82
|
-
= t 'bhf.pagination.info',
|
82
|
+
= t 'bhf.pagination.info', name: platform.title.titleize, count: 0
|
83
83
|
- unless platform.hide_create
|
84
84
|
= link_to new_t(platform), new_entry_path(platform.name)
|
85
85
|
|
data/bhf.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: bhf 1.0.0.
|
5
|
+
# stub: bhf 1.0.0.beta16 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "bhf".freeze
|
9
|
-
s.version = "1.0.0.
|
9
|
+
s.version = "1.0.0.beta16"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Anton Pawlik".freeze]
|
14
|
-
s.date = "
|
14
|
+
s.date = "2023-04-11"
|
15
15
|
s.description = "A simple to use Rails-Engine-Gem that offers an admin interface for trusted user. Easy integratable and highly configurable and agnostic. Works with ActiveRecord and Mongoid.".freeze
|
16
16
|
s.email = "anton.pawlik@gmail.com".freeze
|
17
17
|
s.extra_rdoc_files = [
|
@@ -172,9 +172,9 @@ Gem::Specification.new do |s|
|
|
172
172
|
"test/database.yml",
|
173
173
|
"test/test_helper.rb"
|
174
174
|
]
|
175
|
-
s.homepage = "
|
175
|
+
s.homepage = "https://antpaw.github.io/bhf".freeze
|
176
176
|
s.licenses = ["MIT".freeze]
|
177
|
-
s.rubygems_version = "3.0.
|
177
|
+
s.rubygems_version = "3.0.9".freeze
|
178
178
|
s.summary = "A simple to use Rails-Engine-Gem that offers an admin interface for trusted user.".freeze
|
179
179
|
|
180
180
|
if s.respond_to? :specification_version then
|
data/config/locales/de.yml
CHANGED
@@ -64,14 +64,14 @@ de:
|
|
64
64
|
entries: Einträge
|
65
65
|
info:
|
66
66
|
default: "Es werden <strong>%{offset_start} - %{offset_end}</strong> von <strong>%{count}</strong> %{name} angezeigt"
|
67
|
-
other: "Es werden <strong>alle %{count}</strong> %{
|
68
|
-
one: "Es wird <strong>1</strong> %{
|
67
|
+
other: "Es werden <strong>alle %{count}</strong> %{name} angezeigt"
|
68
|
+
one: "Es wird <strong>1</strong> %{name} angezeigt"
|
69
69
|
zero: "Es wurde nichts gefunden"
|
70
70
|
|
71
71
|
footer:
|
72
72
|
state: 'Seite wurde in ~%{time} Sekunden erstellt'
|
73
|
-
copy: 'Gemacht von <a href="
|
74
|
-
info: 'Mehr Informationen auf <a href="
|
73
|
+
copy: 'Gemacht von <a href="https://twitter.com/antpaw">@antpaw</a>'
|
74
|
+
info: 'Mehr Informationen auf <a href="https://antpaw.github.io/bhf">GitHub</a>'
|
75
75
|
|
76
76
|
attributes:
|
77
77
|
_id: 'id'
|
data/config/locales/en.yml
CHANGED
@@ -69,14 +69,14 @@ en:
|
|
69
69
|
entries: entries
|
70
70
|
info:
|
71
71
|
default: "Displaying <strong>%{offset_start} - %{offset_end}</strong> of <strong>%{count}</strong> %{name} in total"
|
72
|
-
other: "Displaying <strong>all %{count}</strong> %{
|
73
|
-
one: "Displaying <strong>1</strong> %{
|
74
|
-
zero: "No %{
|
72
|
+
other: "Displaying <strong>all %{count}</strong> %{name}"
|
73
|
+
one: "Displaying <strong>1</strong> %{name}"
|
74
|
+
zero: "No %{name} found"
|
75
75
|
|
76
76
|
footer:
|
77
77
|
state: 'Page rendered in ~%{time} seconds'
|
78
|
-
copy: 'Made by <a href="
|
79
|
-
info: 'More information on <a href="
|
78
|
+
copy: 'Made by <a href="https://twitter.com/antpaw">@antpaw</a>'
|
79
|
+
info: 'More information on <a href="https://antpaw.github.io/bhf">GitHub</a>'
|
80
80
|
|
81
81
|
attributes:
|
82
82
|
_id: 'id'
|
data/config/locales/pt.yml
CHANGED
@@ -68,14 +68,14 @@ pt:
|
|
68
68
|
entries: registros
|
69
69
|
info:
|
70
70
|
default: "Exibindo <strong>%{offset_start} - %{offset_end}</strong> de <strong>%{count}</strong> %{name} no total"
|
71
|
-
other: "Exibindo <strong>todos %{count}</strong> %{
|
72
|
-
one: "Exibindo <strong>1</strong> %{
|
73
|
-
zero: "Nenhum(a) %{
|
71
|
+
other: "Exibindo <strong>todos %{count}</strong> %{name}"
|
72
|
+
one: "Exibindo <strong>1</strong> %{name}"
|
73
|
+
zero: "Nenhum(a) %{name} encontrado"
|
74
74
|
|
75
75
|
footer:
|
76
76
|
state: 'Página renderizada em ~%{time} segundos'
|
77
|
-
copy: 'Feito por <a href="
|
78
|
-
info: 'Mais informações no <a href="
|
77
|
+
copy: 'Feito por <a href="https://twitter.com/antpaw">@antpaw</a>'
|
78
|
+
info: 'Mais informações no <a href="https://antpaw.github.io/bhf">GitHub</a>'
|
79
79
|
|
80
80
|
attributes:
|
81
81
|
_id: 'id'
|
@@ -25,11 +25,11 @@ module Bhf::Platform
|
|
25
25
|
def create(platform)
|
26
26
|
platform_params = template.params[platform.name] || {}
|
27
27
|
|
28
|
-
links = if !(page_links = template.paginate(platform.objects,
|
28
|
+
links = if !(page_links = template.paginate(platform.objects,
|
29
29
|
theme: 'bhf',
|
30
30
|
param_name: [platform.name, :page],
|
31
31
|
params: template.params.permit!
|
32
|
-
|
32
|
+
)).blank?
|
33
33
|
"#{load_more(platform)} #{page_links}"
|
34
34
|
elsif platform.objects.total_pages == 1 && platform.objects.size > @offset_to_add
|
35
35
|
load_less(platform)
|
@@ -51,12 +51,20 @@ module Bhf::Platform
|
|
51
51
|
offset_end: collection.offset_value + collection.limit_value
|
52
52
|
})
|
53
53
|
else
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
54
|
+
count = collection.size
|
55
|
+
platform_title = case count
|
56
|
+
when 0
|
57
|
+
platform.title
|
58
|
+
when 1
|
59
|
+
platform.title_singular
|
60
|
+
else
|
61
|
+
platform.title
|
62
|
+
end
|
63
|
+
|
64
|
+
I18n.t('bhf.pagination.info',
|
65
|
+
count: count,
|
66
|
+
name: platform_title
|
67
|
+
)
|
60
68
|
end.html_safe
|
61
69
|
end
|
62
70
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bhf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Pawlik
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -312,11 +312,11 @@ files:
|
|
312
312
|
- lib/rails/generators/bhf/templates/initializer.rb
|
313
313
|
- test/database.yml
|
314
314
|
- test/test_helper.rb
|
315
|
-
homepage:
|
315
|
+
homepage: https://antpaw.github.io/bhf
|
316
316
|
licenses:
|
317
317
|
- MIT
|
318
318
|
metadata: {}
|
319
|
-
post_install_message:
|
319
|
+
post_install_message:
|
320
320
|
rdoc_options: []
|
321
321
|
require_paths:
|
322
322
|
- lib
|
@@ -331,8 +331,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
331
331
|
- !ruby/object:Gem::Version
|
332
332
|
version: 1.3.1
|
333
333
|
requirements: []
|
334
|
-
rubygems_version: 3.0.
|
335
|
-
signing_key:
|
334
|
+
rubygems_version: 3.0.9
|
335
|
+
signing_key:
|
336
336
|
specification_version: 4
|
337
337
|
summary: A simple to use Rails-Engine-Gem that offers an admin interface for trusted
|
338
338
|
user.
|