Sha256: 2a3b26740e161d2fe896406fb1779e68888b13d6b4f6f471c951d4e4c01f9104
Contents?: true
Size: 1.3 KB
Versions: 3
Compression:
Stored size: 1.3 KB
Contents
<% page_title = _t("Show %{resource}", :resource => @resource.model_name.human) title(page_title) %> <% content_for :sidebar, build_sidebar %> <h2> <%= page_title %> <small></small> </h2> <%= display_flash_message %> <%= typus_block %> <dl> <%- @fields.each do |field| -%> <dt><%=h @resource.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.typus_boolean(field.first) !raw_data.nil? ? boolean_hash["#{raw_data}".to_sym] : @resource.typus_options_for(:nil) when :belongs_to if !raw_data.nil? controller = raw_data.class.to_resource action = raw_data.class.typus_options_for(:default_action_on_item) options = { :controller => controller, :action => action, :id => raw_data } link_to raw_data.to_label, options else nil end when :file typus_preview(@item, field.first) when :selector @item.mapping(field.first) else raw_data end -%> <dd><%= data.blank? ? "—".html_safe : data %></dd> <%- end -%> </dl> <%= raw typus_relationships %>
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
typus-1.0.0.pre8 | app/views/admin/resources/show.html.erb |
typus-1.0.0.pre7 | app/views/admin/resources/show.html.erb |
typus-1.0.0.pre6 | app/views/admin/resources/show.html.erb |