Skip to content
Snippets Groups Projects
Commit df854209 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

climate

parent 7e4f3362
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,12 @@ class Communication::Block::Template::Base
:layouts,
:element_class
attr_reader :block
attr_reader :block, :elements
delegate :university, to: :block
delegate :about, to: :block
delegate :template_kind, to: :block
alias :kind :template_kind
def self.has_elements(element_class = nil)
element_class = "#{self}::Element".constantize if element_class.nil?
......@@ -116,18 +121,10 @@ class Communication::Block::Template::Base
self.class.element_class.new block, data
end
def elements
@elements
end
def default_layout
self.class.layouts&.first
end
def kind
block.template_kind
end
def allowed_for_about?
true
end
......@@ -180,11 +177,7 @@ class Communication::Block::Template::Base
end
end
def university
block.university
end
def website
block.about&.try(:website)
about&.try(:website)
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment