<div class="starter-template container">
    <h1>{{model}}
        <a href="{{addLink}}">
            <button type="button" class="btn btn-primary">Ekle</button>
        </a>
    </h1>
    <div class="row" ng-if="!objects[1]">
        <div class="col-md-12">
            <p class="no-content">Listelenecek içerik yok.</p>
        </div>
    </div>
    <div class="tablescroll" ng-if="objects[1]">
        <table class="table table-bordered" style="background-color:#fff;">
            <thead>
            <tr>
                <td colspan="2">
                    <label>
                        <input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">
                        Hepsini Seç
                    </label>
                </td>
                <td ng-repeat="value in objects[0]" ng-if="objects[0]!='-1'">{{ value }}</td>
                <td ng-if="objects[0]=='-1'">{{ model || wf }}</td>
                <td>action</td>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="object in objects" ng-if="$index>0">
                <td width="60">
                    <label>
                        <input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">
                    </label>
                </td>
                <td scope="row" style="text-align:center">{{$index}}</td>
                <!-- below 2 of object will not be listed there for ng repeat loops 2 less -->
                <td ng-repeat="field in object.fields track by $index" ng-if="objects[0]=='-1'">
                    <a ng-href="{{object.detailLink}}">{{field}}</a>
                </td>

                <td ng-repeat="field in object.fields track by $index" ng-if="objects[0]!='-1'">
                    <a ng-href="{{object.detailLink}}" ng-if="$index==1">{{field}}</a>
                    <span ng-if="$index!=1">{{field}}</span>
                </td>
                <td>
                    <button class="btn btn-primary" style="margin-right: 5px;" ng-repeat="action in object.actions"
                            ng-if="action.show_as==='button'" ng-click="do_action(object)">{{action.name}}</button>
                    <a ng-href="javascript:void(0)" ng-repeat="action in object.actions"
                       ng-if="action.show_as==='link'" ng-click="do_action(object)">{{action.name}}</a>
                    <br>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <br/>
    <hr/>

    <div class="btn-group" ng-if="objects[1]">
        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true"
                aria-expanded="false">
            İşlemler <span class="caret"></span>
        </button>
        <ul class="dropdown-menu">
            <li><a href="">İşlem 1</a></li>
            <li><a href="">İşlem 2</a></li>
            <li><a href="">İşlem 3</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="">İşlem 4</a></li>
        </ul>
    </div>

    <hr>

</div>