Display created by id

This commit is contained in:
slawkens 2024-12-19 22:32:28 +01:00
parent 8e0978c1ed
commit 988a3f2dbe
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ defined('MYAAC') or die('Direct access not allowed!');
$accounts = 0; $accounts = 0;
if ($db->hasColumn('accounts', 'created')) { if ($db->hasColumn('accounts', 'created')) {
$accounts = Account::orderByDesc('created')->limit(10)->get(['created', (USE_ACCOUNT_NAME ? 'name' : 'id')])->toArray(); $accounts = Account::orderByDesc('created')->limit(10)->get(['id', 'created'])->toArray();
} }
$twig->display('created.html.twig', array( $twig->display('created.html.twig', array(

View File

@ -19,7 +19,7 @@
{% set i = i + 1 %} {% set i = i + 1 %}
<tr> <tr>
<th>{{ i }}</th> <th>{{ i }}</th>
<td><a href="?p=accounts&search_name={{ result.name }}">{{ result.name }}</a></td> <td><a href="?p=accounts&id={{ result.id }}">{{ result.id }}</a></td>
<td>{{ result.created|date("M d Y, H:i:s") }}</td> <td>{{ result.created|date("M d Y, H:i:s") }}</td>
</tr> </tr>
{% endfor %} {% endfor %}