bullet_train-themes 1.8.5 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/themes/base/attributes/_boolean.html.erb +9 -3
- data/app/views/themes/base/attributes/_date.html.erb +7 -4
- data/app/views/themes/base/attributes/_date_and_time.html.erb +7 -4
- data/app/views/themes/base/attributes/_days_ago.html.erb +8 -5
- data/lib/bullet_train/themes/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a52ae611e8a331a4f216c12dbc184f335803c59bf569c71a8c5c5a2e7ffd503a
|
4
|
+
data.tar.gz: 01f4e2bb88e5aac8d043a5cd9277a07d717b2f9cb0563c2e0931faddba70f563
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0be635c92ad557eefb46e5a5fad7ce20226d90a4688d85e450329e4738fdda059520cae73d42862ae3eb14e88be4b59d5018c830b86b1149a20ff0f9b18ea9c
|
7
|
+
data.tar.gz: 30a2846b42447c263c9904f9db79b6b207411f9f22981979c7338fc619e2fcc4656e30165aad755135a665cda5f4e8fccc9dd251671777e61e057a7e82e0932c
|
@@ -1,9 +1,15 @@
|
|
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.not_set") %>
|
5
|
+
<% display_when_blank = local_assigns[:display_when_blank] || false %>
|
4
6
|
|
5
|
-
|
6
|
-
|
7
|
-
|
7
|
+
<% if !object[attribute].nil? || display_when_blank %>
|
8
|
+
<%= render 'shared/attributes/attribute', object: object, attribute: attribute, strategy: strategy, url: url do %>
|
9
|
+
<% unless object[attribute].nil? %>
|
10
|
+
<%= t("#{object.class.name.underscore.pluralize}.fields.#{attribute}.options.#{object.public_send(attribute)}") %>
|
11
|
+
<% else %>
|
12
|
+
<%= default_message %>
|
13
|
+
<% end %>
|
8
14
|
<% end %>
|
9
15
|
<% end %>
|
@@ -2,11 +2,14 @@
|
|
2
2
|
<% strategy ||= current_attributes_strategy || :none %>
|
3
3
|
<% url ||= nil %>
|
4
4
|
<% default_message = local_assigns[:default_message] || t('global.formats.timestamp_unavailable') %>
|
5
|
+
<% display_when_blank = local_assigns[:display_when_blank] || false %>
|
5
6
|
|
6
|
-
<% if object.public_send(attribute).present? %>
|
7
|
+
<% if object.public_send(attribute).present? || display_when_blank %>
|
7
8
|
<%= render 'shared/attributes/attribute', object: object, attribute: attribute, strategy: strategy, url: url do %>
|
8
|
-
|
9
|
+
<% if object.public_send(attribute).present? %>
|
10
|
+
<%= display_date(object.public_send(attribute), **local_assigns.slice(:format), **local_assigns.slice(:date_format)) %>
|
11
|
+
<% else %>
|
12
|
+
<%= default_message %>
|
13
|
+
<% end %>
|
9
14
|
<% end %>
|
10
|
-
<% else %>
|
11
|
-
<%= default_message %>
|
12
15
|
<% end %>
|
@@ -2,11 +2,14 @@
|
|
2
2
|
<% strategy ||= current_attributes_strategy || :none %>
|
3
3
|
<% url ||= nil %>
|
4
4
|
<% default_message = local_assigns[:default_message] || t('global.formats.timestamp_unavailable') %>
|
5
|
+
<% display_when_blank = local_assigns[:display_when_blank] || false %>
|
5
6
|
|
6
|
-
<% if object.public_send(attribute).present? %>
|
7
|
+
<% if object.public_send(attribute).present? || display_when_blank %>
|
7
8
|
<%= render 'shared/attributes/attribute', object: object, attribute: attribute, strategy: strategy, url: url do %>
|
8
|
-
|
9
|
+
<% if object.public_send(attribute).present? %>
|
10
|
+
<%= display_date_and_time(object.public_send(attribute), **local_assigns.slice(:format), **local_assigns.slice(:date_format), **local_assigns.slice(:time_format)) %>
|
11
|
+
<% else %>
|
12
|
+
<%= default_message %>
|
13
|
+
<% end %>
|
9
14
|
<% end %>
|
10
|
-
<% else %>
|
11
|
-
<%= default_message %>
|
12
15
|
<% end %>
|
@@ -2,11 +2,14 @@
|
|
2
2
|
<% strategy ||= current_attributes_strategy || :none %>
|
3
3
|
<% url ||= nil %>
|
4
4
|
<% default_message = local_assigns[:default_message] || t("global.never") %>
|
5
|
+
<% display_when_blank = local_assigns[:display_when_blank] || false %>
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
<% if object.public_send(attribute) || display_when_blank %>
|
8
|
+
<%= render 'shared/attributes/attribute', object: object, attribute: attribute, strategy: strategy, url: url do %>
|
9
|
+
<% if object.public_send(attribute).present? %>
|
10
|
+
<%= t("global.time_ago", time: time_ago_in_words(object.send(attribute))) %>
|
11
|
+
<% else %>
|
12
|
+
<%= default_message %>
|
13
|
+
<% end %>
|
11
14
|
<% end %>
|
12
15
|
<% 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.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
requirements: []
|
140
|
-
rubygems_version: 3.5.
|
140
|
+
rubygems_version: 3.5.22
|
141
141
|
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: Bullet Train Themes
|