Home
stevergill edited this page Nov 10, 2014
·
5 revisions
Welcome to the crud-bundle wiki!
- It looks for
Bundle\Resources\views\Crud\{entity}\index.html.twig
. If it cannot find that, then - It looks for
Bundle\Resources\views\Crud\index.html.twig
. This file contains a link to look forJobcostifyBundle\Resources\views\Crud\{entity}\_index.html.twig
which contains just the content required. If it cannot find either of the 2 above, it looks for - index.html.twig in the CrudBundle.
Item 2 above contains javascript links, which looks for Bundle\Resources\views\Crud\{entity}\_datatable.js.twig
and Bundle\Resources\views\Crud\{entity}\_options.js.twig
. If these files don't exist, it gets the generic versions from the Tahoe theme bundle.
Exactly the same rules apply for edit, show etc
Index
{% extends '::base.html.twig' %}
{% from 'TahoeThemeBundle:Widgets:sidebar.html.twig' import index_actions %}
{% block page_title -%}
<h1>{{ entityName }}</h1>
{%- endblock %}
{% block current_breadcrumb %}
<li>{{ entityName }}</li>
{% endblock %}
{% block content -%}
<div class="row">
<div class="col-md-12">
<div class="todo-sidebar">
{{ index_actions(path(routePrefix ~ '_new'), entityName) }}
</div>
<div class="todo-content">
{% include ['TahoeJobcostifyBundle:Crud/' ~ (entityName | replace({' ': '_'}) ) ~
':_index.html.twig', 'TahoeThemeBundle:Crud:_generic_index.html.twig'] %}
</div>
</div>
</div>
{% endblock content %}
{% block javascripts %}
{{ parent() }}
{% include ['TahoeJobcostifyBundle:Crud/' ~ (entityName | replace({' ': '_'}) ) ~
':_datatable.js.twig', 'TahoeThemeBundle:Crud:_generic_datatable.js.twig'] %}
{% include ['TahoeJobcostifyBundle:Crud/' ~ (entityName | replace({' ': '_'}) ) ~
':_options.js.twig', 'TahoeThemeBundle:Crud:_generic_options.js.twig'] %}
{% endblock javascripts %}