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"}
|
{include file="%s_nav.tpl"|args:$plugin_tpl current_nav="sorties"}
|
||||||
|
<!-- -->
|
||||||
|
<!-- add output links -->
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Ajouter une sortie pour du </legend>
|
<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 en stock disponible" href="stock_disponible.php"}
|
||||||
{linkbutton shape="plus" label="Matériel emprunté" href="emprunte.php"}
|
{linkbutton shape="plus" label="Matériel emprunté" href="emprunte.php"}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
<!-- -->
|
||||||
{if $outputs}
|
<!-- entries table -->
|
||||||
<table class="list">
|
{include file="%smouvements/tableau_mouvements.tpl"|args:$plugin_tpl mvts=$mvts del_href="supprimer_sortie.php?id=%d"}
|
||||||
<thead>
|
<!-- -->
|
||||||
<th><b>Date</b></th>
|
<!-- footer -->
|
||||||
<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}
|
|
||||||
|
|
||||||
{include file="admin/_foot.tpl"}
|
{include file="admin/_foot.tpl"}
|
||||||
|
<!-- -->
|
||||||
|
@ -2,21 +2,12 @@
|
|||||||
|
|
||||||
namespace Garradin;
|
namespace Garradin;
|
||||||
|
|
||||||
use Garradin\Plugin\Materiels\Equipment;
|
require_once __DIR__ . '/../_inc.php';
|
||||||
use Garradin\Plugin\Materiels\Output;
|
|
||||||
|
|
||||||
require_once __DIR__ . '/../../_inc.php';
|
// get the list of all outputs and send it to template
|
||||||
|
|
||||||
$eqmt = new Equipment;
|
$mvts = $mvt->listAllOneSide(1);
|
||||||
$output = new Output;
|
|
||||||
|
|
||||||
$outputs = $output->listAll();
|
$tpl->assign(compact('mvts'));
|
||||||
|
|
||||||
foreach ($outputs as $key => $value) {
|
|
||||||
$output_eqmt = $eqmt->get($value->equipment_id);
|
|
||||||
$outputs[$key]->equipment = $output_eqmt->designation;
|
|
||||||
}
|
|
||||||
|
|
||||||
$tpl->assign(compact('outputs'));
|
|
||||||
|
|
||||||
$tpl->display(PLUGIN_ROOT . '/templates/mouvements/sorties/index.tpl');
|
$tpl->display(PLUGIN_ROOT . '/templates/mouvements/sorties/index.tpl');
|
||||||
|
Loading…
Reference in New Issue
Block a user