<div class="col-md-12" ng-controller="ViewDataTableController">
    <div id="viewlptop">
        <div class="paddedbottom10">
            <ul class="breadcrumb">
                <li><a href="#/system">{{'label.anchor.system' | translate}}</a></li>
                <li><a href="#/datatables">{{'label.anchor.managedatatables' | translate}}</a></li>
                <li class="active">{{datatable.registeredTableName}}</li>
            </ul>
        </div>
        <div>
            <div class="pull-right">
                <div class="btn-group">
                    <a href="#/editdatatable/{{datatable.registeredTableName}}" class="btn btn-primary" has-permission='UPDATE_DATATABLE'><i
                            class="icon-edit icon-white"></i> {{'label.button.edit' | translate}}</a>
                    <button type="button" class="btn btn-warning" ng-click="deleteTable()" has-permission='DELETE_DATATABLE'><i
                            class="icon-trash icon-white"></i> {{'label.button.delete' | translate}}
                    </button>
                </div>
            </div>
            <script type="text/ng-template" id="deletetable.html">
                <div class="modal-header silver">
                    <h3 class="bolder">{{'label.heading.delete' | translate}}</h3>
                </div>
                <div class="modal-body ">
                    <api-validate></api-validate>
                    <br>
                    <button class="btn btn-warning" ng-click="cancel()">{{'label.button.cancel' | translate}}</button>
                    <button class="btn btn-primary" ng-click="delete()">{{'label.button.confirm' | translate}}</button>
                </div>
            </script>
            <legend>{{datatable.registeredTableName}}</legend>
            <strong>{{'label.heading.associatedwith' | translate}}</strong>&nbsp;&nbsp;{{datatable.applicationTableName}}
            <table class="table" ui:sortable>
                <thead>
                <tr>
                    <th>{{'label.heading.fieldname' | translate}}</th>
                    <th>{{'label.heading.type' | translate}}</th>
                    <th>{{'label.heading.length' | translate}}</th>
                    <th>{{'label.heading.code' | translate}}</th>
                    <th>{{'label.heading.mandatory' | translate}}</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="column in datatable.columnHeaderData">
                    <td>{{column.columnName}}</td>
                    <td>{{column.columnDisplayType}}</td>
                    <td>{{column.columnLength}}</td>
                    <td>{{column.columnCode}}</td>
                    <td>{{!column.isColumnNullable}}</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
