Blame view
resources/views/comments/revisions.blade.php
913 Bytes
e77200db5 Initial commit |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
@if (isset($comment->meta['revision'])) <div class="comment-history comment-body" data-commentId="{!! $comment->id !!}"> <div class="comment-history-header">Showing previous versions of this text.</div> @foreach ($comment->meta['revision'] as $revision) <?php // we need to convert tabs (/s is basically a space) into spaces for legal json $revision = preg_replace('/\s/', ' ', $revision); $revision = json_decode($revision); ?> @if ($revision) <article class="comment-revision"> @if (isset($revision->date)) <div class="comment-revision-time"> <time class="timeago" datetime="{!! date('c', strtotime($revision->date)) !!}"> {!! $revision->date !!} </time> </div> @endif <div class="{!! $revisionClass !!}">{!! $revision->content !!}</div> </article> @endif @endforeach </div> @endif |