<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    <h3><?= __('Metadata') ?></h3>
</div>

<table class="table table-condensed table-hover table-striped">
    <?php foreach ($metadata as $column => $data): ?>
        <tr>
            <td><?= $column ?></td>
            <td>
                <?php if (!isset($data['old'])): ?>
                    <?php foreach ($data as $name => $value): ?>
                        <div>
                            <?= $name ?>: 
                            <span style="color:red;"><?= $value['old'] ?></span> -> <span style="color:green"><?= $value['new'] ?></span>
                        </div>
                    <?php endforeach ?>
                <?php else: ?>
                    <span style="color:red;"><?= $data['old'] ?></span> -> <span style="color:green"><?= $data['new'] ?></span>
                <?php endif ?>
            </td>
        </tr>
    <?php endforeach ?>
</table>