<div ng-controller="cadastroController">

    <div class="modal-header">
        <h3>Classificação Económica</h3>
        <p align="right">
            <div class="input-group">
                <input type="text" class="form-control" placeholder="Procurar..." ng-model="procurar_class">
                <span class="input-group-addon">
                    <span class="glyphicon glyphicon-search"></span>
                </span>

            </div>
        </p>
    </div>
    <div ng-controller="ClassificacaoEconomicaCtrl">
        <div class="modal-body" ng-init="carregarClassificacoesEconomicas()" style="height:270px; overflow:auto">
            <table class="table table-bordered table-striped">
                <thead>
                    <tr>
                        <th>Descrição</th>
                        <!--<th ng-show="root_usaProgContabilidade()===false" style="width:30px; text-align:right">
                            <button ng-click="modalEditaClEconomica(null, carregarClassificacoesEconomicas, [])"
                                    type="button"
                                    ng-show="root_usaProgContabilidade()===false"
                                    class="btn btn-primary btn-xs">
                                <span class="glyphicon glyphicon-plus"></span>
                            </button>
                        </th>-->
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="cl in classificacoesEco | filter:procurar_class"
                        ng-click="selClassificacaoEco(cl); selected.item.Ceconomica = cl.Value;"
                        ng-class="{info:cl.Value==selected.item.Ceconomica}">
                        <td>{{cl.Value+' '+cl.Descricao}}</td>
                        <!--<td ng-show="root_usaProgContabilidade()===false">
                            <button ng-click="modalEditaClEconomica(cl, cl.AnoEconomico)"
                                    type="button"
                                    ng-show="root_usaProgContabilidade()===false"
                                    class="btn btn-default btn-xs">
                                <span class="glyphicon glyphicon-pencil"></span>
                            </button>
                        </td>-->
                    </tr>
                </tbody>
            </table>
            <!--<div class="list-group">
                <a ng-click="selClassificacaoEco(cl); selected.item.Ceconomica = cl.Value;"
                   href="javascript:void(0)"
                   ng-repeat="cl in classificacoesEco | filter:procurar_class"
                   class="list-group-item"
                   ng-class="{active:cl.Value==selected.item.Ceconomica}">
                    {{cl.Value+' '+cl.Descricao}}

                </a>

            </div>-->

        </div>
        <div class="modal-footer">
            <button class="btn btn-primary" ng-click="ok()">Aplicar</button>
            <button class="btn btn-warning" ng-click="cancel()">Cancelar</button>
        </div>
    </div>
    
</div>

