EagerELK/ditty

View on GitHub
lib/ditty/templates/views/display.haml.tt

Summary

Maintainability
Test Coverage
.row
  .col-md-2
  .col-md-8
    .card.card-default.shadow
      .card-body
        <%- columns.each do |col| -%>
        %p.description
          %label <%= col.to_s.titleize %>:
          = entity.<%= col %>
        <%- end %>

        .row
          .col-md-6
            - if policy(entity).update?
              %a.btn.btn-secondary{ href: "#{base_path}/#{entity.display_id}/edit" } Edit
          .col-md-6.text-right
            - if policy(entity).delete?
              = delete_form(entity)
  .col-md-2