Sha256: 6b331e4a6c1dbfbf53e88e0b78f1df9c6517cda16165b19538a75baa5073bfca

Contents?: true

Size: 1.08 KB

Versions: 5

Compression:

Stored size: 1.08 KB

Contents

<% content_for :sidebar do %>
  <%= typus_block :location => @resource[:self], :partial => 'sidebar' %>
  <%= actions %>
<% end %>

<h2><%= link_to @resource[:class].typus_human_name.pluralize, :action => 'index' %> &rsaquo; 
    <%= _("Show") %></h2>

<%= typus_block :location => @resource[:self], :partial => 'show' %>

<dl>
<%- @fields.each do |field| -%>
  <dt><%=h @resource[:class].human_attribute_name(field.first) %></dt>
  <%-
    data_type = field.last
    raw_data = @item.send(field.first)
    data = case data_type
           when :boolean
             boolean_hash = @resource[:class].typus_boolean(field.first)
             !raw_data.nil? ? boolean_hash["#{raw_data}".to_sym] : @resource[:class].typus_options_for(:nil)
           when :belongs_to
             raw_data.typus_name
           when :file
             @item.typus_preview(field.first)
           when :text
             defined?(RDiscount) ? markdown(raw_data) : raw_data
           else
             h(raw_data)
           end
  -%>
  <dd><%= !data.blank? ? data : '&#151;' %></dd>
<%- end -%>
</dl>

<%= typus_relationships %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
typus-0.9.34 app/views/admin/resources/show.html.erb
typus-0.9.33 app/views/admin/resources/show.html.erb
typus-0.9.32 app/views/admin/resources/show.html.erb
typus-0.9.31 app/views/admin/resources/show.html.erb
typus-0.9.30 app/views/admin/resources/show.html.erb