Sha256: 12eb9be032a4297f136fb8869b4c59898120abdd28c19e4e023b7898e44da68b

Contents?: true

Size: 764 Bytes

Versions: 27

Compression:

Stored size: 764 Bytes

Contents

- cache(element) do
  = 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 -%>

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
alchemy_cms-3.0.2 lib/rails/generators/alchemy/elements/templates/view.html.haml
alchemy_cms-3.0.1 lib/rails/generators/alchemy/elements/templates/view.html.haml
alchemy_cms-3.0.0 lib/rails/generators/alchemy/elements/templates/view.html.haml
alchemy_cms-3.0.0.rc8 lib/rails/generators/alchemy/elements/templates/view.html.haml
alchemy_cms-3.0.0.rc7 lib/rails/generators/alchemy/elements/templates/view.html.haml
alchemy_cms-3.0.0.rc6 lib/rails/generators/alchemy/elements/templates/view.html.haml
alchemy_cms-3.0.0.rc5 lib/rails/generators/alchemy/elements/templates/view.html.haml