summaryrefslogtreecommitdiffstats
path: root/core/templates
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-05-03 12:28:29 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-05-03 17:26:03 +0200
commitcd516eedcd4cca1abb92d8781749a6f152d34319 (patch)
tree855647c569e930df5f404a3fd56983db57343361 /core/templates
parent9f76b8b3563e7f001b2adf46dcedf0e2f37c0ffc (diff)
downloadnextcloud-server-cd516eedcd4cca1abb92d8781749a6f152d34319.tar.gz
nextcloud-server-cd516eedcd4cca1abb92d8781749a6f152d34319.zip
Use OC.Notification for update notifications
* instead of a static rendering inside PHP use the JS OC.Notification.showTemporary to hide the notification after 7 seconds automatically * fixes #14811
Diffstat (limited to 'core/templates')
-rw-r--r--core/templates/layout.user.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 87a6a9216d2..bcf47316a73 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -2,7 +2,11 @@
<!--[if lte IE 8]><html class="ng-csp ie ie8 lte9 lte8" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><![endif]-->
<!--[if IE 9]><html class="ng-csp ie ie9 lte9" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><!--<![endif]-->
- <head data-user="<?php p($_['user_uid']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>">
+ <head data-user="<?php p($_['user_uid']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>"
+ <?php if ($_['updateAvailable']): ?>
+ data-update-version="<?php print($_['updateVersion']); ?>" data-update-link="<?php print_unescaped($_['updateLink']); ?>"
+ <?php endif; ?>
+ >
<meta charset="utf-8">
<title>
<?php
@@ -31,9 +35,6 @@
<?php include('layout.noscript.warning.php'); ?>
<div id="notification-container">
<div id="notification"></div>
- <?php if ($_['updateAvailable']): ?>
- <div id="update-notification" style="display: inline;"><a href="<?php print_unescaped($_['updateLink']); ?>"><?php p($l->t('%s is available. Get more information on how to update.', array($_['updateVersion']))); ?></a></div>
- <?php endif; ?>
</div>
<header role="banner"><div id="header">
<a href="<?php print_unescaped(link_to('', 'index.php')); ?>"