<h1 translate>Tags</h1>

<div id="submenu">
  <a ui-sref="core.tag.create" os-perms="core.can_manage_tags" class="btn btn-primary btn-sm">
    <i class="fa fa-plus fa-lg"></i>
    <translate>New</translate>
  </a>
</div>

<div class="row form-group">
  <div class="col-sm-8"></div>
  <div class="col-sm-4">
    <input type="text" os-focus-me ng-model="filter.search" class="form-control"
        placeholder="{{ 'Filter' | translate}}">
  </div>
</div>

<table class="table table-striped table-bordered table-hover">
  <thead>
    <tr>
      <th ng-click="toggleSort('name')" class="sortable">
        <translate>Name</translate>
        <i class="pull-right fa" ng-show="sortColumn === 'name' && header.sortable != false"
            ng-class="reverse ? 'fa-sort-desc' : 'fa-sort-asc'">
        </i>
      <th os-perms="core.can_manage_tags" class="minimum">
        <translate>Actions</translate>
  <tbody>
    <tr ng-repeat="tag in tags | filter: filter.search |
        orderBy: sortColumn:reverse">
      <td>{{ tag.name }}
      <td os-perms="core.can_manage_tags" class="nobr">
        <!-- edit -->
        <a ui-sref="core.tag.detail.update({id: tag.id })"
            class="btn btn-default btn-sm"
            title="{{ 'Edit' | translate}}">
          <i class="fa fa-pencil"></i>
        </a>
        <!-- delete -->
        <a ng-click="delete(tag)"class="btn btn-danger btn-sm"
            title="{{ 'Delete' | translate }}">
          <i class="fa fa-trash-o"></i>
        </a>
</table>
