Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2019-06-23 22:21:13 +0300
committerDaniel Kesselberg <mail@danielkesselberg.de>2019-06-23 22:21:13 +0300
commitf310b964d453ed0192661d005e5f575918bda2c7 (patch)
treef1e09dbd36543415b5de39fe80eb28c374880d19 /apps/files/templates
parente558cb2b5d609f141f4e89526b248adf38e1ebef (diff)
Hide quota bar if unlimited
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'apps/files/templates')
-rw-r--r--apps/files/templates/appnavigation.php37
1 files changed, 17 insertions, 20 deletions
diff --git a/apps/files/templates/appnavigation.php b/apps/files/templates/appnavigation.php
index fecaa8401a9..00ea164752d 100644
--- a/apps/files/templates/appnavigation.php
+++ b/apps/files/templates/appnavigation.php
@@ -9,26 +9,23 @@
}
?>
- <li id="quota"
- class="pinned <?php p($pinned === 0 ? 'first-pinned ' : '') ?><?php
- if ($_['quota'] !== \OCP\Files\FileInfo::SPACE_UNLIMITED) {
- ?>has-tooltip" title="<?php p($_['usage_relative'] . '%, ');
- p($l->t('%s of %s used', [$_['usage'], $_['total_space']]));
- } ?>">
- <a href="#" class="icon-quota svg">
- <p id="quotatext"><?php
- if ($_['quota'] !== \OCP\Files\FileInfo::SPACE_UNLIMITED) {
- p($l->t('%1$s%% of %2$s used', [round($_['usage_relative'], 1), $_['total_space']]));
- } else {
- p($l->t('%s used', [$_['usage']]));
- } ?></p>
- <div class="quota-container">
- <progress value="<?php p($_['usage_relative']); ?>"
- max="100"
- <?php if ($_['usage_relative'] > 80): ?> class="warn" <?php endif; ?>></progress>
- </div>
- </a>
- </li>
+ <?php if($_['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED): ?>
+ <li id="quota" class="pinned <?php p($pinned === 0 ? 'first-pinned ' : '') ?>">
+ <a href="#" class="icon-quota svg">
+ <p><?php p($l->t('%s used', [$_['usage']])); ?></p>
+ </a>
+ </li>
+ <?php else: ?>
+ <li id="quota" class="has-tooltip pinned <?php p($pinned === 0 ? 'first-pinned ' : '') ?>"
+ title="<?php p($_['usage_relative'] . '%, '); p($l->t('%s of %s used', [$_['usage'], $_['total_space']])); ?>">
+ <a href="#" class="icon-quota svg">
+ <p id="quotatext"><?php p($l->t('%1$s%% of %2$s used', [round($_['usage_relative'], 1), $_['total_space']])); ?></p>
+ <div class="quota-container">
+ <progress value="<?php p($_['usage_relative']); ?>" max="100" class="<?= ($_['usage_relative'] > 80) ? 'warn' : '' ?>"></progress>
+ </div>
+ </a>
+ </li>
+ <?php endif; ?>
</ul>
<div id="app-settings">
<div id="app-settings-header">