ok for output index in movement
This commit is contained in:
parent
e2bc0ea8f8
commit
02489e4550
@ -1,36 +1,16 @@
|
||||
<!-- nav bar-->
|
||||
{include file="%s_nav.tpl"|args:$plugin_tpl current_nav="sorties"}
|
||||
|
||||
<!-- -->
|
||||
<!-- add output links -->
|
||||
<fieldset>
|
||||
<legend>Ajouter une sortie pour du </legend>
|
||||
{linkbutton shape="plus" label="Matériel en stock disponible" href="stock_disponible.php"}
|
||||
{linkbutton shape="plus" label="Matériel emprunté" href="emprunte.php"}
|
||||
</fieldset>
|
||||
|
||||
{if $outputs}
|
||||
<table class="list">
|
||||
<thead>
|
||||
<th><b>Date</b></th>
|
||||
<th><b>Type</b></th>
|
||||
<th><b>Nombre</b></th>
|
||||
<th><b>Matériel</b></th>
|
||||
<th><b>Remarques</b></th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$outputs item="output"}
|
||||
<tr>
|
||||
<td>{$output.output_date|date_format:'%d/%m/%y'}</td>
|
||||
<td>{$output.kind}</td>
|
||||
<td>{$output.equipment_number}</td>
|
||||
<td>{$output.equipment}</td>
|
||||
<td>{$output.additional_comment}</td>
|
||||
<td class="actions">
|
||||
{linkbutton shape="delete" label="Supprimer" href="supprimer_sortie.php?id=%d"|args:$output.id}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{/if}
|
||||
|
||||
<!-- -->
|
||||
<!-- entries table -->
|
||||
{include file="%smouvements/tableau_mouvements.tpl"|args:$plugin_tpl mvts=$mvts del_href="supprimer_sortie.php?id=%d"}
|
||||
<!-- -->
|
||||
<!-- footer -->
|
||||
{include file="admin/_foot.tpl"}
|
||||
<!-- -->
|
||||
|
@ -2,21 +2,12 @@
|
||||
|
||||
namespace Garradin;
|
||||
|
||||
use Garradin\Plugin\Materiels\Equipment;
|
||||
use Garradin\Plugin\Materiels\Output;
|
||||
require_once __DIR__ . '/../_inc.php';
|
||||
|
||||
require_once __DIR__ . '/../../_inc.php';
|
||||
// get the list of all outputs and send it to template
|
||||
|
||||
$eqmt = new Equipment;
|
||||
$output = new Output;
|
||||
$mvts = $mvt->listAllOneSide(1);
|
||||
|
||||
$outputs = $output->listAll();
|
||||
|
||||
foreach ($outputs as $key => $value) {
|
||||
$output_eqmt = $eqmt->get($value->equipment_id);
|
||||
$outputs[$key]->equipment = $output_eqmt->designation;
|
||||
}
|
||||
|
||||
$tpl->assign(compact('outputs'));
|
||||
$tpl->assign(compact('mvts'));
|
||||
|
||||
$tpl->display(PLUGIN_ROOT . '/templates/mouvements/sorties/index.tpl');
|
||||
|
Loading…
Reference in New Issue
Block a user