Commit 06b6179b authored by Denis S. Valdenaire's avatar Denis S. Valdenaire

debut historique des emprunts

parent f162b156
......@@ -22,7 +22,7 @@ class Game extends Record {
$sql = "SELECT games.id, name, reference, maker, category, esar_category_id,
comments, maker_info, content_inventory, DATE_FORMAT(aquisition_date, '%m/%d/%Y') as aquisition_date,
price, players_min, players_max,
age_min, age_max, game_type, loans.id as loan_id, DATE_FORMAT(loans.end_date, '%d/%m/%Y') AS loan_end_date
age_min, age_max, game_type, loans.id as loan_id, loans.end_date AS loan_end_date
FROM games
LEFT OUTER JOIN loans ON (games.id = loans.game_id AND loans.is_back = 0)
WHERE games.id = ".$id;
......
......@@ -9,7 +9,8 @@
{{ game.name }}
<small>
{% if game.loan_id %}
INDISPONIBLE : <a href="index.php?o=loans&a=edit&i={{ game.loan_id }}">jusqu'au {{ game.loan_end_date }}</a>
INDISPONIBLE :
jusqu'au {{ game.loan_end_date | date("d/m/Y") }}
<span class="btn btn-success btn-md" style="float: right" id="reservation_button">
<i class="glyphicon glyphicon-plus"></i>
<span>Réserver...</span>
......@@ -18,6 +19,9 @@
DISPONIBLE
{% endif %}
</small>
<a href="index.php?o=games&a=loans&i={{ game.id }}">
Historique des emprunts
</a>
{% else %}
Nouveau jeu
{% endif %}
......
......@@ -36,7 +36,7 @@
<tbody>
{% for key, val in member.loans %}
<tr>
<td>{{ val.game_name }}
<td><a href="index.php?o=games&a=edit&i={{ val.game_id }}">{{ val.game_name }}</a>
{% if val.is_late %} <span class="label label-warning">En retard</span> {% endif %}
</td>
<td>{{ val.start_date | date("d/m/Y") }}</td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment