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

refactored statics

parent 4ccafdf3
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,9 @@ module Admin::BlocksHelper
end
def block_component_static(property, **options)
block_component_render :static, property, **options
render "admin/communication/blocks/components/static",
property: property,
**options
end
protected
......
<%
template ||= @block.template
component = template.public_send "#{property}_component"
value = template.public_send property
depth ||= 3
indentation = ' ' * depth
local_assigns[:template] = template
local_assigns[:component] = component
local_assigns[:value] = value
local_assigns[:depth] = depth
local_assigns[:indentation] = indentation
partial = "admin/communication/blocks/components/#{component.kind}/static"
%>
<%= render partial, **local_assigns %>
<%
component = template.public_send "#{property}_component"
blob = component.blob
depth ||= 3
list ||= false
indentation = ' ' * depth
return unless blob
%>
<% if list %>
......
<%
value = template.public_send property
depth ||= 3
indentation = ' ' * depth
%>
<%= indentation %><%= property %>: >-
<%= indentation %> <%= prepare_html_for_static value, @university %>
<%
value = template.public_send property
depth ||= 3
indentation = ' ' * depth
%>
<%= indentation %><%= property %>: >-
<%= indentation %> <%= prepare_text_for_static value, depth + 1 %>
<%
value = template.public_send property
depth ||= 3
indentation = ' ' * depth
%>
<%= indentation %><%= property %>: >-
<%= indentation %> <%= prepare_text_for_static value, depth + 1 %>
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