PHRAS-913 - fix counter display in users lists

This commit is contained in:
Florian BLOUET
2016-01-20 11:46:38 +01:00
parent e884bcff93
commit 37c674b5eb
3 changed files with 5 additions and 6 deletions

View File

@@ -86,8 +86,8 @@
</table>
</div>
<div class="PNB" style="top:auto;height:20px;text-align:right;line-height:20px;">
{% set length = '<span class="counter current">' ~ list.getEntries().count() ~ '</span>' %}
{% trans with {'%length%' : length} %}%length% peoples{% endtrans %}
{% set length = list.getEntries().count() %}
<span class="counter current">{% trans with {'%length%' : length} %}%length% peoples{% endtrans %}</span>
{% if query.get_page() > 1 %}
<a class="prev" value="{{ query.get_page() - 1 }}" href="#">< {{ 'Previous' | trans }}</a>
{% endif %}

View File

@@ -37,8 +37,8 @@
<div class="PNB10">
<div class="PNB" style="height:25px; bottom:auto;">
<p>
{% set length = '<span class="counter current">' ~ list.getEntries().count() ~ '</span>' %}
{% trans with {'%length%' : length} %}%length% peoples{% endtrans %}
{% set length = ist.getEntries().count() %}
<span class="counter current">{% trans with {'%length%' : length} %}%length% peoples{% endtrans %}</span>
{% if list.getOwner(app.getAuthenticatedUser()).getRole() >= constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_EDITOR') %}
<button class="EditToggle btn btn-inverse">{{ 'Edit' | trans }}</button>
{% endif %}

View File

@@ -11,7 +11,6 @@
</span>
<ul class="lists">
{% for list in lists %}
{% set length = '<span class="counter">' ~ list.getEntries().count() ~ '</span>' %}
<li class="list" style="padding:2px;">
<a href="{{ path('prod_push_list_edit', { 'list_id' : list.getId() }) }}" class="list_link">
{% if list.getOwner(app.getAuthenticatedUser()).getRole() >= constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_EDITOR') %}
@@ -20,7 +19,7 @@
<img src="/assets/common/images/icons/SHARE16.png" />
{% endif %}
{{ list.getName() }}
({{ length }})
<span class="counter">({{ list.getEntries().count() }})</span>
</a>
</li>
{% endfor %}