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

Summary

Maintainability
Test Coverage
.row ng-show="snippets.length"
  .col-lg-12
    .widget
      .widget-header
        i.fa.fa-bookmark
        = Kms::Snippet.model_name.human(count: 1.1)
        a.btn.btn-sm.btn-primary.pull-right ui-sref="snippets.new" ng-show="currentUser.admin"
          = I18n.t("add_snippet")
      .widget-body.no-padding
        .table-responsive
          table.table
            tbody
              tr ng-repeat="snippet in snippets"
                td style="width: 70%"
                  a ui-sref="snippets.edit({id: snippet.id})"
                    | {{ snippet.name }}
                td style="width: 20%"
                  em
                    | {{ snippet.slug }}
                td
                  .btn-group.pull-right
                    a.btn.btn-sm.btn-danger ng-click="destroy(snippet)" ng-show="currentUser.admin"
                      i.fa.fa-times
.row ng-show="!snippets.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-bookmark.fa-stack-1x
        p = I18n.t(:snippets_description)
        p
          a.btn.btn-primary.btn-lg ui-sref="snippets.new" role="button" = I18n.t(:create_first_snippet)