-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TODO : * csv file export
- Loading branch information
Showing
4 changed files
with
65 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
(function () { | ||
const iconsAuditExportUp = document.querySelectorAll('a.audit-export-up'); | ||
const iconAuditExportDown = document.querySelectorAll('a.audit-export-down'); | ||
|
||
const exportUp = (event) => { | ||
event.preventDefault(); | ||
const svgUp = event.currentTarget.querySelector('.ez-icon-caret-up'); | ||
const svgDown = event.currentTarget.querySelector('.ez-icon-caret-down'); | ||
svgDown.style.display = "none"; | ||
svgUp.style.display = "block"; | ||
event.currentTarget.parentNode.parentNode.nextElementSibling.style.display = "table-row"; | ||
event.currentTarget.removeEventListener('click', exportUp); | ||
event.currentTarget.addEventListener('click', exportDown, false) | ||
}; | ||
|
||
const exportDown = (event) => { | ||
event.preventDefault(); | ||
const svgUp = event.currentTarget.querySelector('.ez-icon-caret-up'); | ||
const svgDown = event.currentTarget.querySelector('.ez-icon-caret-down'); | ||
svgDown.style.display = "block"; | ||
svgUp.style.display = "none"; | ||
event.currentTarget.parentNode.parentNode.nextElementSibling.style.display = "none"; | ||
event.currentTarget.removeEventListener('click', exportDown); | ||
event.currentTarget.addEventListener('click', exportUp, false) | ||
}; | ||
|
||
iconsAuditExportUp.forEach(icon => icon.addEventListener('click', exportUp, false)); | ||
iconAuditExportDown.forEach(icon => icon.addEventListener('click', exportDown, false)); | ||
})(); |
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
21 changes: 20 additions & 1 deletion
21
src/bundle/Resources/views/audit/export/table_row.html.twig
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,10 +1,29 @@ | ||
<tr> | ||
<td>{{ row.user_id }}</td> | ||
<td>{{ row.user_name }}</td> | ||
<td></td> | ||
<td>{{ row.date_start|date('M d, Y') }}</td> | ||
<td>{{ row.date_end|date('M d, Y') }}</td> | ||
<td>{{ row.date|date('M d, Y') }}</td> | ||
<td>{{ row.status }}</td> | ||
<td>{{ row.file }}</td> | ||
<td> | ||
<a href="#" class="audit-export audit-export-up"> | ||
<svg class="ez-icon ez-icon-caret-down"> | ||
<use xlink:href="{{ asset('bundles/ezplatformadminui/img/ez-icons.svg') }}#caret-down"></use> | ||
</svg> | ||
<svg class="ez-icon ez-icon-caret-up" style="display:none;"> | ||
<use xlink:href="{{ asset('bundles/ezplatformadminui/img/ez-icons.svg') }}#caret-up"></use> | ||
</svg> | ||
</a> | ||
</td> | ||
</tr> | ||
<tr style="display:none;"> | ||
<th>{{ 'export.audits'|trans|desc('Audits') }}</th> | ||
<td colspan="7"> | ||
<ul> | ||
{% for audit in row.audits %} | ||
<li>{{ audit }}</li> | ||
{% endfor %} | ||
</ul> | ||
</td> | ||
</tr> |