Sha256: 29aa442a6ccfdfabb1f636600b3c447c14bdab610f943440a2365584cb4504b8
Contents?: true
Size: 1.15 KB
Versions: 4
Compression:
Stored size: 1.15 KB
Contents
<% content_for :sidebar do %> <%= typus_block :location => @resource[:self], :partial => 'sidebar' %> <%= actions %> <%= search %> <%= previous_and_next %> <% end %> <h2><%= link_to @resource[:human_name].pluralize, :action => 'index' %> › <%= _("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 if !raw_data.nil? when :file @item.typus_preview(field.first) when :text text = h(raw_data) defined?(RDiscount) ? markdown(text) : text else h(raw_data) end -%> <dd><%= !data.blank? ? data : '—' %></dd> <%- end -%> </dl> <%= typus_relationships %>
Version data entries
4 entries across 4 versions & 1 rubygems