Sha256: b5b9b330354bf316e06cde2567b0b71d7d99777020bc3a2ebd2ed0e4f9fccc9a
Contents?: true
Size: 1.37 KB
Versions: 3
Compression:
Stored size: 1.37 KB
Contents
<%- 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 -%>
Version data entries
3 entries across 3 versions & 1 rubygems