Skip to content

Commit

Permalink
imp: Display the number of tickets above the list
Browse files Browse the repository at this point in the history
  • Loading branch information
marien-probesys committed Mar 2, 2023
1 parent fbbf602 commit c433d18
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
18 changes: 12 additions & 6 deletions templates/organizations/tickets/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,18 @@

<div class="flow row__item--extend">
{% if tickets %}
{% if is_granted('orga:create:tickets', organization) %}
<a class="anchor--action" href="{{ path('new organization ticket', {'uid': organization.uid}) }}">
{{ icon('plus') }}
{{ 'tickets.index.new_ticket' | trans }}
</a>
{% endif %}
<div class="row row--center row--always flow">
{% if is_granted('orga:create:tickets', organization) %}
<a class="anchor--action" href="{{ path('new organization ticket', {'uid': organization.uid}) }}">
{{ icon('plus') }}
{{ 'tickets.index.new_ticket' | trans }}
</a>
{% endif %}

<p class="text--secondary">
{{ 'tickets.index.number' | trans({ count: tickets|length }) }}
</p>
</div>

{{ include(
'tickets/_list.html.twig',
Expand Down
4 changes: 4 additions & 0 deletions templates/tickets/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@

<div class="flow row__item--extend">
{% if tickets %}
<p class="text--secondary">
{{ 'tickets.index.number' | trans({ count: tickets|length }) }}
</p>

{{ include(
'tickets/_list.html.twig',
{ tickets: tickets },
Expand Down
1 change: 1 addition & 0 deletions translations/messages+intl-icu.en_GB.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ tickets.impact.medium: Medium
tickets.incident: Incident
tickets.index.new_ticket: 'New ticket'
tickets.index.no_tickets: 'No tickets'
tickets.index.number: '{count, plural, =0 {No tickets} one {1 ticket} other {# tickets}}'
tickets.index.title.all: 'All tickets'
tickets.index.title.my: 'My tickets'
tickets.index.title.to_assign: 'Tickets to assign'
Expand Down
1 change: 1 addition & 0 deletions translations/messages+intl-icu.fr_FR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ tickets.impact.medium: Moyen
tickets.incident: Incident
tickets.index.new_ticket: 'Nouveau ticket'
tickets.index.no_tickets: 'Aucun ticket'
tickets.index.number: '{count, plural, =0 {Aucun ticket} one {1 ticket} other {# tickets}}'
tickets.index.title.all: 'Tous les tickets'
tickets.index.title.my: 'Mes tickets'
tickets.index.title.to_assign: 'Tickets à attribuer'
Expand Down

0 comments on commit c433d18

Please sign in to comment.