server/apps/remoteStorage/templates/settings.php

29 lines
1.2 KiB
PHP
Raw Normal View History

2012-03-01 20:55:20 +00:00
<fieldset class="personalblock">
<?php
2012-04-22 01:39:59 +00:00
echo '<img src="../apps/remoteStorage/remoteStorage.png" style="width:16px"> '
2012-03-01 20:55:20 +00:00
.'<strong>'.$l->t('remoteStorage').'</strong> user address: '
2012-05-01 16:50:31 +00:00
.OCP\USER::getUser().'@'.$_SERVER['SERVER_NAME']
2012-03-01 20:55:20 +00:00
.' (<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>