{% extends '@forum/adminLayout.html.twig' %}

{% block content %}
{{ fireHook('view.admin.index.start') }}
    <div class="row">
        <div class="col-lg-3 col-md-6">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <div class="row">
                        <div class="col-xs-3">
                            <i class="fa fa-comments fa-5x"></i>
                        </div>
                        <div class="col-xs-9 text-right">
                            <div class="huge">26</div>
                            <div>New Comments!</div>
                        </div>
                    </div>
                </div>
                <a href="#">
                    <div class="panel-footer">
                        <span class="pull-left">View Details</span>
                        <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                        <div class="clearfix"></div>
                    </div>
                </a>
            </div>
        </div>
        <div class="col-lg-3 col-md-6">
            <div class="panel panel-green">
                <div class="panel-heading">
                    <div class="row">
                        <div class="col-xs-3">
                            <i class="fa fa-tasks fa-5x"></i>
                        </div>
                        <div class="col-xs-9 text-right">
                            <div class="huge">12</div>
                            <div>New Tasks!</div>
                        </div>
                    </div>
                </div>
                <a href="#">
                    <div class="panel-footer">
                        <span class="pull-left">View Details</span>
                        <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                        <div class="clearfix"></div>
                    </div>
                </a>
            </div>
        </div>
        <div class="col-lg-3 col-md-6">
            <div class="panel panel-yellow">
                <div class="panel-heading">
                    <div class="row">
                        <div class="col-xs-3">
                            <i class="fa fa-shopping-cart fa-5x"></i>
                        </div>
                        <div class="col-xs-9 text-right">
                            <div class="huge">124</div>
                            <div>New Orders!</div>
                        </div>
                    </div>
                </div>
                <a href="#">
                    <div class="panel-footer">
                        <span class="pull-left">View Details</span>
                        <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                        <div class="clearfix"></div>
                    </div>
                </a>
            </div>
        </div>
        <div class="col-lg-3 col-md-6">
            <div class="panel panel-red">
                <div class="panel-heading">
                    <div class="row">
                        <div class="col-xs-3">
                            <i class="fa fa-support fa-5x"></i>
                        </div>
                        <div class="col-xs-9 text-right">
                            <div class="huge">13</div>
                            <div>Support Tickets!</div>
                        </div>
                    </div>
                </div>
                <a href="#">
                    <div class="panel-footer">
                        <span class="pull-left">View Details</span>
                        <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                        <div class="clearfix"></div>
                    </div>
                </a>
            </div>
        </div>
    </div>

    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">10 last registered</h3>
        </div>
        <div class="list-group">
            <div class="list-group-item list-group-item-info">
                <div class="row">
                    <div class="hidden-sm col-xs-1">
                        {{ trans('Id') }}
                    </div>
                    <div class="col-sm-5">
                        {{ trans('Info') }}
                    </div>
                    <div class="col-sm-2">
                        {{ trans('Registered') }}
                    </div>
                    <div class="hidden-sm col-xs-2">
                        {{ trans('Last visit') }}
                    </div>
                    <div class="col-sm-2 text-right">
                        {{ trans('Actions') }}
                    </div>
                </div>
            </div>
        {% for row in lastUsers %}
            <div class="list-group-item">
                <div class="row">
                    <div class="hidden-sm col-xs-1">
                        {{ row.id }}
                    </div>
                    <div class="col-sm-5">
                        <a href="{{ pathFor('userProfile', {'id': row.id}) }}">{{ row.username }}</a>, {{ row.email }}<br />
                        {{ row.registration_ip }}
                    </div>
                    <div class="col-sm-2">
                        {{ formatTime(row.registered) }}
                    </div>
                    <div class="hidden-sm col-xs-2{{ row.group_id == getEnv('FEATHER_UNVERIFIED') ? ' bg-warning' : '' }}">
                        {{ formatTime(row.last_visit) }}
                    </div>
                    <div class="col-xs-2">
                        <div class="btn-group inline pull-right">
                            <a class="btn btn-primary btn-sm" href="{{ pathFor('userProfile', {'id': row.id}) }}">
                                <i class="fa fa-pencil-square-o fa-lg" aria-hidden="true"></i>
                                {#{{ trans('Edit') }}#}
                            </a>
                            {% if row.group_id != getEnv('FEATHER_ADMIN') %}
                            <a class="btn btn-danger btn-sm" href="#">
                                <i class="fa fa-trash fa-lg" aria-hidden="true"></i>
                                {#{{ trans('Delete') }}#}
                            </a>
                            {% endif %}
                        </div>
                    </div>
                </div>
            </div>
        {% endfor %}
        </div>
    </div>


    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">{{ trans('Forum admin head') }}</h3>
        </div>
        <div class="list-group">
            <div class="col-sm-12">
                <br>
                <p>{{ trans('Welcome to admin') }}</p>
                <ul>
                    <li><span>{{ trans('Welcome 1') }}</span></li>
                    <li><span>{{ trans('Welcome 2') }}</span></li>
                    <li><span>{{ trans('Welcome 3') }}</span></li>
                    <li><span>{{ trans('Welcome 4') }}</span></li>
                    <li><span>{{ trans('Welcome 5') }}</span></li>
                    <li><span>{{ trans('Welcome 6') }}</span></li>
                    <li><span>{{ trans('Welcome 7') }}</span></li>
                    <li><span>{{ trans('Welcome 8') }}</span></li>
                    <li><span>{{ trans('Welcome 9') }}</span></li>
                </ul>
            </div>
        </div>
    </div>

    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">{{ trans('About head') }}</h3>
        </div>
        <div class="list-group">
            {#<div class="row">#}
            <div class="col-sm-12">
                <br>
                <dl>
                    <dt>{{ trans('FeatherBB version label') }}</dt>
                    <dd>
                        {{ trans(['FeatherBB version data',
                        settings('o_cur_version'),
                        '<a href="' ~pathFor('adminAction', {'action': 'check_upgrade'}) ~'">' ~trans('Check for upgrade') ~'</a>'
                        ]) }}
                    </dd>
                    <dt>{{ trans('Server statistics label') }}</dt>
                    <dd>
                        <a href="{{ pathFor('statistics') }}">{{ trans('View server statistics') }}</a>
                    </dd>
                    <dt>{{ trans('Support label') }}</dt>
                    <dd>
                        <a href="https://github.com/runcmf/runbb">{{ trans('Forum label') }}</a> - <a
                                href="#">{{ trans('IRC label') }}</a>
                    </dd>
                </dl>
            </div>
            {#</div>#}
        </div>
    </div>
    {{ fireHook('view.admin.index.end') }}
{% endblock content %}
