Skip to content

Commit

Permalink
Restore missing ellipsis in truncated words (#6525)
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys authored Oct 23, 2020
1 parent d36b99e commit 09468b9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/Resources/views/CRUD/base_edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ file that was distributed with this source code.
{% block title %}
{# NEXT_MAJOR: remove default filter #}
{% if objectId|default(admin.id(object)) is not null %}
{{ 'title_edit'|trans({'%name%': admin.toString(object)|u.truncate(15) }, 'SonataAdminBundle') }}
{{ 'title_edit'|trans({'%name%': admin.toString(object)|u.truncate(15, '...') }, 'SonataAdminBundle') }}
{% else %}
{{ 'title_create'|trans({}, 'SonataAdminBundle')|u.truncate(15) }}
{{ 'title_create'|trans({}, 'SonataAdminBundle')|u.truncate(15, '...') }}
{% endif %}
{% endblock %}

{% block navbar_title %}
{# NEXT_MAJOR: remove default filter #}
{% if objectId|default(admin.id(object)) is not null %}
{{ 'title_edit'|trans({'%name%': admin.toString(object)|u.truncate(100) }, 'SonataAdminBundle') }}
{{ 'title_edit'|trans({'%name%': admin.toString(object)|u.truncate(100, '...') }, 'SonataAdminBundle') }}
{% else %}
{{ 'title_create'|trans({}, 'SonataAdminBundle')|u.truncate(100) }}
{{ 'title_create'|trans({}, 'SonataAdminBundle')|u.truncate(100, '...') }}
{% endif %}
{% endblock %}

Expand Down
4 changes: 2 additions & 2 deletions src/Resources/views/CRUD/base_list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ file that was distributed with this source code.
{%- endblock -%}

{% block title %}
{{ admin.isChild and admin.parent.subject ? 'title_edit'|trans({'%name%': admin.parent.toString(admin.parent.subject)|u.truncate(15) }, 'SonataAdminBundle') : '' }}
{{ admin.isChild and admin.parent.subject ? 'title_edit'|trans({'%name%': admin.parent.toString(admin.parent.subject)|u.truncate(15, '...') }, 'SonataAdminBundle') : '' }}
{% endblock %}

{% block navbar_title %}
{{ admin.isChild and admin.parent.subject ? 'title_edit'|trans({'%name%': admin.parent.toString(admin.parent.subject)|u.truncate(100) }, 'SonataAdminBundle') : '' }}
{{ admin.isChild and admin.parent.subject ? 'title_edit'|trans({'%name%': admin.parent.toString(admin.parent.subject)|u.truncate(100, '...') }, 'SonataAdminBundle') : '' }}
{% endblock %}

{% block list_table %}
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/views/CRUD/base_show.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ file that was distributed with this source code.
{% extends base_template %}

{% block title %}
{{ 'title_show'|trans({'%name%': admin.toString(object)|u.truncate(15) }, 'SonataAdminBundle') }}
{{ 'title_show'|trans({'%name%': admin.toString(object)|u.truncate(15, '...') }, 'SonataAdminBundle') }}
{% endblock %}

{% block navbar_title %}
{{ 'title_show'|trans({'%name%': admin.toString(object)|u.truncate(100) }, 'SonataAdminBundle') }}
{{ 'title_show'|trans({'%name%': admin.toString(object)|u.truncate(100, '...') }, 'SonataAdminBundle') }}
{% endblock %}

{%- block actions -%}
Expand Down
6 changes: 3 additions & 3 deletions src/Resources/views/standard_layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@ file that was distributed with this source code.
{% if menu.extra('safe_label', true) %}
{{- label|raw -}}
{% else %}
{{- label|u.truncate(100) -}}
{{- label|u.truncate(100, '...') -}}
{% endif %}
</a>
{% else %}
<span>{{ label|u.truncate(100) }}</span>
<span>{{ label|u.truncate(100, '...') }}</span>
{% endif %}
</li>
{% else %}
<li class="active"><span>{{ label|u.truncate(100) }}</span></li>
<li class="active"><span>{{ label|u.truncate(100, '...') }}</span></li>
{% endif %}
{% endfor %}
{% endif %}
Expand Down

0 comments on commit 09468b9

Please sign in to comment.