Sha256: 806da30e50fbd92607ae8a53f831fc04f8a8605497d679ea1b3c49eb18c86c01

Contents?: true

Size: 1.29 KB

Versions: 1

Compression:

Stored size: 1.29 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' -%>
      <%%= link_to <%= "'#{attribute.name}'" %>, @<%= singular_name %>.<%= attribute.name %>.url %>
<% 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 %>, main_app.phoenix_<%= singular_name %>_path(<%= singular_name %>) %>
        </li>
      <%% end %>
    </ul>
  </aside>
<%% end %>

<%%= render :partial => "/phoenix/content_page" %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
phoenix_core-0.2.1.beta lib/generators/phoenix/extension/templates/app/views/phoenix/plural_name/plural_name/show.html.erb