diff --git a/apps/files_versions/ajax/getVersions.php b/apps/files_versions/ajax/getVersions.php
new file mode 100644
index 0000000000..fbe65146ac
--- /dev/null
+++ b/apps/files_versions/ajax/getVersions.php
@@ -0,0 +1,54 @@
+';
html += '
';
- html += '
';
- html += '';
html += '';
html += '';
html += '
';
html += '';
- html += '
';
if (filename) {
$('tr').filterAttr('data-file',filename).addClass('mouseOver');
@@ -39,27 +55,44 @@ function createVersionsDropdown(filename, files) {
} else {
$(html).appendTo($('thead .share'));
}
-// $.getJSON(OC.linkTo('files_sharing', 'ajax/userautocomplete.php'), function(users) {
-// if (users) {
-// $.each(users, function(index, row) {
-// $(row).appendTo('#share_with');
-// });
-// $('#share_with').trigger('liszt:updated');
-// }
-// });
-// $.getJSON(OC.linkTo('files_sharing', 'ajax/getitem.php'), { source: files }, function(users) {
-// if (users) {
-// $.each(users, function(index, row) {
-// if (row.uid_shared_with == 'public') {
-// showPublicLink(row.token, '/'+filename);
-// } else if (isNaN(index)) {
-// addUser(row.uid_shared_with, row.permissions, index.substr(0, index.lastIndexOf('-')));
-// } else {
-// addUser(row.uid_shared_with, row.permissions, false);
-// }
-// });
-// }
+
+// $.getJSON(OC.linkTo('files_sharing', 'ajax/userautocomplete.php'), function(users) {
+// if (users) {
+// $.each(users, function(index, row) {
+// $(row).appendTo('#share_with');
// });
+// $('#share_with').trigger('liszt:updated');
+// }
+// });
+ $.getJSON(OC.linkTo('files_versions', 'ajax/getVersions.php'), { source: files }, function(versions) {
+ if (versions) {
+
+ $.each( versions, function(index, row ) {
+
+ addVersion( row );
+ });
+
+ }
+
+ });
+
+ function addVersion( name ) {
+
+ var version = '';
+
+// } else {
+// var checked = ((permissions > 0) ? 'checked="checked"' : 'style="display:none;"');
+// var style = ((permissions == 0) ? 'style="display:none;"' : '');
+// var user = '';
+// user += '
';
+// user += uid_shared_with;
+// user += '';
+// user += '';
+// user += '';
+// }
+
+ $(version).appendTo('#found_versions');
+ }
$('#dropdown').show('blind');
$('#share_with').chosen();
diff --git a/apps/files_versions/templates/history.php b/apps/files_versions/templates/history.php
index d33d2b0f68..92a3eb9c07 100644
--- a/apps/files_versions/templates/history.php
+++ b/apps/files_versions/templates/history.php
@@ -10,8 +10,12 @@
echo('Versions of '.$_['path']).'
';
echo('You can click on the revert button to revert to the specific verson.
');
- foreach ($_['versions'] as $v){
- echo(' '.OC_Util::formatDate($v).' Revert
');
+ foreach ( $_['versions'] as $v ){
+
+ echo ' ';
+ echo OC_Util::formatDate( $v );
+ echo ' Revert
';
+
}
}