jap_mag 1.3.5 → 1.4.0
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 +4 -4
- data/app/helpers/jap_mag_widgets_helper.rb +14 -0
- data/lib/jap_mag/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 938dff20d2cae44134082114f639f023c25e7735b17a5abfe1e28721145f749b
|
|
4
|
+
data.tar.gz: 399acc810648ab39e2f453795944822e3e7ba98e893d152b4558506ffc828cb2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a3e3772de8b7a118455349f05bdcf47218bed3c2fe1aeea8f4dc3d02ffabe8ffcc75b362434db276084ac1b7f63327e7bf733c8ae1af6147b6bb2a2a52cbe8e5
|
|
7
|
+
data.tar.gz: 630c92992b9936e7884e70723b3b72fe4f4bb55307e39037320c83df52588fcba6772254ba9c51633aa56c330da7d46041c6102d9ec4780579491494bfa33bb5
|
|
@@ -190,6 +190,20 @@ module JapMagWidgetsHelper
|
|
|
190
190
|
image_tag name_at_1x, options
|
|
191
191
|
end
|
|
192
192
|
|
|
193
|
+
def section_t key, opts = {}
|
|
194
|
+
I18n.t "#{params[:controller]}.#{params[:action]}.sections.#{key}", opts
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
def render_sections *args, **opts
|
|
198
|
+
opts = {locals: {}}.merge(opts)
|
|
199
|
+
|
|
200
|
+
args.collect do |section|
|
|
201
|
+
tpl = "#{params[:controller].gsub('#', '/')}/#{params[:action]}/#{section}"
|
|
202
|
+
|
|
203
|
+
render partial: tpl, locals: opts[:locals]
|
|
204
|
+
end.join.html_safe
|
|
205
|
+
end
|
|
206
|
+
|
|
193
207
|
protected
|
|
194
208
|
|
|
195
209
|
def current_template
|
data/lib/jap_mag/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jap_mag
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- DING Yu
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-08-
|
|
11
|
+
date: 2022-08-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: will_paginate
|