Sha256: 7d33e66be6eea3834a7c7dfbf17655e7b257e5eb0a7cb44093c1cc964a4a2253

Contents?: true

Size: 808 Bytes

Versions: 9

Compression:

Stored size: 808 Bytes

Contents

<%- if @element['contents'].present? || @element['available_contents'].present? -%>
= element_view_for(element) do |el|
  <%- if @element["picture_gallery"] -%>
  .<%= @element_name %>_images
    - element.contents.gallery_pictures.each do |image|
      .<%= @element_name %>_image{class: image.essence.css_class}
        = render_essence_view(image, :image_size => "160x120")
  <%- end -%>
<%- @contents.each do |content| -%>
  <%- if @contents.length > 1 -%>
  .<%= content["name"] %>
    = 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 -%>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
alchemy_cms-2.9.1 lib/rails/generators/alchemy/elements/templates/view.html.haml
alchemy_cms-2.9.0 lib/rails/generators/alchemy/elements/templates/view.html.haml
alchemy_cms-2.8.3 lib/rails/generators/alchemy/elements/templates/view.html.haml
alchemy_cms-2.7.5 lib/rails/generators/alchemy/elements/templates/view.html.haml
alchemy_cms-2.7.4 lib/rails/generators/alchemy/elements/templates/view.html.haml
alchemy_cms-2.8.2 lib/rails/generators/alchemy/elements/templates/view.html.haml
alchemy_cms-2.8.1 lib/rails/generators/alchemy/elements/templates/view.html.haml
alchemy_cms-2.7.3 lib/rails/generators/alchemy/elements/templates/view.html.haml
alchemy_cms-2.7.2 lib/rails/generators/alchemy/elements/templates/view.html.haml