Merge pull request #10842 from owncloud/remove-add-to-your-owncloud-if-disabled
Hiding add to your own cloud if server2server sharing is not enabled
This commit is contained in:
commit
a9a2397c1c
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
// Load other apps for file previews
|
// Load other apps for file previews
|
||||||
|
use OCA\Files_Sharing\Helper;
|
||||||
|
|
||||||
OC_App::loadApps();
|
OC_App::loadApps();
|
||||||
|
|
||||||
$appConfig = \OC::$server->getAppConfig();
|
$appConfig = \OC::$server->getAppConfig();
|
||||||
|
@ -132,6 +134,7 @@ if (isset($path)) {
|
||||||
$tmpl->assign('mimetype', \OC\Files\Filesystem::getMimeType($path));
|
$tmpl->assign('mimetype', \OC\Files\Filesystem::getMimeType($path));
|
||||||
$tmpl->assign('dirToken', $linkItem['token']);
|
$tmpl->assign('dirToken', $linkItem['token']);
|
||||||
$tmpl->assign('sharingToken', $token);
|
$tmpl->assign('sharingToken', $token);
|
||||||
|
$tmpl->assign('server2serversharing', Helper::isOutgoingServer2serverShareEnabled());
|
||||||
$tmpl->assign('protected', isset($linkItem['share_with']) ? 'true' : 'false');
|
$tmpl->assign('protected', isset($linkItem['share_with']) ? 'true' : 'false');
|
||||||
|
|
||||||
$urlLinkIdentifiers= (isset($token)?'&t='.$token:'')
|
$urlLinkIdentifiers= (isset($token)?'&t='.$token:'')
|
||||||
|
|
|
@ -23,13 +23,18 @@
|
||||||
<div id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div>
|
<div id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div>
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
<span id="details">
|
<span id="details">
|
||||||
<span id="save" data-protected="<?php p($_['protected'])?>" data-owner="<?php p($_['displayName'])?>" data-name="<?php p($_['filename'])?>">
|
<?php
|
||||||
|
if ($_['server2serversharing']) {
|
||||||
|
?>
|
||||||
|
<span id="save" data-protected="<?php p($_['protected']) ?>"
|
||||||
|
data-owner="<?php p($_['displayName']) ?>" data-name="<?php p($_['filename']) ?>">
|
||||||
<button id="save-button"><?php p($l->t('Add to your ownCloud')) ?></button>
|
<button id="save-button"><?php p($l->t('Add to your ownCloud')) ?></button>
|
||||||
<form class="save-form hidden" action="#">
|
<form class="save-form hidden" action="#">
|
||||||
<input type="text" id="remote_address" placeholder="example.com/owncloud"/>
|
<input type="text" id="remote_address" placeholder="example.com/owncloud"/>
|
||||||
<button id="save-button-confirm" class="icon-confirm svg"></button>
|
<button id="save-button-confirm" class="icon-confirm svg"></button>
|
||||||
</form>
|
</form>
|
||||||
</span>
|
</span>
|
||||||
|
<?php } ?>
|
||||||
<a href="<?php p($_['downloadURL']); ?>" id="download" class="button">
|
<a href="<?php p($_['downloadURL']); ?>" id="download" class="button">
|
||||||
<img class="svg" alt="" src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>"/>
|
<img class="svg" alt="" src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>"/>
|
||||||
<span id="download-text"><?php p($l->t('Download'))?></span>
|
<span id="download-text"><?php p($l->t('Download'))?></span>
|
||||||
|
|
Loading…
Reference in New Issue