Files
Phraseanet/templates/web/lightbox/agreement_box.html.twig
2012-10-04 15:43:36 +02:00

51 lines
2.5 KiB
Twig

<div class="PNB10" style="overflow-y: auto;overflow-x:hidden; bottom: 130px;">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="title title15">{% trans 'VALIDATION' %}</td>
<td class="report_wrapper">
<a class="report" href="#">
{% trans 'lightbox::recaptitulatif' %}
</a>
</td>
</tr>
</tbody>
</table>
{% if basket.getValidation() %}
<div>{{ basket.getValidation().getValidationString(app, app['phraseanet.user']) }}</div>
<ul>
{% for choice in basket_element.getValidationDatas() %}
{% if basket.getValidation().getParticipant(app['phraseanet.user'], app).getCanSeeOthers() or choice.getParticipant().getUser(app) == app['phraseanet.user'] %}
{% if choice.getAgreement() == true %}
{% set classuser = 'agree' %}
{% elseif choice.getAgreement() is null %}
{% set classuser = '' %}
{% else %}
{% set classuser = 'disagree' %}
{% endif %}
{% set participant = choice.getParticipant().getUser(app) %}
<li class="{% if participant.get_id() == app['phraseanet.user'].get_id() %}me{% endif %} {{classuser}} userchoice">{{participant.get_display_name()}}</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</div>
<div class="PNB user_infos">
{% if basket_element and basket_element.getBasket().getValidation() and basket.getValidation().getParticipant(app['phraseanet.user'], app).getCanAgree() %}
<div class="PNB choices">
<div style="height:60px;">
{% set agreement = basket_element.getUserValidationDatas(app['phraseanet.user'], app).getAgreement() %}
<div class="ui-corner-all big_box agree_{{basket_element.getId()}} agree {% if agreement is null or agreement == false %}not_decided{% endif %}">
<img src="/skins/lightbox/agree-big.png"/><span class="title15">{% trans 'validation:: OUI' %}</span>
</div>
</div>
<div style="height:60px;">
<div class="ui-corner-all big_box disagree_{{basket_element.getId()}} disagree {% if agreement is null or agreement == true %}not_decided{% endif %}">
<img src="/skins/lightbox/disagree-big.png"/><span class="title15">{% trans 'validation:: NON' %}</span>
</div>
</div>
</div>
{% endif %}
</div>