forked from jdorn/php-reports
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Multi-dataset version of JSON and XML report formats.
Add ability to specify which dataset(s) are used in CSV, JSON, and XML formats.
- Loading branch information
Showing
7 changed files
with
115 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{% for value in DataSets[0].rows[0].values %}{% if not loop.first %},{% endif %}"{{value.key}}"{% endfor %} | ||
{% for value in DataSets[dataset].rows[0].values %}{% if not loop.first %},{% endif %}"{{value.key}}"{% endfor %} | ||
|
||
{% for row in DataSets[0].rows %}{% for value in row.values %}{% if not loop.first %},{% endif %} | ||
{% for row in DataSets[dataset].rows %}{% for value in row.values %}{% if not loop.first %},{% endif %} | ||
"{{ value.getValue()|replace({'"':'""'})|raw }}"{% endfor %} | ||
|
||
{% endfor %} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,32 @@ | ||
{% extends "xml/page.twig" %} | ||
|
||
{% block content %} | ||
{% if dataset_format %} | ||
<Results> | ||
{% for row in DataSets[0].rows %} | ||
{% for dataset in datasets %} | ||
<Dataset> | ||
{% if DataSets[dataset].title %}<Title>{{ DataSets[dataset].title }}</Title>{% endif %} | ||
<Rows> | ||
{% for row in DataSets[dataset].rows %} | ||
<Row> | ||
{% for value in row.values %} | ||
<{{value.keyCollapsed}}>{{ value.getValue()|raw }}</{{value.keyCollapsed}}> | ||
{% endfor %} | ||
</Row> | ||
{% endfor %} | ||
</Rows> | ||
</Dataset> | ||
{% endfor %} | ||
</Results> | ||
{% else %} | ||
<Results> | ||
{% for row in DataSets[datasets[0]].rows %} | ||
<Row> | ||
{% for value in row.values %} | ||
<{{value.keyCollapsed}}>{{ value.getValue()|raw }}</{{value.keyCollapsed}}> | ||
{% endfor %} | ||
</Row> | ||
{% endfor %} | ||
</Results> | ||
{% endif %} | ||
{% endblock %} |