{% extends 'USBackendBundle::baseGrid.html.twig' %} {% use 'USBackendBundle:Question:includes/header.html.twig' %} {% use 'USBackendBundle:Question:includes/list.html.twig' %} {% block grid %} {% block header %} {{ parent() }} {% endblock %} {% if grid.isTitleSectionVisible %} {{ grid_titles(grid) }} {% endif %} {{ grid_rows(grid) }}
{% if grid.isPagerSectionVisible %} {{ grid_pager(grid) }} {% endif %} {% if withjs %} {{ grid_scripts(grid) }} {% endif %} {% endblock grid %} {# --------------------------------------------------- grid_titles -------------------------------------------------- #} {% block grid_titles %} {% if class == 'test' %} {% set col = 'col-md-3' %} {% else %} {% set col = 'col-md-4' %} {% endif %} {% for column in grid.columns %} {% if column.visible(grid.isReadyForExport) and column.renderBlockId!="id" %}
{{column.title}}
{% endif %} {% endfor %} {% endblock grid_titles %} {# ---------------------------------------------------- grid_rows --------------------------------------------------- #} {% block grid_rows %} {% set num = 1 %} {% for row in grid.rows %} {% set last_row = loop.last %} {% spaceless %} {% set gridColumns %} {% for column in grid.columns %} {% if column.visible(grid.isReadyForExport) %} {% if column.renderBlockId == "id" %} {{ grid_cell(column, row, grid)|raw }} {% elseif column.renderBlockId == "testQuestions_weight" %} {{ grid_cell(column, row, grid)|raw }} {% else %} {% if class == 'test' %} {% set col = 'col-md-5' %} {% else %} {% set col = 'col-md-6' %} {% endif %} {% if column.renderBlockId=="title" and class!='test' %}
{% endif %} {{ grid_cell(column, row, grid)|raw }} {% endif %} {% endif %} {% endfor %} {% endset %} {{ gridColumns }} {% endspaceless %} {% set num = num+1 %} {% endfor %} {% endblock grid_rows %} {# ---------------------------------------------------- grid_pager_selectpage -------------------------------------------------- #} {% block grid_pager_selectpage %} {% spaceless %}
{# <#} <
{% if grid.page+1 == grid.pageCount and grid.page-1 >= 1 %}
{{grid.page-1 < 10?"0"}}{{grid.page-1}}
{% endif%} {% if grid.page+1 > 1 %}
{{grid.page < 10?"0"}}{{grid.page}}
{% endif %}
{{grid.page < 9?"0"}}{{grid.page+1}}
{% if grid.page+2 <= grid.pageCount %}
{{grid.page+2 < 10?"0"}}{{grid.page+2}}
{% endif %} {% if grid.page == 0 and grid.page+3 <= grid.pageCount %}
{{grid.page+3 < 10?"0"}}{{grid.page+3}}
{% endif%}
{{'grid.goto.page'|trans({},"USBackendBundle")}} {{ 'of %count%'|trans({ '%count%' : grid.pageCount }) }}
{#
  • Ir a página {{ 'of %count%'|trans({ '%count%' : grid.pageCount }) }}
  • #} {% endspaceless %} {% endblock grid_pager_selectpage %} {# -------------------------------------------- grid_column_filter_type_input --------------------------------------- #} {% block grid_column_filter_type_input %} {% set btwOperator = constant('APY\\DataGridBundle\\Grid\\Column\\Column::OPERATOR_BTW') %} {% set btweOperator = constant('APY\\DataGridBundle\\Grid\\Column\\Column::OPERATOR_BTWE') %} {% set isNullOperator = constant('APY\\DataGridBundle\\Grid\\Column\\Column::OPERATOR_ISNULL') %} {% set isNotNullOperator = constant('APY\\DataGridBundle\\Grid\\Column\\Column::OPERATOR_ISNOTNULL') %} {% set op = column.data.operator is defined ? column.data.operator : column.defaultOperator %} {% set from = column.data.from is defined ? column.data.from : null %} {% set to = column.data.to is defined ? column.data.to : null %} {{ grid_column_operator(column, grid, op, submitOnChange) }}
    {% endblock grid_column_filter_type_input %} {#--------------------------------------------------------------------------------#} {% block grid_column_type_cell %} {% if value == "single" %} {{'question.type.single'|trans({},"USBackendBundle")}} {% elseif value == "multiple" %} {{'question.type.multiple'|trans({},"USBackendBundle")}} {% elseif value == "open" %} {{'question.type.open'|trans({},"USBackendBundle")}} {% endif %} {% endblock %}