fix updated_by

This commit is contained in:
2023-01-25 01:16:05 +02:00
parent 3660f9e8e2
commit bafe142a3b
10 changed files with 121 additions and 18 deletions

View File

@ -4,6 +4,13 @@ module Merged
include OptionsHelper
include SharedHelper
def updated_by(owner)
member = owner.updated_by
return member if member.is_a? String
return "" if member.nil?
return member.name if member.respond_to? :name
member.email
end
def aspect_ratio image
x , y = image.aspect_ratio
"#{x} / #{y}"

View File

@ -38,7 +38,7 @@ module Merged
def order_option(section , clazz = "")
if section.has_option?("order")
clazz += " md:order-last" if section.option('order') == "right"
clazz += " order-last" if section.option('order') == "right"
end
{class: clazz}
end
@ -125,6 +125,7 @@ module Merged
else # two
columns = "grid-cols-1 md:grid-cols-2"
end
columns += " gap-8 md:gap-12 lg:gap-16"
{class: columns }
end

View File

@ -33,8 +33,6 @@ module Merged
def view_button(element , extra_classes = "")
return "" unless element.has_option?("button_link")
puts element.header
puts element.option("button_link")
["<button class='button ",
extra_classes,
"'>" ,