<div class="modal-window-overlay" toggle-modal control="alertasCtrl.toggleModal" ng-include src="'angular/Controle/app/scripts/layouts/modal-window/modal-window-excluir-alerta.html'">
</div>
<notification-messages></notification-messages>
<div class="header">
    <h1>Alertas</h1>
    <span class="hr"></span>
    <ul class="main-menu-top">
        <li>
            <!--<a href="mensagens">Mensagens Rápidas</a>-->
            <linkto link="Controle/Mensagens" text="Mensagens Rápidas"></linkto>
        </li>
        <li class="active">
            <!--<a href="alertas">Alertas</a>-->
            <linkto link="Controle/Alertas" text="Alertas"></linkto>
        </li>

    </ul>
</div>

<!--<a class="btn-modal" href="novo-alerta">
  <i class="icon-plus"></i> Novo Alerta
</a>-->

<linkto link="Controle/Alertas/NovoAlerta" class="btn-modal" icon="icon-plus" text="Novo Alerta"></linkto>

<div class="table-alertas">
    <table class="table">
        <thead class="table-sort">
            <tr>
                <th>Ícone</th>
                <th ng-click="OrderBy('Data')">Data de Criação</th>
                <th ng-click="OrderBy('Descricao')">Alerta</th>
                <th ng-click="OrderBy('Critico')">Alerta Crítico</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
            </tr>
        </thead>
        <tbody ng-repeat="item in Alertas">
            <tr>
                <td class="icone-alerta"><i class="{{item.ClasseIcone}}"></i></td>
                <td>{{item.DataInsercaoFormatada}}</td>
                <td>{{item.Descricao}}</td>
                <td>{{item.IsCritico}}</td>
                <td class="icone"><linkto link="Controle/Alertas/EditarAlerta/" id="{{item.Codigo}}" icon="icon-pencil" text=""></linkto></td>
                <td class="icone"><i class="icon-cross" ng-click="alertasCtrl.toggleModal.confirmarExclusaoAlerta(item.Codigo)"></i></td>
            </tr>
        </tbody>

    </table>

</div>
<pagination></pagination>