app/assets/javascripts/templates/templates/index.html.slim

Summary

Maintainability
Test Coverage
.row ng-show="templates.length"
  .col-lg-12
    .widget
      .widget-header
        i.fa.fa-support
        = Kms::Template.model_name.human(count: 1.1)
        a.btn.btn-sm.btn-primary.pull-right ui-sref="templates.new" ng-show="currentUser.admin"
          = I18n.t(:add_template)
      .widget-body.no-padding
        .table-responsive
          table.table
            tbody
              tr ng-repeat="template in templates"
                td style="width: 80%"
                  a ui-sref="templates.edit({id: template.id})" ng-show="currentUser.admin"
                    | {{ template.name }}
                  span ng-hide="currentUser.admin"
                    | {{ template.name }}
                td
                  .btn-group.pull-right
                    a.btn.btn-sm.btn-danger ng-click="destroy(template)" ng-show="currentUser.admin"
                      i.fa.fa-times
.row ng-show="!templates.length"
  .center-block
    .jumbotron.vertical-center.text-center
      .container
        h1
          span.fa-stack.fa-lg
            i.fa.fa-circle.fa-stack-2x
            i.fa.fa-support.fa-stack-1x
        p = I18n.t(:templates_description)
        p
          a.btn.btn-primary.btn-lg ui-sref="templates.new" role="button" = I18n.t(:create_first_template)