aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions/templates/history.php
blob: 99bc153a816ad41275f1fda3ff1ec810eee5780d (plain)
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
27
28
29
30
31
32
33
<div id="history">

<?php

if( isset( $_['message'] ) ) {


	if( isset($_['path'] ) ) echo('<strong>File: '.$_['path'] ).'</strong><br>';
	echo('<strong>'.$_['message'] ).'</strong><br>';

}else{

	if( isset( $_['outcome_stat'] ) ) {

		echo( '<div id="feedback-messages" class="'.$_['outcome_stat'].'"><h3>'.$_['outcome_msg'] ).'</h3></div><br>';

	}

	echo( '<strong>Versions of '.$_['path'] ).'</strong><br>';
	echo('<p><em>Revert a file to a previous version by clicking on its revert button</em></p><br />');

	foreach ( $_['versions'] as $v ) {
		echo ' ';
		echo OCP\Util::formatDate( doubleval($v['version']) );
		echo ' <a href="'.OCP\Util::linkTo('files_versions', 'history.php', array('path' => urlencode( $_['path'] ), 'revert' => $v['version'])) .'" class="button">Revert</a><br /><br />';
		if ( $v['cur'] ) { echo '  (<b>Current</b>)'; }
		echo '<br /><br />';
	}

}

?>
</div>