tawfekov/ZF2EntityAudit

View on GitHub
view/zf2-entity-audit/index/viewdetail.phtml

Summary

Maintainability
Test Coverage
<h1>Audit entry <?php  echo $this->escapeHtml($className); ?> identifier <?php  echo $this->escapeHtml($id); ?> at revision <?php  echo $this->escapeHtml($rev); ?></h1>

<div class="row">
    <div class="col-lg-12">
        <table class="table table-striped table-hover table-bordered ">
            <thead><tr>
                <th>Field</th>
                <th>Value</th>
            </tr></thead>
            <tbody>
            <?php foreach ($data as $field => $value): ?>
                <tr>
                    <td><?php  echo $this->escapeHtml($field); ?></td>
                    <td>
                        <?php if ($value instanceof \DateTime): ?>
                            <?php echo  $this->DateTimeFormatter($value); ?>
                        <?php else : ?>
                            <?php  echo $this->escapeHtml($value); ?>
                        <?php endif; ?>
                    </td>
                </tr>
            <?php endforeach; ?>
            </tbody>
        </table>
    </div>
</div>

<a class="btn btn-link" href="<?=
$this->url('audit_viewentity',
    array(
        'id' => $id,
        'className' => str_replace('\\', '_', $className)
    )
);?>">
    View revisions
</a>