fix updated_by
This commit is contained in:
@ -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}"
|
||||
|
@ -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
|
||||
|
||||
|
@ -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,
|
||||
"'>" ,
|
||||
|
Reference in New Issue
Block a user