summaryrefslogtreecommitdiffstats
path: root/apps/remoteStorage
diff options
context:
space:
mode:
authorMichiel de Jong <michiel@unhosted.org>2012-03-01 20:55:20 +0000
committerMichiel de Jong <michiel@unhosted.org>2012-03-01 20:55:20 +0000
commite10402c61b748857c2d9acace60d632c87d8e4ac (patch)
tree62bd1ccae0caccebc9b4871becc6f5087122271f /apps/remoteStorage
parent5d8d7ef2a1c5197c8ee9e03eedc28a5a23e7c07f (diff)
downloadnextcloud-server-e10402c61b748857c2d9acace60d632c87d8e4ac.tar.gz
nextcloud-server-e10402c61b748857c2d9acace60d632c87d8e4ac.zip
remoteStorage app version 0.5
Diffstat (limited to 'apps/remoteStorage')
-rw-r--r--apps/remoteStorage/templates/settings.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/apps/remoteStorage/templates/settings.php b/apps/remoteStorage/templates/settings.php
new file mode 100644
index 00000000000..9b5c3b6229c
--- /dev/null
+++ b/apps/remoteStorage/templates/settings.php
@@ -0,0 +1,28 @@
+ <fieldset class="personalblock">
+ <?php
+ echo '<img src="/apps/remoteStorage/remoteStorage.png" style="width:16px"> '
+ .'<strong>'.$l->t('remoteStorage').'</strong> user address: '
+ .OC_User::getUser().'@'.$_SERVER['SERVER_NAME']
+ .' (<a href="http://unhosted.org/">more info</a>)';
+ ?>
+ <p><em>Apps that currently have access to your ownCloud:</em></p>
+ <script>
+ function revokeToken(token) {
+ var xhr = new XMLHttpRequest();
+ xhr.open('POST', '/apps/remoteStorage/ajax/revokeToken.php', true);
+ xhr.send(token);
+ }
+ </script>
+ <ul>
+ <?php
+ foreach(OC_remoteStorage::getAllTokens() as $token => $details) {
+ echo '<li onmouseover="'
+ .'document.getElementById(\'revoke_'.$token.'\').style.display=\'inline\';"'
+ .'onmouseout="document.getElementById(\'revoke_'.$token.'\').style.display=\'none\';"'
+ .'> <strong>'.$details['appUrl'].'</strong>: '.$details['categories']
+ .' <a href="#" title="Revoke" class="action" style="display:none" id="revoke_'.$token.'" onclick="'
+ .'revokeToken(\''.$token.'\');this.parentNode.style.display=\'none\';"'
+ .'><img src="/core/img/actions/delete.svg"></a></li>'."\n";
+ }
+ ?></ul>
+ </fieldset>