%%- cache(element) do -%>
<%%= element_view_for(element) do |el| -%>
<%- if @element["picture_gallery"] -%>
<%%- element.contents.gallery_pictures.each do |image| -%>
<%%= render_essence_view(image, image_size: '160x120') %>
<%%- end -%>
<%- end -%>
<%- @contents.each do |content| -%>
<%- if @contents.length > 1 -%>
">
<%%= el.render :<%= content["name"] %> %>
<%- else -%>
<%%= el.render :<%= content["name"] %> %>
<%- end -%>
<%- end -%>
<%- if @element['available_contents'] -%>
<%%- element.contents.where(name: ['<%= @available_contents_names.join("', '") %>']).each do |content| -%>
<%%= render_essence_view(content) %>
<%%- end -%>
<%- end -%>
<%%- end -%>
<%%- end -%>