<%- object = model_name(:ivar) -%> .action-bar.-main.btn-group
= link_to 'All <%= model_name(:humans) %>', <%= web_ui.path(:index) %>, class: 'btn btn-default' = link_to 'Edit', <%= web_ui.path(:edit, object) %>, class: 'btn btn-default'
<% web_ui.custom_actions.select(&:member?).each do |action| -%>
= link_to '<%= action.name(:human).titleize %>', <%= web_ui.path(action, object) %>, class: 'btn btn-default'<%= ", method: :#{action.method}" unless action.get? %>
<% end -%>
%h1.title
= <%= model_name(:ivar) %>
%dl <% web_ui.model.renderable_attrs.each do |attribute| -%>
<%- model_attribute = "#{object}.#{attribute.name}" -%> %dt = <%= model_name(:class) %>.human_attribute_name(:<%= attribute.name %>) %dd <%- case attribute.type -%> <%- when :string -%> = <%= model_attribute %> <%- when :email -%> = mail_to <%= model_attribute %>, nil <%- when :url -%> = link_to <%= model_attribute %>, <%= model_attribute %> <%- when :integer -%> = <%= model_attribute %> <%- when :money -%> = <%= model_attribute %> € <%- when :text -%> = simple_format(<%= model_attribute %>) <%- when :flag -%> = <%= model_attribute %> ? 'Yes' : 'No' <%- when :datetime -%> = l(<%= model_attribute %>.to_date) if <%= model_attribute %> <%- when :foreign_key -%> = <%= model_attribute.sub /_id$/, '' %> <%- end -%>
<%- end -%>