diff options
-rw-r--r-- | lib/util.php | 38 | ||||
-rw-r--r-- | templates/wizard.php | 6 | ||||
-rw-r--r-- | wizard.php | 1 |
3 files changed, 42 insertions, 3 deletions
diff --git a/lib/util.php b/lib/util.php new file mode 100644 index 00000000..318033e2 --- /dev/null +++ b/lib/util.php @@ -0,0 +1,38 @@ +<?php + +/** + * ownCloud - firstrunwizard App + * + * @author Georg Ehrke + * @copyright 2015 Georg Ehrke georg@ownCloud.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library 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 library. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OCA\FirstRunWizard; + +class Util { + + /** + * mimic \OC_Util::getEditionString() + * @return string + */ + public static function getEdition() { + if (\OC::$server->getAppManager()->isEnabledForUser('enterprise_key')) { + return "Enterprise"; + } + return ''; + } +}
\ No newline at end of file diff --git a/templates/wizard.php b/templates/wizard.php index df5122ef..b5d51e2a 100644 --- a/templates/wizard.php +++ b/templates/wizard.php @@ -4,7 +4,7 @@ <img class="svg" src="<?php print_unescaped(OCP\Util::imagePath('core', 'actions/close.svg')); ?>"> </a> <h1><?php p($l->t('Welcome to %s', array($theme->getTitle()))); ?></h1> -<?php if (OC_Util::getEditionString() === ''): ?> +<?php if ($_['edition'] === ''): ?> <p><?php p($l->t('Your personal web services. All your files, contacts, calendar and more, in one place.'));?></p> <?php else: ?> <p><?php p($theme->getSlogan()); ?></p> @@ -25,7 +25,7 @@ alt="<?php p($l->t('iOS app'));?>" /> </a> -<?php if (OC_Util::getEditionString() === ''): ?> +<?php if ($_['edition'] === ''): ?> <h2><?php p($l->t('Connect your desktop apps to %s', array($theme->getName()))); ?></h2> <a target="_blank" class="button" href="<?php p(link_to_docs('user-sync-calendars')) ?>"> <img class="appsmall appsmall-calendar svg" alt="" @@ -53,7 +53,7 @@ <?php endif; ?> <p class="footnote"> -<?php if (OC_Util::getEditionString() === ''): ?> +<?php if ($_['edition'] === ''): ?> <?php print_unescaped($l->t('There’s more information in the <a target="_blank" href="%s">documentation</a> and on our <a target="_blank" href="http://owncloud.org">website</a>.', array(link_to_docs('user_manual')))); ?><br> <?php print_unescaped($l->t('If you like ownCloud, <a href="mailto:?subject=ownCloud @@ -37,5 +37,6 @@ $clients = array( $tmpl = new OCP\Template( 'firstrunwizard', 'wizard', '' ); $tmpl->assign('logo', OCP\Util::linkTo('core','img/logo-inverted.svg')); $tmpl->assign('clients', $clients); +$tmpl->assign('edition', OCA\FirstRunWizard\Util::getEdition()); $tmpl->printPage(); |