2021-06-05 00:30:48 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Garradin;
|
|
|
|
|
2021-06-05 13:52:32 +02:00
|
|
|
use Garradin\Plugin\Materiels\Equipment;
|
|
|
|
use Garradin\Plugin\Materiels\Entry;
|
|
|
|
|
2021-06-05 18:48:45 +02:00
|
|
|
require_once __DIR__ . '/../_inc.php';
|
2021-06-05 00:30:48 +02:00
|
|
|
|
2021-06-05 13:52:32 +02:00
|
|
|
$eqmt = new Equipment;
|
|
|
|
$entry = new Entry;
|
|
|
|
|
|
|
|
$entries = $entry->listAll();
|
|
|
|
|
|
|
|
foreach ($entries as $key => $value) {
|
|
|
|
$entries[$key]->equipment = $eqmt->get($value->equipment_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
$tpl->assign(compact('entries'));
|
|
|
|
|
2021-06-05 18:48:45 +02:00
|
|
|
$tpl->display(PLUGIN_ROOT . '/templates/entrees/index.tpl');
|