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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4eb455a8227f7efb66749eb6f5f638ecfdb601e6464a6111d28f973ece77b215
4
- data.tar.gz: 856daad75df01c3c6a6e69ec3e5c8d9dfb4b0babe0fa3cdaf5aaf2b4aa14c886
3
+ metadata.gz: a52ae611e8a331a4f216c12dbc184f335803c59bf569c71a8c5c5a2e7ffd503a
4
+ data.tar.gz: 01f4e2bb88e5aac8d043a5cd9277a07d717b2f9cb0563c2e0931faddba70f563
5
5
  SHA512:
6
- metadata.gz: f9403b3dd876538f3f3442631d038500105590e2896bdda793666b705b5f48978576d06553ea518331cf90284099cbc3f10c922260ae816ff660e1e666380ed0
7
- data.tar.gz: 4ea183279d7a660add3d809711b912a6f4a3885006441d9bc57a358e0bf4689c0342588c02b7722d41cc5a961e54c1c501d8d339e5d353f6ac87d5d571fce78a
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
- <%= render 'shared/attributes/attribute', object: object, attribute: attribute, strategy: strategy, url: url do %>
6
- <% unless object[attribute].nil? %>
7
- <%= t("#{object.class.name.underscore.pluralize}.fields.#{attribute}.options.#{object.public_send(attribute)}") %>
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
- <%= display_date(object.public_send(attribute), **local_assigns.slice(:format), **local_assigns.slice(:date_format)) %>
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
- <%= display_date_and_time(object.public_send(attribute), **local_assigns.slice(:format), **local_assigns.slice(:date_format), **local_assigns.slice(:time_format)) %>
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
- <%= render 'shared/attributes/attribute', object: object, attribute: attribute, strategy: strategy, url: url do %>
7
- <% if object.public_send(attribute) %>
8
- <%= t("global.time_ago", time: time_ago_in_words(object.send(attribute))) %>
9
- <% else %>
10
- <%= default_message %>
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 %>
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module Themes
3
- VERSION = "1.8.5"
3
+ VERSION = "1.10.0"
4
4
  end
5
5
  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.8.5
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-18 00:00:00.000000000 Z
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.11
140
+ rubygems_version: 3.5.22
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: Bullet Train Themes