Skip to content

Commit

Permalink
Merge 3.x into master
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Jun 21, 2019
2 parents cc6bd7b + a2d9e86 commit 36212f1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
21 changes: 12 additions & 9 deletions src/Resources/views/CRUD/base_edit.html.twig
Expand Up @@ -11,19 +11,22 @@ file that was distributed with this source code.

{% extends base_template %}

{# NEXT_MAJOR: remove default filter #}
{% if objectId|default(admin.id(object)) is not null %}
{% set title = 'title_edit'|trans({'%name%': admin.toString(object) }, 'SonataAdminBundle') %}
{% else %}
{% set title = 'title_create'|trans({}, 'SonataAdminBundle') %}
{% endif %}

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

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

{%- block actions -%}
Expand Down
6 changes: 2 additions & 4 deletions src/Resources/views/CRUD/base_list.html.twig
Expand Up @@ -22,14 +22,12 @@ file that was distributed with this source code.
}, 'twig') }}
{%- endblock -%}

{% set title = admin.isChild and admin.parent.subject ? 'title_edit'|trans({'%name%': admin.parent.toString(admin.parent.subject) }, 'SonataAdminBundle') : '' %}

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

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

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

{% extends base_template %}

{% set title = 'title_show'|trans({'%name%': admin.toString(object) }, 'SonataAdminBundle') %}

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

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

{%- block actions -%}
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/views/standard_layout.html.twig
Expand Up @@ -143,7 +143,7 @@ file that was distributed with this source code.
{% endblock %}
{% block sonata_nav %}
<nav class="navbar navbar-static-top" role="navigation">
<a href="#" class="sidebar-toggle" data-toggle="offcanvas"
<a href="#" class="sidebar-toggle" data-toggle="offcanvas"
role="button" title="{{ 'toggle_navigation'|trans({}, 'SonataAdminBundle') }}">
<span class="sr-only">{{ 'toggle_navigation'|trans({}, 'SonataAdminBundle') }}</span>
</a>
Expand Down Expand Up @@ -177,7 +177,7 @@ file that was distributed with this source code.
{% endif %}
</li>
{% else %}
<li class="active"><span>{{ label }}</span></li>
<li class="active"><span>{{ label|truncate(100) }}</span></li>
{% endif %}
{% endfor %}
{% endif %}
Expand Down

0 comments on commit 36212f1

Please sign in to comment.