test harness is back, and pages fixed after refactor
This commit is contained in:
@ -20,8 +20,20 @@ module Merged
|
||||
text
|
||||
end
|
||||
end
|
||||
def button(text , url , color)
|
||||
link_to(url) do
|
||||
content_tag(:button , class: color + " " + button_classes ) do
|
||||
text
|
||||
end
|
||||
end
|
||||
end
|
||||
def button_classes
|
||||
"mr-3 inline-block rounded-lg px-4 py-3 text-md font-medium text-white"
|
||||
end
|
||||
# section should be hash with at least 'template' key
|
||||
def find_template(section)
|
||||
"merged/view/" + section.template
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -2,10 +2,6 @@ module Merged
|
||||
module ViewHelper
|
||||
include OptionsHelper
|
||||
include MergedHelper
|
||||
# section should be hash with at least 'template' key
|
||||
def find_template(section)
|
||||
"merged/view/" + section.template
|
||||
end
|
||||
|
||||
# background image as inline style
|
||||
def bg(section , clazz = "")
|
||||
@ -27,13 +23,5 @@ module Merged
|
||||
image_tag("#{Image.image_root}/#{element.image}" , class: classes)
|
||||
end
|
||||
|
||||
def button(text , url , color)
|
||||
link_to(url) do
|
||||
content_tag(:button , class: color + " " + button_classes ) do
|
||||
text
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user