Merge pull request #3687 from owncloud/template_updates
Make templates aware of different owncloud editions
This commit is contained in:
commit
7889f2ef5c
9 changed files with 119 additions and 18 deletions
|
@ -46,5 +46,9 @@
|
|||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<footer><p class="info"><a href="http://owncloud.org/">ownCloud</a> –
|
||||
<?php p($l->t('web services under your control')); ?></p></footer>
|
||||
<footer>
|
||||
<p class="info"><a href="<?php p(OC_Defaults::getBaseUrl()); ?>"><?php p(OC_Defaults::getEntity()) ?></a>
|
||||
<?php OC_Util::getEditionString() === '' ? print_unescaped(' – ') : print_unescaped('<br/>'); ?>
|
||||
<?php p(OC_Defaults::getSlogan()); ?>
|
||||
</p>
|
||||
</footer>
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
<!--[if gt IE 9]><html class="ng-csp ie"><![endif]-->
|
||||
<!--[if !IE]><!--><html class="ng-csp"><!--<![endif]-->
|
||||
<head>
|
||||
<title>ownCloud</title>
|
||||
<title>
|
||||
<?php p(OC_Defaults::getName()); ?>
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="shortcut icon" href="<?php print_unescaped(image_path('', 'favicon.png')); ?>" />
|
||||
<link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path('', 'favicon-touch.png')); ?>" />
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
<!--[if gt IE 9]><html class="ng-csp ie"><![endif]-->
|
||||
<!--[if !IE]><!--><html class="ng-csp"><!--<![endif]-->
|
||||
<head data-requesttoken="<?php p($_['requesttoken']); ?>">
|
||||
<title>ownCloud</title>
|
||||
<title>
|
||||
<?php p(OC_Defaults::getName()); ?>
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="apple-itunes-app" content="app-id=543672169">
|
||||
<link rel="shortcut icon" href="<?php print_unescaped(image_path('', 'favicon.png')); ?>" />
|
||||
|
@ -33,10 +35,18 @@
|
|||
<div id="login">
|
||||
<header><div id="header">
|
||||
<img src="<?php print_unescaped(image_path('', 'logo.svg')); ?>" class="svg" alt="ownCloud" />
|
||||
<?php if (OC_Util::getEditionString() !== ''): ?>
|
||||
<div id="logo-claim">Enterprise Edition</div>
|
||||
<?php endif; ?>
|
||||
</div></header>
|
||||
<?php print_unescaped($_['content']); ?>
|
||||
</div>
|
||||
<footer><p class="info"><a href="http://owncloud.org/">ownCloud</a> –
|
||||
<?php p($l->t( 'web services under your control' )); ?></p></footer>
|
||||
<footer>
|
||||
<p class="info">
|
||||
<?php OC_Util::getEditionString() === '' ? '' : p('© 2013 '); ?>
|
||||
<a href="<?php p(OC_Defaults::getBaseUrl())?>">
|
||||
<?php p(OC_Defaults::getEntity()); ?></a>
|
||||
<?php OC_Util::getEditionString() === '' ? print_unescaped(' – ') : print_unescaped('<br/>'); ?>
|
||||
<?php p(OC_Defaults::getSlogan()); ?></p></footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -6,8 +6,11 @@
|
|||
<!--[if gt IE 9]><html class="ng-csp ie"><![endif]-->
|
||||
<!--[if !IE]><!--><html class="ng-csp"><!--<![endif]-->
|
||||
<head data-user="<?php p($_['user_uid']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>">
|
||||
<title><?php p(!empty($_['application'])?$_['application'].' | ':'') ?>ownCloud
|
||||
<?php p(trim($_['user_displayname']) != '' ?' ('.$_['user_displayname'].') ':'') ?></title>
|
||||
<title>
|
||||
<?php p(!empty($_['application'])?$_['application'].' | ':'');
|
||||
p(OC_Defaults::getName());
|
||||
p(trim($_['user_displayname']) != '' ?' ('.$_['user_displayname'].') ':'') ?>
|
||||
</title>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="apple-itunes-app" content="app-id=543672169">
|
||||
|
@ -40,7 +43,9 @@
|
|||
<header><div id="header">
|
||||
<a href="<?php print_unescaped(link_to('', 'index.php')); ?>" title="" id="owncloud"><img class="svg"
|
||||
src="<?php print_unescaped(image_path('', 'logo-wide.svg')); ?>" alt="ownCloud" /></a>
|
||||
|
||||
<?php if (OC_Util::getEditionString() !== ''): ?>
|
||||
<div id="logo-claim">Enterprise Edition</div>
|
||||
<?php endif; ?>
|
||||
<ul id="settings" class="svg">
|
||||
<span id="expand" tabindex="0" role="link">
|
||||
<span id="expandDisplayName"><?php p(trim($_['user_displayname']) != '' ? $_['user_displayname'] : $_['user_uid']) ?></span>
|
||||
|
|
|
@ -349,7 +349,8 @@ class OC_App{
|
|||
|
||||
$settings = array();
|
||||
// by default, settings only contain the help menu
|
||||
if(OC_Config::getValue('knowledgebaseenabled', true)==true) {
|
||||
if(OC_Util::getEditionString() === '' &&
|
||||
OC_Config::getValue('knowledgebaseenabled', true)==true) {
|
||||
$settings = array(
|
||||
array(
|
||||
"id" => "help",
|
||||
|
|
74
lib/defaults.php
Normal file
74
lib/defaults.php
Normal file
|
@ -0,0 +1,74 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Default strings and values which differ between the enterprise and the
|
||||
* community edition. Use the get methods to always get the right strings.
|
||||
*/
|
||||
|
||||
class OC_Defaults {
|
||||
|
||||
private static $communityEntity = "ownCloud";
|
||||
private static $communityName = "ownCloud";
|
||||
private static $communityBaseUrl = "http://owncloud.org";
|
||||
private static $communitySyncClientUrl = " http://owncloud.org/sync-clients/";
|
||||
private static $communityDocBaseUrl = "http://doc.owncloud.org";
|
||||
private static $communitySlogan = "web services under your control";
|
||||
|
||||
private static $enterpriseEntity = "ownCloud Inc.";
|
||||
private static $enterpriseName = "ownCloud Enterprise Edition";
|
||||
private static $enterpriseBaseUrl = "https://owncloud.com";
|
||||
private static $enterpriseDocBaseUrl = "http://doc.owncloud.com";
|
||||
private static $enterpiseSyncClientUrl = "https://owncloud.com/products/desktop-clients";
|
||||
private static $enterpriseSlogan = "Your Cloud, Your Data, Your Way!";
|
||||
|
||||
|
||||
public static function getBaseUrl() {
|
||||
if (OC_Util::getEditionString() === '') {
|
||||
return self::$communityBaseUrl;
|
||||
} else {
|
||||
return self::$enterpriseBaseUrl;
|
||||
}
|
||||
}
|
||||
|
||||
public static function getSyncClientUrl() {
|
||||
if (OC_Util::getEditionString() === '') {
|
||||
return self::$communitySyncClientUrl;
|
||||
} else {
|
||||
return self::$enterpiseSyncClientUrl;
|
||||
}
|
||||
}
|
||||
|
||||
public static function getDocBaseUrl() {
|
||||
if (OC_Util::getEditionString() === '') {
|
||||
return self::$communityDocBaseUrl;
|
||||
} else {
|
||||
return self::$enterpriseDocBaseUrl;
|
||||
}
|
||||
}
|
||||
|
||||
public static function getName() {
|
||||
if (OC_Util::getEditionString() === '') {
|
||||
return self::$communityName;
|
||||
} else {
|
||||
return self::$enterpriseName;
|
||||
}
|
||||
}
|
||||
|
||||
public static function getEntity() {
|
||||
if (OC_Util::getEditionString() === '') {
|
||||
return self::$communityEntity;
|
||||
} else {
|
||||
return self::$enterpriseEntity;
|
||||
}
|
||||
}
|
||||
|
||||
public static function getSlogan() {
|
||||
$l = OC_L10N::get('core');
|
||||
if (OC_Util::getEditionString() === '') {
|
||||
return $l->t(self::$communitySlogan);
|
||||
} else {
|
||||
return self::$enterpriseSlogan;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -60,7 +60,7 @@ usort( $languages, function ($a, $b) {
|
|||
|
||||
//links to clients
|
||||
$clients = array(
|
||||
'desktop' => OC_Config::getValue('customclient_desktop', 'http://owncloud.org/sync-clients/'),
|
||||
'desktop' => OC_Config::getValue('customclient_desktop', OC_Defaults::getSyncClientUrl()),
|
||||
'android' => OC_Config::getValue('customclient_android', 'https://play.google.com/store/apps/details?id=com.owncloud.android'),
|
||||
'ios' => OC_Config::getValue('customclient_ios', 'https://itunes.apple.com/us/app/owncloud/id543672169?mt=8')
|
||||
);
|
||||
|
|
|
@ -230,10 +230,12 @@ endfor;?>
|
|||
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset class="personalblock">
|
||||
<fieldset class="personalblock credits-footer">
|
||||
<?php if (OC_Util::getEditionString() === ''): ?>
|
||||
<legend><strong><?php p($l->t('Version'));?></strong></legend>
|
||||
<strong>ownCloud</strong> <?php p(OC_Util::getVersionString()); ?> <?php p(OC_Util::getEditionString()); ?><br/>
|
||||
<?php print_unescaped($l->t('Developed by the <a href="http://ownCloud.org/contact" target="_blank">ownCloud community</a>, the <a href="https://github.com/owncloud" target="_blank">source code</a> is licensed under the <a href="http://www.gnu.org/licenses/agpl-3.0.html" target="_blank"><abbr title="Affero General Public License">AGPL</abbr></a>.')); ?>
|
||||
<?php else: ?>
|
||||
<p>© 2013 <a href="<?php p(OC_Defaults::getBaseUrl()); ?>" target="_blank"><?php p(OC_Defaults::getEntity()); ?></a> – <?php p(OC_Defaults::getSlogan()); ?></p>
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
|
||||
|
|
|
@ -94,8 +94,10 @@ if($_['passwordChangeSupported']) {
|
|||
<option value="<?php p($language['code']);?>"><?php p($language['name']);?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
<?php if (OC_Util::getEditionString() === ''): ?>
|
||||
<a href="https://www.transifex.net/projects/p/owncloud/team/<?php p($_['activelanguage']['code']);?>/"
|
||||
target="_blank"><em><?php p($l->t('Help translate'));?></em></a>
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
|
@ -109,12 +111,13 @@ if($_['passwordChangeSupported']) {
|
|||
print_unescaped($form);
|
||||
};?>
|
||||
|
||||
|
||||
<fieldset class="personalblock">
|
||||
<fieldset class="personalblock credits-footer">
|
||||
<?php if (OC_Util::getEditionString() === ''): ?>
|
||||
<legend><strong><?php p($l->t('Version'));?></strong></legend>
|
||||
<strong>ownCloud</strong> <?php p(OC_Util::getVersionString()); ?>
|
||||
<?php p(OC_Util::getEditionString()); ?> <br />
|
||||
<?php print_unescaped($l->t('Developed by the <a href="http://ownCloud.org/contact" target="_blank">ownCloud community</a>, the <a href="https://github.com/owncloud" target="_blank">source code</a> is licensed under the <a href="http://www.gnu.org/licenses/agpl-3.0.html" target="_blank"><abbr title="Affero General Public License">AGPL</abbr></a>.')); ?>
|
||||
<?php else: ?>
|
||||
<p>© 2013 <a href="<?php p(OC_Defaults::getBaseUrl()); ?>" target="_blank"><?php p(OC_Defaults::getEntity()); ?></a> – <?php p(OC_Defaults::getSlogan()); ?></p>
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue