-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add html template for additions and deletions
(cherry picked from commit c598fde)
- Loading branch information
1 parent
56d8911
commit 902c168
Showing
2 changed files
with
43 additions
and
6 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
34 changes: 34 additions & 0 deletions
34
frappe/core/doctype/document_comparator/document_comparator_rows_added_removed.html
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,34 @@ | ||
<div> | ||
{% var docs = Object.keys(added_or_removed) %} | ||
{% for doc in docs %} | ||
<div> | ||
{% if Object.keys(added_or_removed[doc]).length > 0 %} | ||
<h5>{{ doc }}</h5> | ||
<br> | ||
{% var tables = Object.keys(added_or_removed[doc]) %} | ||
{% for table in tables %} | ||
<h5 class="text-muted">{{ table }}</h5> | ||
<table class="table table-bordered"> | ||
<thead> | ||
{% var fieldnames = Object.keys(added_or_removed[doc][table][0]) %} | ||
{% for fieldname in fieldnames %} | ||
<th>{{ fieldname }}</th> | ||
{% endfor %} | ||
</thead> | ||
<tbody> | ||
{% var rows = Object.keys(added_or_removed[doc][table]) %} | ||
{% for row in rows %} | ||
<tr> | ||
{% var field_keys = Object.keys(added_or_removed[doc][table][row]) %} | ||
{% for key in field_keys %} | ||
<td>{{ added_or_removed[doc][table][row][key] }}</td> | ||
{% endfor %} | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% endfor %} | ||
{% endif %} | ||
</div> | ||
{% endfor %} | ||
</div> |