소스 검색

Merge pull request #354 from jeremyFreeAgent/fix_no_delete_route

Fixed an issue when there is not delete route
Thomas 13 년 전
부모
커밋
1a20b9a7d4
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Resources/views/CRUD/base_edit.html.twig

+ 1 - 1
Resources/views/CRUD/base_edit.html.twig

@@ -88,7 +88,7 @@ file that was distributed with this source code.
                     <input type="submit" name="btn_update_and_edit" value="{% trans from 'SonataAdminBundle' %}btn_update_and_edit_again{% endtrans %}"/>
                     <input type="submit" name="btn_update_and_list" value="{% trans from 'SonataAdminBundle' %}btn_update_and_return_to_list{% endtrans %}"/>
 
-                    {% if admin.isGranted('DELETE') %}
+                    {% if admin.hasroute('delete') and admin.isGranted('DELETE') %}
                         <a href="{{ admin.generateObjectUrl('delete', object) }}">{% trans from 'SonataAdminBundle' %}link_delete{% endtrans %}</a>
                     {% endif %}
                 {% else %}