Skip to content

Commit

Permalink
EZP-24379: Used ez_trans_prop() to get translated content type name
Browse files Browse the repository at this point in the history
  • Loading branch information
lolautruche committed May 29, 2015
1 parent 220f6b2 commit 17c394c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Resources/views/ContentType/view_content_type.html.twig
Expand Up @@ -5,19 +5,20 @@
{% trans_default_domain "content_type" %}

{% set content_type_group = content_type.contentTypeGroups|first %}
{% set content_type_name = ez_trans_prop(content_type, 'name', language_code) %}

{% block header_breadcrumbs %}
{% set breadcrumb_items = [
{link: path('admin_dashboard'), label: 'dashboard.title'|trans({}, 'dashboard')},
{link: path('admin_contenttype'), label: 'content_type.dashboard_title'|trans},
{link: path('admin_contenttypeGroupView', {'contentTypeGroupId': content_type_group.id}), label: content_type_group.identifier},
{link: null, label: content_type.names|first}
{link: null, label: content_type_name}
] %}
{{ parent() }}
{% endblock %}

{% block header_title %}
<h1 class="ez-page-header-name" data-icon="&#xe61a;">{{ content_type.names|first }} [{{ 'content_type.content_count'|transchoice(content_count) }}]</h1>
<h1 class="ez-page-header-name" data-icon="&#xe61a;">{{ content_type_name }} [{{ 'content_type.content_count'|transchoice(content_count) }}]</h1>
{% endblock %}

{% block content %}
Expand Down
4 changes: 2 additions & 2 deletions Resources/views/ContentType/view_content_type_group.html.twig
Expand Up @@ -8,7 +8,7 @@
{% set breadcrumb_items = [
{link: path('admin_dashboard'), label: 'dashboard.title'|trans({}, 'dashboard')},
{link: path('admin_contenttype'), label: 'content_type.dashboard_title'|trans},
{link: null, label: group.identifier|trans}
{link: null, label: group.identifier}
] %}
{{ parent() }}
{% endblock %}
Expand All @@ -35,7 +35,7 @@
{% for content_type in content_types %}
<tr>
<td></td>
<td><a href="{{ path('admin_contenttypeView', {'contentTypeId': content_type.id}) }}">{{ content_type.names|first }}</a></td>
<td><a href="{{ path('admin_contenttypeView', {'contentTypeId': content_type.id}) }}">{{ ez_trans_prop(content_type, "name") }}</a></td>
<td>{{ content_type.id }}</td>
<td>{{ content_type.identifier }}</td>
<td>
Expand Down

0 comments on commit 17c394c

Please sign in to comment.