1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- {#
- This file is part of the Sonata package.
- (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
- For the full copyright and license information, please view the LICENSE
- file that was distributed with this source code.
- #}
- <h1>{% block title %}{% trans 'title_list' from 'BaseApplicationBundle'%}{% endblock %}</h1>
- {% block actions %}
- <div>
- <ul>
- <li><a href="{{ url(urls.create.url) }}">{% trans "link_action_create" from "BaseApplicationBundle" %}</a></li>
- </ul>
- </div>
- {% endblock %}
- <form action="{{ url(urls.batch.url) }}" method="POST" >
- <table>
- {% block table_header %}
- <tr>
- {% for field_name, field_description in fields %}
- <td>{{ field_name }}</td>
- {% endfor %}
- </tr>
- {% endblock %}
- {% block table_body %}{% endblock %}
- {% block table_footer %}
- {% if pager.haveToPaginate() %}
- <tr>
- <td colspan="{{ fields|length }}">
- {% if pager.page != pager.previouspage %}
- <li><a href="{{ pager.renderLink(pager.previouspage) }}">{% trans 'link_previous_pager' from 'BaseApplicationBundle' %}</a></li>
- {% endif %}
- {# Set the number of pages to display in the pager #}
- {% for page in pager.getLinks(5) %}
- {% if page == pager.page %}
- <li>{{ page }}</li>
- {% else %}
- <li><a href="{{ pager.renderLink(page) }}">{{ page }}</a></li>
- {% endif %}
- {% endfor %}
- {% if pager.page != pager.nextpage %}
- <li><a href="{{ pager.renderLink(pager.nextpage) }}">{% trans 'link_previous_pager' from 'BaseApplicationBundle' %}</a></li>
- {% endif %}
- </td>
- </tr>
- {% endif %}
- {% endblock %}
- </table>
- <div>
- <select name="action" >
- {% for action, label in batch_actions %}
- <option value="{{ action }}">{{ label }}</option>
- {% endfor %}
- </select>
- <input type="submit" value="{% trans 'btn_batch' from 'BaseApplicationBundle' %}" />
- </div>
- </form>
|