<div id="bootstrap-theme">
  <div crm-ui-debug="$ctrl"></div>
  <span crm-ui-order="{var: 'wfOrder', defaults: ['msg_title','_is_translation','tx_language_label']}"></span>

  <div ng-include="'~/crmMsgadm/ListNav.html'"></div>

  <div class="form-inline">
    <label for="msgtpl-filter-text">{{:: ts('Filter') }}</label>
    <input class="form-control" type="search" id="msgtpl-filter-text" ng-model="filters.text">
  </div>

  <table class="table table-striped">
    <thead>
    <tr>
      <th><a crm-ui-order-by="[wfOrder, 'msg_title']">{{:: ts('Title') }}</a></th>
      <th></th>
    </tr>
    </thead>
    <tbody>
    <tr ng-repeat="record in $ctrl.records | filter:filters.text | orderBy:wfOrder.get()">
      <td>{{record.msg_title}}</td>
      <td  class="text-right">
        <a ng-show="record.master_id" class="btn btn-xs btn-default" ng-click="$ctrl.revert(record)">{{:: ts('Revert') }}</a>
      </td>
      <td class="text-right">
        <a class="btn btn-xs btn-default" ng-href="{{$ctrl.editUrl(record)}}">{{:: ts('Edit') }}</a>
      </td>
    </tr>
    </tbody>
  </table>

</div>
