Пример #1
0
<?php

$page_title = __('Coaches');
$Crumbs->setRoot($page_title);
// Get number of coach requests for current user.
$client_requests_table = new Tables\ClientRequests();
$coach_requests_count = $client_requests_table->by('client_id', getUser()->id)->count();
$Template->output('header', ['title' => $page_title, 'nav_active' => 'coaches', 'page_controls' => [['text' => __('Requests') . ' (' . $coach_requests_count . ')', 'url' => 'coaches/requests']]]);
$Template->output('validator/status');
$Cache->cacheOutput(function ($data) {
    extract($data);
    $table = new Tables\Clients();
    $coaches = $table->getCoaches();
    if ($coaches) {
        ?>
		<table class="overview">
			<thead>
				<tr>
					<th><?php 
        echo __('Name');
        ?>
</th>
					<th><?php 
        echo __('Since');
        ?>
</th>
					<th><?php 
        echo __('Messages');
        ?>
</th>
				</tr>