server/apps/files_versions/templates/history.php

36 lines
885 B
PHP
Raw Normal View History

<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'] ) ) {
2012-08-29 06:42:49 +00:00
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 />');
2012-08-29 06:42:49 +00:00
foreach ( $_['versions'] as $v ) {
echo ' ';
echo OCP\Util::formatDate( doubleval($v['version']) );
2012-09-28 20:27:52 +00:00
echo ' <a href="'.OCP\Util::linkTo('files_versions', 'history.php', array('path' => $_['path'], 'revert' => $v['version'])) .'" class="button">Revert</a><br /><br />';
if ( $v['cur'] ) {
echo ' (<b>Current</b>)';
}
echo '<br /><br />';
}
}
?>
</div>