Sha256: 99d4ac043a651d4913ecbc5e4b5fe6dc52b5fbcf2b528a548a4b179e81a3ecbd

Contents?: true

Size: 1.44 KB

Versions: 5

Compression:

Stored size: 1.44 KB

Contents

<%% content_for :body_content_title do %>
  <%%= @<%= singular_name %><% if (title = attributes.detect { |a| a.type.to_s == "string" }).present? %>.<%= title.name %><% else %>.title<% end %> %>
<%% end %>

<%% content_for :body_content_left do %>
<% attributes.each do |attribute| -%>
  <section>
    <h1><%= attribute.name.titleize %></h1>
    <p>
<% if attribute.type.to_s == 'image' -%>
      <%%= image_fu @<%= singular_name %>.<%= attribute.name %>, nil %>
<% elsif attribute.type.to_s == 'resource' -%>
      <%% if @<%= singular_name %>.<%= attribute.name %>.present? %>
        <%%= link_to <%= "'#{attribute.name}'" %>, @<%= singular_name %>.<%= attribute.name %>.url %>
      <%% else %>
        <%= attribute.name %>
      <%% end %>
<% else -%>
      <%%=raw @<%= singular_name %>.<%= attribute.name %> %>
<% end -%>
    </p>
  </section>
<% end -%>
<%% end %>

<%% content_for :body_content_right do %>
  <aside>
    <h2><%%= t('.other') %></h2>
    <ul id="<%= plural_name %>">
      <%% @<%= "all_" if plural_name == singular_name%><%= plural_name %>.each do |<%= singular_name %>| %>
        <li>
          <%%= link_to <%= singular_name %><% if (title = attributes.detect { |a| a.type.to_s == "string" }).present? %>.<%= title.name %><% else %>.title<% end %>, refinery.<%= namespacing.underscore %>_<%= singular_name %>_path(<%= singular_name %>) %>
        </li>
      <%% end %>
    </ul>
  </aside>
<%% end %>

<%%= render '/refinery/content_page' %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
refinerycms-core-2.0.4 lib/generators/refinery/engine/templates/app/views/refinery/namespace/plural_name/show.html.erb
refinerycms-core-2.0.3 lib/generators/refinery/engine/templates/app/views/refinery/namespace/plural_name/show.html.erb
refinerycms-core-2.0.2 lib/generators/refinery/engine/templates/app/views/refinery/namespace/plural_name/show.html.erb
refinerycms-core-2.0.1 lib/generators/refinery/engine/templates/app/views/refinery/namespace/plural_name/show.html.erb
refinerycms-core-2.0.0 lib/generators/refinery/engine/templates/app/views/refinery/namespace/plural_name/show.html.erb