lib/alchemy/resources_helper.rb in alchemy_cms-7.2.7 vs lib/alchemy/resources_helper.rb in alchemy_cms-7.3.0
- old
+ new
@@ -8,11 +8,11 @@
#
# See Alchemy::Resource for examples how to initialize a resource_handler
#
def resource_window_size
- @resource_window_size ||= "420x#{100 + resource_handler.attributes.length * 40}"
+ @resource_window_size ||= "480x#{100 + resource_handler.attributes.length * 40}"
end
def resource_instance_variable
instance_variable_get(:"@#{resource_handler.resource_name}")
end
@@ -85,9 +85,11 @@
options[:date_format] || :"alchemy.default"
else
options[:time_format] || :"alchemy.time"
end
value = l(attribute_value, format: localization_format)
+ elsif attribute[:type] == :boolean
+ value = attribute_value ? '<alchemy-icon name="check"></alchemy-icon>'.html_safe : nil
else
value = attribute_value
end
options.reverse_merge!(truncate: 50)