Files
Phraseanet/templates/web/prod/WorkZone/Browser/Results.html.twig
Romain Neutron e7421e1fdd Fix twig tags
2013-12-03 20:02:39 +01:00

140 lines
5.6 KiB
Twig
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% import 'common/thumbnail.html.twig' as thumbnail %}
<div class="PNB header">
<table>
<tr>
<td>
{% if Total == 0 %}
{{ 'No results' | trans }}
{% elseif Total == 1 %}
{{ '1 result' | trans }}
{% else %}
{% trans %}{{ Total }} results{% endtrans %}
{% endif %}
</td>
<td class="paginator">
{% if Page - 1 > 0 %}
<a href="{{ path('prod_workzone_search', { 'Query' : Query, 'Year' : Year, 'Type' : Type, 'Page' : (Page - 1) }) }}" class="result">
<img src="/skins/prod/Basket/Browser/left.png" />
</a>
{% endif %}
<span>
Page {{ Page }} / {{ MaxPage }}
</span>
{% if Page + 1 <= MaxPage %}
<a href="{{ path('prod_workzone_search', { 'Query' : Query, 'Year' : Year, 'Type' : Type, 'Page' : (Page + 1) }) }}" class="result">
<img src="/skins/prod/Basket/Browser/right.png" />
</a>
{% endif %}
</td>
</tr>
</table>
</div>
<div class="PNB datas">
<div class="PNB" style="right:10px">
{% for Basket in Baskets %}
<div class="result {% if loop.index is odd %}odd{% endif %}">
<a href="{{ path('basket_delete', {basket: Basket.getId()}) }}" class="delete-basket close" title="{% trans %}Delete basket{% endtrans %}" style="color:#fff;padding:2px">×</a>
<div class="PNB10" style="right:15px;">
<table>
<tr>
<td class="thumbnail">
{% set BasketElement = Basket.getElements().first() %}
{% if BasketElement %}
{{thumbnail.format(BasketElement.getRecord(app).get_thumbnail(), 80, 80, '', true, false)}}
{% endif %}
<div class="counter">
{{ Basket.getElements().count() }}
</div>
</td>
<td class="content">
<h1 class="title">
<img class="loader" src="/skins/prod/Basket/Browser/loader.gif" />
{% if Basket.getValidation() is empty or Basket.getValidation().isInitiator(app['authentication'].getUser()) %}
<a href="{{ path('prod_baskets_basket_archive', { 'basket' : Basket.getId(), 'archive' : 1 }) }}" class="archiver archive_toggler" style="display:{{ Basket.getArchived ? 'none' : '' }};">
<span>
<img src="/skins/prod/Basket/Browser/archive.png"/>
</span>
</a>
<a href="{{ path('prod_baskets_basket_archive', { 'basket' : Basket.getId(), 'archive' : 0 }) }}" class="unarchiver archive_toggler" style="display:{{ Basket.getArchived ? '' : 'none' }};">
<span>
<img src="/skins/prod/Basket/Browser/archived.png"/>
</span>
</a>
{% endif %}
<a class="basket_link" href="{{ path('prod_workzone_basket', { basket : Basket.getId() }) }}">
{{ Basket.getName() }}
</a>
</h1>
{% if Basket.getPusher(app) %}
<p>
{% set user_name = '<a href="/user/' ~ Basket.getPusher(app).get_id() ~ '/" tooltipsrc="' ~ path('prod_tooltip_user', { 'usr_id' : Basket.getPusher(app).get_id() }) ~ '" class="UserTips">' ~ Basket.getPusher(app).get_display_name() ~ '</a>' %}
{% trans %}
Received from {{ user_name }}
{% endtrans %}
</p>
{% endif %}
{% if Basket.getValidation() %}
<p>
{% set list_participants = '' %}
{% for Participant in Basket.getValidation().getParticipants() %}
{% if list_participants != '' %}
{% set list_participants = list_participants ~ ', ' %}
{% endif %}
{% set list_participants = list_participants ~ '<a class="UserTips" tooltipsrc="' ~ path('prod_tooltip_user', { 'usr_id' : Participant.getUser(app).get_id() }) ~ '" href="/user/' ~ Participant.getUser(app).get_id() ~ '/">' %}
{% set list_participants = list_participants ~ Participant.getUser(app).get_display_name %}
{% set list_participants = list_participants ~ '</a>' %}
{% endfor %}
{% trans %}
Sent for validation to {{ list_participants }}
{% endtrans %}
</p>
{% endif %}
</td>
<td>
</td>
</tr>
</table>
</div>
</div>
{% endfor %}
</div>
</div>
<div class="PNB footer">
<table>
<tr>
<td>
{% if Total == 0 %}
{{ 'No results' | trans }}
{% elseif Total == 1 %}
{{ '1 result' | trans }}
{% else %}
{% trans %}{{ Total }} results{% endtrans %}
{% endif %}
</td>
<td class="paginator">
{% if Page - 1 > 0 %}
<a href="{{ path('prod_workzone_search', { 'Query' : Query, 'Year' : Year, 'Type' : Type, 'Page' : (Page - 1) }) }}" class="result">
<img src="/skins/prod/Basket/Browser/left.png" />
</a>
{% endif %}
<span>
Page {{ Page }} / {{ MaxPage }}
</span>
{% if Page + 1 <= MaxPage %}
<a href="{{ path('prod_workzone_search', { 'Query' : Query, 'Year' : Year, 'Type' : Type, 'Page' : (Page + 1) }) }}" class="result">
<img src="/skins/prod/Basket/Browser/right.png" />
</a>
{% endif %}
</td>
</tr>
</table>
</div>