summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-06-26 17:56:19 +0200
committerBjörn Schießle <schiessle@owncloud.com>2013-07-01 10:46:00 +0200
commit23cc69b816f5df465c7c9d0df5630d00abfaf6d0 (patch)
tree4e094a7b3b637719ed73a557285308af76d6d1a4
parentb19033b3533ce4726763aac6247aa156eb0a87d6 (diff)
downloadnextcloud-server-23cc69b816f5df465c7c9d0df5630d00abfaf6d0.tar.gz
nextcloud-server-23cc69b816f5df465c7c9d0df5630d00abfaf6d0.zip
construct the foother in defaults.php so that we use always the same footer
Conflicts: settings/templates/admin.php
-rw-r--r--apps/files_sharing/templates/public.php5
-rw-r--r--core/templates/layout.guest.php7
-rw-r--r--lib/defaults.php24
-rw-r--r--settings/templates/admin.php14
-rw-r--r--settings/templates/personal.php14
5 files changed, 44 insertions, 20 deletions
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 3a1c370b4c0..c9d56e7ff85 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -87,8 +87,7 @@
<?php endif; ?>
</div>
<footer>
- <p class="info"><a href="<?php p(OC_Defaults::getBaseUrl()); ?>"><?php p(OC_Defaults::getEntity()) ?></a>
- <?php OC_Util::getEditionString() === '' ? print_unescaped(' &ndash; ') : print_unescaped('<br/>'); ?>
- <?php p(OC_Defaults::getSlogan()); ?>
+ <p class="info">
+ <?php print_unescaped(OC_Defaults::getLongFooter()); ?>
</p>
</footer>
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index 4173212dfa3..ec73ad5456c 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -43,10 +43,7 @@
</div>
<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(' &ndash; ') : print_unescaped('<br/>'); ?>
- <?php p(OC_Defaults::getSlogan()); ?></p></footer>
+ <?php print_unescaped(OC_Defaults::getLongFooter()); ?>
+ </p></footer>
</body>
</html>
diff --git a/lib/defaults.php b/lib/defaults.php
index 7dc6fbd0ada..9043c04e7b6 100644
--- a/lib/defaults.php
+++ b/lib/defaults.php
@@ -71,4 +71,26 @@ class OC_Defaults {
}
}
-} \ No newline at end of file
+ public static function getShortFooter() {
+ if (OC_Util::getEditionString() === '') {
+ $footer = "<a href=\"". self::getBaseUrl() . "\" target=\"_blank\">" .self::getEntity() . "</a>".
+ ' – ' . self::getSlogan();
+ } else {
+ $footer = "© 2013 <a href=\"".self::getBaseUrl()."\" target=\"_blank\">".self::getEntity()."</a>".
+ " – " . self::getSlogan();
+ }
+
+ return $footer;
+ }
+
+ public static function getLongFooter() {
+ if (OC_Util::getEditionString() === '') {
+ $footer = self::getShortFooter();
+ } else {
+ $footer = "© 2013 <a href=\"".self::getBaseUrl()."\" target=\"_blank\">".self::getEntity()."</a>".
+ "<br/>" . self::getSlogan();
+ }
+ return $footer;
+ }
+
+}
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index 1ed3f6ef47f..0eba6862e6b 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -230,12 +230,16 @@ endfor;?>
</fieldset>
-<fieldset class="personalblock credits-footer">
-<?php if (OC_Util::getEditionString() === ''): ?>
+<fieldset class="personalblock">
<legend><strong><?php p($l->t('Version'));?></strong></legend>
- <strong>ownCloud</strong> <?php p(OC_Util::getVersionString()); ?> <?php p(OC_Util::getEditionString()); ?><br/>
+ <strong><?php p(OC_Defaults::getName()); ?></strong> <?php p(OC_Util::getVersionString()); ?>
+ (<?php print_unescaped(OC_Updater::ShowUpdatingHint()); ?>)<br/>
+<?php if (OC_Util::getEditionString() === ''): ?>
<?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>
+<fieldset class="personalblock credits-footer">
+<p>
+ <?php print_unescaped(OC_Defaults::getShortFooter()); ?>
+</p>
+</fieldset>
diff --git a/settings/templates/personal.php b/settings/templates/personal.php
index a9457399d5d..5d0bb77c78e 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -111,13 +111,15 @@ if($_['passwordChangeSupported']) {
print_unescaped($form);
};?>
-<fieldset class="personalblock credits-footer">
-<?php if (OC_Util::getEditionString() === ''): ?>
+<fieldset class="personalblock">
<legend><strong><?php p($l->t('Version'));?></strong></legend>
- <strong>ownCloud</strong> <?php p(OC_Util::getVersionString()); ?>
- <?php p(OC_Util::getEditionString()); ?> <br />
+ <strong><?php p(OC_Defaults::getName()); ?></strong> <?php p(OC_Util::getVersionString()); ?><br/>
+<?php if (OC_Util::getEditionString() === ''): ?>
<?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>
+<fieldset class="personalblock credits-footer">
+<p>
+ <?php print_unescaped(OC_Defaults::getShortFooter()); ?>
+</p>
+</fieldset>