bullet_train-themes 1.2.9 → 1.2.10
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7f8623fca321e4cf6861735d1fb1e4bda3b39bb812597878e25b7650798c3873
|
|
4
|
+
data.tar.gz: 7e6214366cdb4a2e1152b15b249ae40ffc59e2eb37af227ceed03329492bd784
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: adcc41dd6accd6aff0cf39a2aa9d4e589c55ad5444105e47dec76d9a205538870ff5fd2724500f9f988ade4384e64cfe0a6fd9613f2ccad5a3d2fd41c349d090
|
|
7
|
+
data.tar.gz: 3f8f209d624a9729d2ec8e7a56f5ad1ed64b068fe151ebe6558930f309daa965918857dce42530a9fb9b8909159486912e2a9c2c8397039fa25a5a8f0849c438
|
data/app/helpers/theme_helper.rb
CHANGED
|
@@ -1,39 +1,3 @@
|
|
|
1
|
-
# Our custom devise views are housed in `bullet_train-base`, but they're overwritten
|
|
2
|
-
# by devise's standard views if the devise gem is declared after `bullet_train`.
|
|
3
|
-
# To ensure we use our custom views, we temporarily unregister the original devise
|
|
4
|
-
# views path from the FileSystemResolver, add our custom path, and find the views that way.
|
|
5
|
-
module ActionView
|
|
6
|
-
class LookupContext
|
|
7
|
-
module ViewPaths
|
|
8
|
-
def find(name, prefixes = [], partial = false, keys = [], options = {})
|
|
9
|
-
name, prefixes = normalize_name(name, prefixes)
|
|
10
|
-
details, details_key = detail_args_for(options)
|
|
11
|
-
|
|
12
|
-
devise_view = false
|
|
13
|
-
prefixes.each do |prefix|
|
|
14
|
-
if prefix.match?(/devise/)
|
|
15
|
-
devise_view = true
|
|
16
|
-
break
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
resolver = if name == "devise" || devise_view
|
|
21
|
-
original_devise_view_path = BulletTrain::Themes::Light.original_devise_path
|
|
22
|
-
bullet_train_resolver = @view_paths.paths.reject do |resolver|
|
|
23
|
-
resolver.path.match?(original_devise_view_path)
|
|
24
|
-
end
|
|
25
|
-
PathSet.new(bullet_train_resolver)
|
|
26
|
-
else
|
|
27
|
-
@view_paths
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
resolver.find(name, prefixes, partial, details, details_key, keys)
|
|
31
|
-
end
|
|
32
|
-
alias_method :find_template, :find
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
|
|
37
1
|
module ThemeHelper
|
|
38
2
|
def current_theme_object
|
|
39
3
|
@current_theme_object ||= "BulletTrain::Themes::#{current_theme.to_s.classify}::Theme".constantize.new
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
<% object ||= current_attributes_object %>
|
|
2
2
|
<% strategy ||= current_attributes_strategy || :none %>
|
|
3
3
|
<% url ||= nil %>
|
|
4
|
+
<% default_message = local_assigns[:default_message] || t('global.formats.timestamp_unavailable') %>
|
|
4
5
|
|
|
5
6
|
<% if object.send(attribute).present? %>
|
|
6
7
|
<%= render 'shared/attributes/attribute', object: object, attribute: attribute, strategy: strategy, url: url do %>
|
|
7
8
|
<%= display_date(object.send(attribute), local_assigns[:date_format]) %>
|
|
8
9
|
<% end %>
|
|
10
|
+
<% else %>
|
|
11
|
+
<%= default_message %>
|
|
9
12
|
<% end %>
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
<% object ||= current_attributes_object %>
|
|
2
2
|
<% strategy ||= current_attributes_strategy || :none %>
|
|
3
3
|
<% url ||= nil %>
|
|
4
|
+
<% default_message = local_assigns[:default_message] || t('global.formats.timestamp_unavailable') %>
|
|
4
5
|
|
|
5
6
|
<% if object.send(attribute).present? %>
|
|
6
7
|
<%= render 'shared/attributes/attribute', object: object, attribute: attribute, strategy: strategy, url: url do %>
|
|
7
8
|
<%= display_date_and_time(object.send(attribute), local_assigns[:date_format], local_assigns[:time_format]) %>
|
|
8
9
|
<% end %>
|
|
10
|
+
<% else %>
|
|
11
|
+
<%= default_message %>
|
|
9
12
|
<% end %>
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bullet_train-themes
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Culver
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-12-
|
|
11
|
+
date: 2022-12-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: standard
|
|
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
103
103
|
- !ruby/object:Gem::Version
|
|
104
104
|
version: '0'
|
|
105
105
|
requirements: []
|
|
106
|
-
rubygems_version: 3.
|
|
106
|
+
rubygems_version: 3.4.1
|
|
107
107
|
signing_key:
|
|
108
108
|
specification_version: 4
|
|
109
109
|
summary: Bullet Train Themes
|