소스 검색

Fix label on one-to-many template

Thomas Rabaix 13 년 전
부모
커밋
3c8410cbee
1개의 변경된 파일1개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 5
      Resources/views/CRUD/edit_orm_one_to_many.html.twig

+ 1 - 5
Resources/views/CRUD/edit_orm_one_to_many.html.twig

@@ -25,11 +25,7 @@ file that was distributed with this source code.
                                         {% if field_name == '_delete' %}
                                             <th>{% trans from 'SonataAdminBundle' %}action_delete{% endtrans %}</th>
                                         {% else %}
-                                            {% if nested_field.get('sonata_admin').field_description.options.name is defined %}
-                                                <th>{{ nested_field.get('sonata_admin').field_description.options.name }}</th>
-                                            {% else %}
-                                                <th>{{ field_name|trans }}</th>
-                                            {% endif %}
+                                            <th>{{ nested_field.get('sonata_admin').admin.trans(nested_field.vars.label) }}</th>
                                         {% endif %}
                                     {% endfor %}
                                 </tr>