From ff2c819ed3df2daa7c1cc8827e34b738188ff108 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Wed, 27 Jun 2018 19:59:17 +0200 Subject: Move social buttons to the personal settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Settings/Admin/ServerDevNotice.php | 54 ------------------ lib/private/Settings/Manager.php | 4 +- lib/private/Settings/Personal/ServerDevNotice.php | 54 ++++++++++++++++++ settings/css/settings.scss | 6 +- settings/templates/settings.development.notice.php | 64 --------------------- .../settings/admin/server.development.notice.php | 3 - .../settings/personal/development.notice.php | 66 ++++++++++++++++++++++ 7 files changed, 125 insertions(+), 126 deletions(-) delete mode 100644 lib/private/Settings/Admin/ServerDevNotice.php create mode 100644 lib/private/Settings/Personal/ServerDevNotice.php delete mode 100644 settings/templates/settings.development.notice.php delete mode 100644 settings/templates/settings/admin/server.development.notice.php create mode 100644 settings/templates/settings/personal/development.notice.php diff --git a/lib/private/Settings/Admin/ServerDevNotice.php b/lib/private/Settings/Admin/ServerDevNotice.php deleted file mode 100644 index 22637729b0f..00000000000 --- a/lib/private/Settings/Admin/ServerDevNotice.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * @author Arthur Schiwon - * @author Roeland Jago Douma - * - * @license GNU AGPL version 3 or any later version - * - * 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 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 - * 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 . - * - */ -namespace OC\Settings\Admin; - -use OCP\AppFramework\Http\TemplateResponse; -use OCP\Settings\ISettings; - -class ServerDevNotice implements ISettings { - /** - * @return TemplateResponse - */ - public function getForm() { - return new TemplateResponse('settings', 'settings/admin/server.development.notice'); - } - - /** - * @return string the section ID, e.g. 'sharing' - */ - public function getSection() { - return 'server'; - } - - /** - * @return int whether the form should be rather on the top or bottom of - * the admin section. The forms are arranged in ascending order of the - * priority values. It is required to return a value between 0 and 100. - * - * E.g.: 70 - */ - public function getPriority() { - return 1000; - } -} diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php index 4ee594c090f..7040f87261f 100644 --- a/lib/private/Settings/Manager.php +++ b/lib/private/Settings/Manager.php @@ -262,8 +262,6 @@ class Manager implements IManager { /** @var ISettings $form */ $form = new Admin\Overview($this->config); $forms[$form->getPriority()] = [$form]; - $form = new Admin\ServerDevNotice(); - $forms[$form->getPriority()] = [$form]; } if ($section === 'server') { /** @var ISettings $form */ @@ -305,6 +303,8 @@ class Manager implements IManager { $this->l ); $forms[$form->getPriority()] = [$form]; + $form = new Personal\ServerDevNotice(); + $forms[$form->getPriority()] = [$form]; } if($section === 'security') { /** @var ISettings $form */ diff --git a/lib/private/Settings/Personal/ServerDevNotice.php b/lib/private/Settings/Personal/ServerDevNotice.php new file mode 100644 index 00000000000..fa5a736cded --- /dev/null +++ b/lib/private/Settings/Personal/ServerDevNotice.php @@ -0,0 +1,54 @@ + + * + * @author Arthur Schiwon + * @author Roeland Jago Douma + * + * @license GNU AGPL version 3 or any later version + * + * 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 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 + * 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 . + * + */ +namespace OC\Settings\Personal; + +use OCP\AppFramework\Http\TemplateResponse; +use OCP\Settings\ISettings; + +class ServerDevNotice implements ISettings { + /** + * @return TemplateResponse + */ + public function getForm() { + return new TemplateResponse('settings', 'settings/personal/development.notice'); + } + + /** + * @return string the section ID, e.g. 'sharing' + */ + public function getSection() { + return 'personal-info'; + } + + /** + * @return int whether the form should be rather on the top or bottom of + * the admin section. The forms are arranged in ascending order of the + * priority values. It is required to return a value between 0 and 100. + * + * E.g.: 70 + */ + public function getPriority() { + return 1000; + } +} diff --git a/settings/css/settings.scss b/settings/css/settings.scss index cfca22d5bbb..a573f94d491 100644 --- a/settings/css/settings.scss +++ b/settings/css/settings.scss @@ -96,14 +96,14 @@ input { #personal-settings-avatar-container { display: inline-grid; grid-template-columns: 1fr; - grid-template-rows: 2fr 1fr 1fr; + grid-template-rows: 2fr 1fr; vertical-align: top; } .profile-settings-container { display: inline-grid; grid-template-columns: 1fr; - grid-template-rows: 1fr 1fr 1fr 1fr; + grid-template-rows: 1fr 2fr; } .personal-show-container { @@ -216,7 +216,7 @@ input { .personal-settings-container { display: inline-grid; grid-template-columns: 1fr 1fr; - grid-template-rows: 1fr 1fr 1fr 1fr; + grid-template-rows: 1fr 1fr 1fr; &:after { clear: both; } diff --git a/settings/templates/settings.development.notice.php b/settings/templates/settings.development.notice.php deleted file mode 100644 index 855c4dc26c7..00000000000 --- a/settings/templates/settings.development.notice.php +++ /dev/null @@ -1,64 +0,0 @@ -

- ', - '', - '', - '', - ], - $l->t('Developed by the {communityopen}Nextcloud community{linkclose}, the {githubopen}source code{linkclose} is licensed under the {licenseopen}AGPL{linkclose}.') - )); ?> -

- - diff --git a/settings/templates/settings/admin/server.development.notice.php b/settings/templates/settings/admin/server.development.notice.php deleted file mode 100644 index 42599c54459..00000000000 --- a/settings/templates/settings/admin/server.development.notice.php +++ /dev/null @@ -1,3 +0,0 @@ -
-

-
diff --git a/settings/templates/settings/personal/development.notice.php b/settings/templates/settings/personal/development.notice.php new file mode 100644 index 00000000000..41f70c0a822 --- /dev/null +++ b/settings/templates/settings/personal/development.notice.php @@ -0,0 +1,66 @@ +
+

+ ', + '', + '', + '', + ], + $l->t('Developed by the {communityopen}Nextcloud community{linkclose}, the {githubopen}source code{linkclose} is licensed under the {licenseopen}AGPL{linkclose}.') + )); ?> +

+ + +
\ No newline at end of file -- cgit v1.2.3