{{#unless revisions}}
	<p>No revisions made</p>
{{/unless}}

<div class="view-revision">
	{{#if hasDiff}}
		<h1>{{revision.title}}</h1>
		<h2>Changed by {{revision.firstname}} {{revision.lastname}}</h2>
		{{ui/ui-spacer size=200}}
		<div class="diff-zone wysiwyg">
			{{{diff}}}
		</div>
	{{/if}}
</div>

{{#if canRollback}}
	{{ui/ui-spacer size=400}}
	{{ui/ui-button color=constants.Color.Red icon=constants.Icon.TimeBack light=true label=constants.Label.Restore onClick=(action "onShowModal")}}
{{/if}}

<div id="document-rollback-modal" class="modal" tabindex="-1" role="dialog">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">Restore Section</div>
			<div class="modal-body">
				<p>Are you sure you want to restore this revision?</p>
			</div>
			<div class="modal-footer">
				{{ui/ui-button color=constants.Color.Gray light=true label=constants.Label.Cancel dismiss=true}}
				{{ui/ui-button color=constants.Color.Red light=true label=constants.Label.Restore onClick=(action "onRollback")}}
			</div>
		</div>
	</div>
</div>
