<div ng-controller="LiveTilesFieldsController" class="livetiles-admin-fields">
    <div class="lt-module-page__top lt-module-page-top">
        <div class="lt-module-page-top__title mr-auto">
            <h1>{{'Tile Overview' | translate}}</h1>
        </div>
        <div class="lt-module-page-top__actions">
            <button type="button" class="btn btn-primary" ng-click="createField()">{{'Create' | translate}}</button>
        </div>
    </div>
    <div class="lt-module-page__content">
        <div class="container-fluid">
            <table class="table table-hover ciaranwasere">
                <colgroup>
                    <col />
                    <col />
                    <col />
                </colgroup>
                <thead>
                    <tr>
                        <th>{{'Display name' | translate}}</th>
                        <th>{{'Internal name' | translate}}</th>
                        <th>{{'Type' | translate}}</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="field in fieldsRoot.children track by field.id"
                        ng-click="!isBase(field) && editField(field)"
                        ng-class="isBase(field) ? 'livetiles-base-field' : 'livetiles-cursor-pointer'"
                        ng-attr-title="{{isBase(field) ? null : ('Click to edit' | translate)}}">
                        <td>
                            {{field.value.label}}<span ng-if="isBase(field)" class="glyphicon glyphicon-lock" aria-hidden="true"></span>
                        </td>
                        <td>{{field.title}}</td>
                        <td>{{field.value.type}}</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
