Fixed batch actions if size of actions = 0 #1171

Closed
wants to merge 4 commits into
from

3 participants

@vlastv

If the batch not action, it does not mean that it is not necessary export and choose the number of items on the page.
For example, I do not need the mass removal, in which case the batchactions|length == 0

Translated missing labels (P.S. I native speaker)

vlastv added some commits Feb 13, 2013
@vlastv vlastv Fixed batch actions if size of actions = 0
If the batch not action, it does not mean that it is not necessary export and choose the number of items on the page.
For example, I do not need the mass removal, in which case the batchactions|length == 0
27b5190
@vlastv vlastv Translated missing labels f682725
@stof stof and 1 other commented on an outdated diff Feb 13, 2013
Resources/views/CRUD/base_list.html.twig
- {% elseif field_description.name == '_action' and app.request.isXmlHttpRequest %}
- {# Action buttons disabled in ajax view! #}
- {% else %}
- {% set sortable = false %}
- {% if field_description.options.sortable is defined and field_description.options.sortable%}
- {% set sortable = true %}
- {% set current = admin.datagrid.values._sort_by == field_description %}
- {% set sort_parameters = admin.modelmanager.sortparameters(field_description, admin.datagrid) %}
- {% set sort_active_class = current ? 'sonata-ba-list-field-order-active' : '' %}
- {% set sort_by = current ? admin.datagrid.values._sort_order : field_description.options._sort_order %}
- {% endif %}
-
- {% spaceless %}
- <th class="sonata-ba-list-field-header-{{ field_description.type}} {% if sortable %} sonata-ba-list-field-header-order-{{ sort_by|lower }} {{ sort_active_class }}{% endif %}">
- {% if sortable %}<a href="{{ admin.generateUrl('list', sort_parameters) }}">{% endif %}
+ <tr class="sonata-ba-list-field-header">
@stof
stof added a line comment Feb 13, 2013

why changing the indentation ?

@vlastv
vlastv added a line comment Feb 13, 2013

Sorry, this alignment of made JetBrains PhpStorm IDE.
I renew?

@stof
stof added a line comment Feb 14, 2013

Please update the PR to revert the indentation change (you can add new commits in the PR by pushing to the branch used to create it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@stof stof commented on an outdated diff Feb 13, 2013
Resources/views/CRUD/base_list.html.twig
</thead>
{% endblock %}
{% block table_body %}
<tbody>
- {% for object in admin.datagrid.results %}
- <tr>
- {% for field_description in admin.list.elements %}
- {% if field_description.name == '_action' and app.request.isXmlHttpRequest %}
- {# Action buttons disabled in ajax view! #}
- {% else %}
- {{ object|render_list_element(field_description) }}
- {% endif %}
- {% endfor %}
- </tr>
- {% endfor %}
+ {% for object in admin.datagrid.results %}
@stof
stof added a line comment Feb 13, 2013

same question here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
vlastv added some commits Feb 14, 2013
@vlastv vlastv Reverted changes indent f238aa9
@vlastv vlastv Revert "Fixed batch actions if size of actions = 0"
This reverts commit 27b5190.

Conflicts:
	Resources/views/CRUD/base_list.html.twig
d9cc087
@rande
Sonata Project member

already fixed and translation is also set

@rande rande closed this Mar 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment