diff options
author | Lukas Reschke <lukas@owncloud.com> | 2016-06-21 21:21:46 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-06-27 10:26:23 +0200 |
commit | 27b699bdbcd080ec9d5400a2391cdb2b725f7ee1 (patch) | |
tree | 0cd0e124cb6e7ea4b6dfdf1958df4eafae48d240 /apps/theming/appinfo | |
parent | cc321bc140f707257ffe1a11b4fa0238887e16fc (diff) | |
download | nextcloud-server-27b699bdbcd080ec9d5400a2391cdb2b725f7ee1.tar.gz nextcloud-server-27b699bdbcd080ec9d5400a2391cdb2b725f7ee1.zip |
Migrate logic to dynamic controller
Also adds support for having custom login backgrounds
Diffstat (limited to 'apps/theming/appinfo')
-rw-r--r-- | apps/theming/appinfo/app.php | 31 | ||||
-rw-r--r-- | apps/theming/appinfo/info.xml | 2 | ||||
-rw-r--r-- | apps/theming/appinfo/routes.php | 17 |
3 files changed, 40 insertions, 10 deletions
diff --git a/apps/theming/appinfo/app.php b/apps/theming/appinfo/app.php index ed7ea3e20f8..edf2c7d345a 100644 --- a/apps/theming/appinfo/app.php +++ b/apps/theming/appinfo/app.php @@ -1,23 +1,38 @@ <?php /** - * @author Björn Schießle <bjoern@schiessle.org> + * @copyright Copyright (c) 2016 Bjoern Schiessle <bjoern@schiessle.org> + * @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch> * - * @copyright Copyright (c) 2016, Bjoern Schiessle - * @license AGPL-3.0 + * @license GNU AGPL version 3 or any later version * - * This code is free software: you can redistribute it and/or modify + * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your opinion) any later version. + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/> + * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ \OCP\App::registerAdmin('theming', 'settings/settings-admin'); + +$linkToCSS = \OC::$server->getURLGenerator()->linkToRoute( + 'theming.Theming.getStylesheet', + [ + 'v' => \OC::$server->getConfig()->getAppValue('theming', 'cachebuster', '0'), + ] +); +\OC_Util::addHeader( + 'link', + [ + 'rel' => 'stylesheet', + 'href' => $linkToCSS, + ] +); + diff --git a/apps/theming/appinfo/info.xml b/apps/theming/appinfo/info.xml index f0f2fb80afe..58c839f2758 100644 --- a/apps/theming/appinfo/info.xml +++ b/apps/theming/appinfo/info.xml @@ -4,7 +4,7 @@ <name>Theming</name> <description>Adjust the Nextcloud theme</description> <licence>AGPL</licence> - <author>Bjoern Schiessle</author> + <author>Nextcloud</author> <version>0.1.0</version> <namespace>Theming</namespace> <category>other</category> diff --git a/apps/theming/appinfo/routes.php b/apps/theming/appinfo/routes.php index 7a2ff1f9dbd..dbbae372ffd 100644 --- a/apps/theming/appinfo/routes.php +++ b/apps/theming/appinfo/routes.php @@ -1,6 +1,7 @@ <?php /** * @copyright Copyright (c) 2016 Bjoern Schiessle <bjoern@schiessle.org> + * @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch> * * @license GNU AGPL version 3 or any later version * @@ -19,7 +20,6 @@ * */ - namespace OCA\Theming\AppInfo; (new \OCP\AppFramework\App('theming'))->registerRoutes($this, array('routes' => array( @@ -38,5 +38,20 @@ namespace OCA\Theming\AppInfo; 'url' => '/ajax/updateLogo', 'verb' => 'POST' ], + [ + 'name' => 'Theming#getStylesheet', + 'url' => '/styles.css', + 'verb' => 'GET', + ], + [ + 'name' => 'Theming#getLogo', + 'url' => '/logo', + 'verb' => 'GET', + ], + [ + 'name' => 'Theming#getLoginBackground', + 'url' => '/loginbackground', + 'verb' => 'GET', + ], ))); |