mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 22:13:13 +00:00
92 lines
3.5 KiB
Twig
92 lines
3.5 KiB
Twig
{% set success = app['request'].query.get('success') %}
|
||
{% set action = app['request'].query.get('action') %}
|
||
|
||
<div id="order_manager">
|
||
{% if success == '1' %}
|
||
<div class="alert alert-success">
|
||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||
{% if action == 'order' %}
|
||
{% trans 'The records have been properly ordered' %}
|
||
{% elseif action == 'send' %}
|
||
{% trans 'Order has been sent' %}
|
||
{% elseif action == 'deny' %}
|
||
{% trans 'Order has been denied' %}
|
||
{% endif %}
|
||
</div>
|
||
{% elseif success == '0'%}
|
||
<div class="alert alert-error">
|
||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||
{% trans 'An error occured, please retry or contact an admin if problem persists' %}
|
||
</div>
|
||
{% endif %}
|
||
|
||
<div class='well' style="color:#333">
|
||
<table class="table">
|
||
<thead>
|
||
<tr>
|
||
<th>
|
||
{% trans %}Page {{page}}{% endtrans %}
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<thead>
|
||
<tr>
|
||
<th>{% trans 'Utilisateur' %}</th>
|
||
<th>{% trans 'Date de demande' %}</th>
|
||
<th>{% trans 'Deadline' %}</th>
|
||
<th>{% trans 'Utilisation prevue' %}</th>
|
||
<th>{% trans 'Statut' %}</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{% for order in orders %}
|
||
{% set deadline = app['date-formatter'].getPrettyString(order.get_deadline()) %}
|
||
<tr id="order_{{ order.get_order_id() }}" class="order_row" {{ current_date > order.get_deadline() ? "style=color:#777": "" }}>
|
||
<td>{{ order.get_user().get_display_name() }}</td>
|
||
<td>{{ app['date-formatter'].getPrettyString(order.get_created_on()) }}</td>
|
||
<td>
|
||
{% if deadline != '' %}
|
||
{{deadline}}
|
||
{% else %}
|
||
{% trans 'Aucune' %}
|
||
{% endif %}
|
||
</td>
|
||
<td>{{ order.get_usage()|raw }}</td>
|
||
<td>{% if order.get_todo() == 0 %}<img src="/skins/icons/ok.png" />{% endif %}</td>
|
||
</tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<div class='well-small'>
|
||
<ul class="pager">
|
||
{% if previousPage %}
|
||
<li class="previous"><a class='self-ajax' href="{{ path('prod_orders', {'page': previousPage}) }}"><i class="icon-arrow-left"></i>{% trans 'Previous' %}</a></li>
|
||
{% endif %}
|
||
|
||
{% if nextPage %}
|
||
<li class="next"><a class='self-ajax' href="{{ path('prod_orders', {'page': nextPage}) }}"><i class="icon-arrow-right"></i>{% trans 'Next' %}</a></li>
|
||
{% endif %}
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
|
||
$(document).ready(function(){
|
||
var dialog = p4.Dialog.get(1);
|
||
|
||
$('a.self-ajax', dialog.getDomElement()).bind('click', function(){
|
||
var url = $(this).attr('href');
|
||
dialog.load(url);
|
||
});
|
||
|
||
$('tr.order_row', dialog.getDomElement()).bind('click', function(e){
|
||
var id = $(this).attr('id').split('_').pop();
|
||
dialog.load('/prod/order/' + id +'/');
|
||
}).addClass('clickable');
|
||
});
|
||
|
||
</script>
|