overview.blade.php 2.22 KB
@extends('layouts.default', ['isShowAds' => false])

@section('title', 'Bans Overview')

@section('content')
    <div class="bans-overview fixed-header-push" ng-controller="BansOverviewController as ctrl" ng-cloak>
        <div class="row">
            <div class="col-md-4">
                <input type="text" ng-model="ctrl.username" ng-change="ctrl.searchUser()" ng-model-options="{ debounce: 300 }" class="form-control" placeholder="username" />
            </div>
        </div>
        
        <div class="ban-summaries full-width">
            <div class="ban-summaries__header row">
                <div class="col-xs-4 col-ms-3">Username</div>
                <div class="col-xs-5 col-ms-3 ban-summary__latest">
                    <span class="pointer" ng-click="ctrl.setSort('latestBan')">
                        Latest Ban <span ng-show="ctrl.sortBy === 'latestBan'">↓</span>
                    </span>
                </div>
                <div class="col-xs-3 col-ms-3 text-center">
                    <span class="pointer" ng-click="ctrl.setSort('banCount')">
                        Total <span ng-show="ctrl.sortBy === 'banCount'">↓</span>
                    </span>
                </div>
            </div>
            <div class="ban-summary row pointer" ng-repeat="summary in ctrl.summaries" ng-click="ctrl.getBans(summary.userId)">
                <div class="col-xs-4 col-ms-3">
                    @{{ summary.username }}
                </div>
                <div class="col-xs-5 col-ms-3 ban-summary__latest">@{{ summary.latestBan | date:'mediumDate' }}</div>
                <div class="col-xs-3 col-ms-3 text-center">
                    @{{ summary.banCount }}&nbsp;
                    <span class="icn icn-file visible-xs-inline" style="font-size: 16px;"></span>
                </div>
                <div class="col-xs-4 col-ms-3 hidden-xs text-center">
                    <span class="icn icn-file" style="font-size: 16px;"></span>
                </div>
            </div>
            <div class="text-center" style="margin: 20px" ng-show="!ctrl.summaries"><span class="spinner"></span></div>
        </div>

        <div class="btn btn-default btn-block" ng-click="ctrl.loadMore()">Load more</div>
    </div>
@endsection