]> source.dussan.org Git - nextcloud-server.git/commitdiff
Theming: fix federated sharing button color
authorJulius Haertl <jus@bitgrid.net>
Mon, 8 Aug 2016 12:36:06 +0000 (14:36 +0200)
committerJulius Haertl <jus@bitgrid.net>
Fri, 26 Aug 2016 10:07:45 +0000 (12:07 +0200)
apps/federatedfilesharing/settings-personal.php
apps/federatedfilesharing/templates/settings-personal.php

index a937106ce0ea670f515f5b4fc9f1aa149e532cb1..132a36826e71d14cf90d0b3c471529a41f635de4 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 use OCA\FederatedFileSharing\AppInfo\Application;
+use OCA\Theming\Template;
 
 \OC_Util::checkLoggedIn();
 
@@ -41,6 +42,7 @@ if (count($matches) > 0 && $matches[1] <= 9) {
 $cloudID = \OC::$server->getUserSession()->getUser()->getCloudId();
 $url = 'https://nextcloud.com/federation#' . $cloudID;
 $ownCloudLogoPath = \OC::$server->getURLGenerator()->imagePath('core', 'logo-icon.svg');
+$theme = \OC::$server->getThemingDefaults();
 
 $tmpl = new OCP\Template('federatedfilesharing', 'settings-personal');
 $tmpl->assign('outgoingServer2serverShareEnabled', $federatedShareProvider->isOutgoingServer2serverShareEnabled());
@@ -50,5 +52,6 @@ $tmpl->assign('owncloud_logo_path', $ownCloudLogoPath);
 $tmpl->assign('reference', $url);
 $tmpl->assign('cloudId', $cloudID);
 $tmpl->assign('showShareIT', !$isIE8);
+$tmpl->assign('color', $theme->getMailHeaderColor());
 
 return $tmpl->fetchPage();
index aad1e3859820e06e90dbf1a7f89dfc54a9a4cdbb..3ebd64784ee1338a8d7a9e60ba6eed8725b6a08f 100644 (file)
@@ -55,7 +55,7 @@ if ($_['showShareIT']) {
                <div class="hidden" id="oca-files-sharing-add-to-your-website-expanded">
                <p style="margin: 10px 0">
                        <a target="_blank" rel="noreferrer" href="<?php p($_['reference']); ?>"
-                               style="padding:10px;background-color:#0082c9;color:#fff;border-radius:3px;padding-left:4px;">
+                               style="padding:10px;background-color:<?php p($_['color']); ?>;color:#fff;border-radius:3px;padding-left:4px;">
                                <img src="<?php p($_['owncloud_logo_path']); ?>"
                                        style="width:50px;position:relative;top:8px;">
                                <?php p($l->t('Share with me via Nextcloud')); ?>