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

Version Path
browsercms-4.0.0.alpha lib/generators/cms/content_block/templates/render.html.erb
browsercms-3.5.7 lib/generators/cms/content_block/templates/render.html.erb
browsercms-3.5.6 lib/generators/cms/content_block/templates/render.html.erb
browsercms-3.5.5 lib/generators/cms/content_block/templates/render.html.erb
browsercms-3.5.4 lib/generators/cms/content_block/templates/render.html.erb
browsercms-3.5.3 lib/generators/cms/content_block/templates/render.html.erb
browsercms-3.5.2 lib/generators/cms/content_block/templates/render.html.erb
browsercms-3.5.1 lib/generators/cms/content_block/templates/render.html.erb
browsercms-3.5.0 lib/generators/cms/content_block/templates/render.html.erb
browsercms-3.5.0.rc3 lib/generators/cms/content_block/templates/render.html.erb
browsercms-3.5.0.rc2 lib/generators/cms/content_block/templates/render.html.erb
browsercms-3.5.0.rc1 lib/generators/cms/content_block/templates/render.html.erb