Sha256: 0790a613ebf577feb55d2f79b765667a63f9e987463bd7952a190f6f9f938544

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 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 :text
             defined?(RDiscount) ? markdown(raw_data) : raw_data
           else
             raw_data
           end
  -%>
  <dd><%= !data.blank? ? (data_type.eql?(:text) ? markdown(data) : h(data)) : '&#151;' %></dd>
<%- end -%>
</dl>

<%= typus_relationships %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
typus-0.9.28 app/views/admin/resources/show.html.erb