aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/files.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2023-03-22 11:56:11 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2023-03-22 11:56:11 +0000
commit3dcee65137d7c25129c93a2f197084e2e9c8ab2f (patch)
tree00bab06ca06cda301075c10b9b095c58ea808a1a /app/controllers/files.php
parent2ba898859c58b7538f51a257c281a70d42452390 (diff)
use event bus to toggle display of gallery link and make sure the gallery link...
Closes #2409 Merge request studip/studip!1604
Diffstat (limited to 'app/controllers/files.php')
-rw-r--r--app/controllers/files.php24
1 files changed, 13 insertions, 11 deletions
diff --git a/app/controllers/files.php b/app/controllers/files.php
index 555e788..46a67e6 100644
--- a/app/controllers/files.php
+++ b/app/controllers/files.php
@@ -100,15 +100,6 @@ class FilesController extends AuthenticatedController
);
}
- $actions->addLink(
- _('Bildergalerie öffnen'),
- '#g',
- Icon::create('file-pic', 'clickable'),
- [
- 'onClick' => "STUDIP.Files.openGallery(); return false;"
- ]
- );
-
if ($folder->isWritable($GLOBALS['user']->id)) {
$actions->addLink(
_('Dokument hinzufügen'),
@@ -146,6 +137,17 @@ class FilesController extends AuthenticatedController
)->asDialog();
}
}
+
+ $actions->addLink(
+ _('Bildergalerie öffnen'),
+ '#g',
+ Icon::create('file-pic'),
+ [
+ 'onClick' => "STUDIP.Files.openGallery(); return false;",
+ 'style' => 'display: none',
+ ]
+ );
+
$sidebar->addWidget($actions);
if ($folder->isWritable($GLOBALS['user']->id)) {
@@ -612,10 +614,10 @@ class FilesController extends AuthenticatedController
$actions->addLink(
_('Bildergalerie öffnen'),
'#g',
- Icon::create('file-pic', 'clickable'),
+ Icon::create('file-pic'),
[
'onClick' => "STUDIP.Files.openGallery(); return false;",
- 'v-if' => "hasFilesOfType('image')"
+ 'style' => 'display: none',
]
);
$sidebar->addWidget($actions);