2014-04-09 19:09:35 -04:00
|
|
|
- var i = 0
|
2014-04-09 22:07:44 -04:00
|
|
|
.panel-group(id='delta-accordion-'+(counter))
|
2014-04-09 19:09:35 -04:00
|
|
|
for delta in deltas
|
|
|
|
.delta.panel.panel-default(class='delta-'+delta.action)
|
|
|
|
.panel-heading
|
|
|
|
if delta.action === 'added'
|
|
|
|
strong(data-i18n="delta.added") Added
|
|
|
|
if delta.action === 'modified'
|
|
|
|
strong(data-i18n="delta.modified") Modified
|
|
|
|
if delta.action === 'deleted'
|
|
|
|
strong(data-i18n="delta.deleted") Deleted
|
|
|
|
if delta.action === 'moved-index'
|
|
|
|
strong(data-i18n="delta.modified_array") Moved Index
|
|
|
|
if delta.action === 'text-diff'
|
|
|
|
strong(data-i18n="delta.text_diff") Text Diff
|
|
|
|
span
|
2014-04-09 22:07:44 -04:00
|
|
|
a(data-toggle="collapse" data-parent="#delta-accordion"+(counter) href="#collapse-"+(i+counter))
|
2014-04-09 19:09:35 -04:00
|
|
|
span= delta.path
|
|
|
|
|
2014-04-09 22:07:44 -04:00
|
|
|
.panel-collapse.collapse(id="collapse-"+(i+counter))
|
2014-04-09 19:09:35 -04:00
|
|
|
.panel-body.row
|
|
|
|
if delta.action === 'added'
|
|
|
|
.new-value.col-md-12= delta.right
|
|
|
|
if delta.action === 'modified'
|
|
|
|
.old-value.col-md-6= delta.left
|
|
|
|
.new-value.col-md-6= delta.right
|
|
|
|
if delta.action === 'deleted'
|
|
|
|
.col-md-12
|
|
|
|
div.old-value= delta.left
|
|
|
|
if delta.action === 'text-diff'
|
2014-04-10 13:24:14 -04:00
|
|
|
.col-md-12
|
|
|
|
div.text-diff
|
2014-04-10 14:13:33 -04:00
|
|
|
if delta.action === 'moved-index'
|
|
|
|
.col-md-12
|
|
|
|
span Moved array value #{JSON.stringify(delta.left)} to index #{delta.destinationIndex}
|
2014-04-09 19:09:35 -04:00
|
|
|
- i += 1
|