kompass/modules/Gruppen/Views/GruppenOverview.php

43 lines
1.4 KiB
PHP
Raw Normal View History

<?php
use Bdp\Modules\Gruppen\Controllers\MainController as GruppenController;
function kompass_print_gruppen_overview()
{
global $dbHandler;
?>
<form method="post" action="admin.php?page=kompass-groups">
<p style="width: 100%; text-align: right">
<input type="hidden" name="action" value="searchmember">
<input type="text" name="member_name" style="width: 500px;"
placeholder="<?=__('Search for member', BDP_LV_PLUGIN_SLUG); ?>" />
</p>
</form>
<table class="wp-list-table widefat fixed striped table-view-list" id="myTable">
<thead>
<tr>
<th scope="col" class="manage-column column-name"><?= __('Group Name', BDP_LV_PLUGIN_SLUG); ?></th>
<th scope="col" class="manage-column column-name"><?= __('Number Members', BDP_LV_PLUGIN_SLUG); ?></th>
<th style="width: 100px;" class="manage-column column-name"><?= __('Actions', BDP_LV_PLUGIN_SLUG); ?></th>
</tr>
</thead>
<tbody>
<?php
foreach ($dbHandler->readFromDb( GruppenController::KOMPASS_STAMMESGRUPPEN_GRUPPEN) as $currentGruppe) {
echo '<tr>';
echo '<td>' . $currentGruppe->gruppen_name .'</td>';
echo '<td>' . $dbHandler->countSqlRows(GruppenController::KOMPASS_STAMMESGRUPPEN_TEILIS, ['gruppe_id' => $currentGruppe->id]) .'</td>';
echo '<td><a href="admin.php?page=bdp-kompass-limit-login-attempts&action=removeFromList">' .
__('Show Members', BDP_LV_PLUGIN_SLUG) . '</a></td>';
echo '</tr>';
}
?>
</tbody>
</table>
<?php
}