Sha256: 7c9a422423b128aaeb50ad453fa30afe427d1c3142b1eaab7136bc2d49faaf14
Contents?: true
Size: 865 Bytes
Versions: 12
Compression:
Stored size: 865 Bytes
Contents
<% first_attachments = true # This 'unless' can be removed if :name is no longer assumed to be a default attribute. unless attributes.find {|attr| attr.name == 'name'} %><p><b>Name:</b> <%%= @content_block.name %></p><% end %> <%- for attribute in attributes -%> <%- case attribute.type when :attachment -%> <p><b><%= attribute.name.titleize %>:</b> <%%= link_to "<%= attribute.name.titleize %>", attachment_path_for(@content_block.<%= attribute.name %>) %></p> <%- when :attachments if first_attachments -%> <p><b>Attachments:</b> <%%= attachment_viewer @content_block %></p> <%- first_attachments = false end -%> <%- when :category -%> <p><b>Category:</b> <%%= @content_block.category_name %></p> <%- else -%> <p><b><%= attribute.name.titleize %>:</b> <%%= @content_block.<%= attribute.name %> %></p> <%- end -%> <% end %>
Version data entries
12 entries across 12 versions & 1 rubygems