mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
134 lines
5.3 KiB
Twig
134 lines
5.3 KiB
Twig
{% import 'common/thumbnail.html.twig' as thumbnail %}
|
||
|
||
<div class="PNB header">
|
||
<table>
|
||
<tr>
|
||
<td>
|
||
{% transchoice Total %}
|
||
{0} No results|{1} Result|]1,Inf[ Results
|
||
{% endtranschoice %}
|
||
</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 rightBrowserInner">
|
||
<table>
|
||
<tr>
|
||
<td class="thumbnail">
|
||
{% set BasketElement = Basket.getElements().first() %}
|
||
{% if BasketElement %}
|
||
{{thumbnail.format(BasketElement.getRecord(app).get_thumbnail(), 150, 106, '', true, false)}}
|
||
{% endif %}
|
||
</td>
|
||
<td class="" width="12" style="font-size: 0"> </td>
|
||
<td class="content">
|
||
<h1 class="title">
|
||
<img class="loader" src="/assets/prod/images/Basket/Browser/loader.gif" />
|
||
{% if Basket.getValidation() is empty or Basket.getValidation().isInitiator(app.getAuthenticatedUser()) %}
|
||
<a href="{{ path('prod_baskets_basket_archive', { 'basket' : Basket.getId(), 'archive' : 1 }) }}" class="archiver archive_toggler" style="display:{{ Basket.getArchived ? 'none' : '' }};">
|
||
<span>
|
||
<img src="/assets/prod/images/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="/assets/prod/images/Basket/Browser/archived.png"/>
|
||
</span>
|
||
</a>
|
||
{% endif %}
|
||
<a class="basket_link" href="{{ path('prod_workzone_basket', { basket : Basket.getId() }) }}">
|
||
{{ Basket.getName() }}
|
||
<br><span class="basketCount">
|
||
{{ Basket.getElements().count() }} {{ ' records' }}
|
||
</span></a>
|
||
</h1>
|
||
|
||
|
||
{% if Basket.getPusher() %}
|
||
<p>
|
||
{% set user_name = '<a href="/user/' ~ Basket.getPusher().get_id() ~ '/" tooltipsrc="' ~ path('prod_tooltip_user', { 'usr_id' : Basket.getPusher(app).getId() }) ~ '" class="UserTips">' ~ Basket.getPusher(app).get_display_name() ~ '</a>' %}
|
||
{% trans with {'%user_name%' : user_name} %}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().getId() }) ~ '" href="/user/' ~ Participant.getUser().getId() ~ '/">' %}
|
||
{% set list_participants = list_participants ~ Participant.getUser().getDisplayName() %}
|
||
{% set list_participants = list_participants ~ '</a>' %}
|
||
{% endfor %}
|
||
{% trans with {'%list_participants%' : list_participants} %}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 with {'%Total%' : Total} %}%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 prev_res">
|
||
<
|
||
</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 next_res">
|
||
>
|
||
</a>
|
||
{% endif %}
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<script>
|
||
//load the next result page
|
||
jQuery(document).ready(function(){
|
||
jQuery('.next_res').click(function(){
|
||
jQuery('.results').load($(this).attr('href'));
|
||
return false;
|
||
});
|
||
});
|
||
//load the prev result page
|
||
jQuery(document).ready(function(){
|
||
jQuery('.prev_res').click(function(){
|
||
jQuery('.results').load($(this).attr('href'));
|
||
return false;
|
||
});
|
||
});
|
||
</script>
|