Skip to content

Commit

Permalink
allow to render specific parts of a subentity
Browse files Browse the repository at this point in the history
  • Loading branch information
Devolicious committed Aug 7, 2014
1 parent 1ffacf1 commit 1f495bc
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions Resources/views/Default/export.csv.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set quote = '"' %}
{%- for column in adminlist.exportColumns -%}
{{- quote|raw -}}{{- column.header | trans -}}{{- quote|raw -}}
{%- if not loop.last -%},{%- endif -%}
{{- quote|raw -}}{{- column.header | trans -}}{{- quote|raw -}}
{%- if not loop.last -%},{%- endif -%}
{%- endfor -%}
{% for item in iterator %}
{% if item[0] is defined %}
Expand All @@ -11,18 +11,13 @@
{% endif %}

{% for column in adminlist.exportColumns -%}
{%- set columnName = column.name -%}
{%- set template = column.template -%}
{{- quote|raw -}}{{- adminlist.getStringValue(item, columnName) -}}{{- quote|raw -}}
{%- if not loop.last -%},{%- endif -%}
{#-
{% spaceless %}
{% if template is not null %}
{% include template with {'row': item, 'columnName': columnName, 'object': adminlist.getValue(item, columnName)} %},
{% else %}
{{- quote|raw -}}{{adminlist.getStringValue(item, columnName)}}{{- quote|raw -}},
{% endif %}
{% endspaceless %}
-#}
{%- set columnName = column.name -%}
{%- set template = column.template -%}
{% if template is not null and template != 1 and template != "" %}
{% include template with {'row': item, 'columnName': columnName, 'object': adminlist.getValue(item, columnName)} %}
{% else %}
{{- quote|raw -}}{{- adminlist.getStringValue(item, columnName) -}}{{- quote|raw -}}
{% endif %}
{%- if not loop.last -%},{%- endif -%}
{%- endfor -%}
{% endfor %}

0 comments on commit 1f495bc

Please sign in to comment.