summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-11-06 09:06:24 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-11-06 11:42:18 +0100
commit5682d302c72ae42dfa16b068ad70fe312ed1ff9d (patch)
tree6ec25f56e0a085117a2fd685a55c3ed46d637cf6 /apps/files_trashbin
parent54a30a4b81700570303eaae03810f6ef553d66a2 (diff)
downloadnextcloud-server-5682d302c72ae42dfa16b068ad70fe312ed1ff9d.tar.gz
nextcloud-server-5682d302c72ae42dfa16b068ad70fe312ed1ff9d.zip
Add grid toggle for every files view
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r--apps/files_trashbin/list.php8
-rw-r--r--apps/files_trashbin/templates/index.php2
2 files changed, 9 insertions, 1 deletions
diff --git a/apps/files_trashbin/list.php b/apps/files_trashbin/list.php
index 77823617831..48ed7b694d0 100644
--- a/apps/files_trashbin/list.php
+++ b/apps/files_trashbin/list.php
@@ -24,8 +24,16 @@
// Check if we are a user
OCP\User::checkLoggedIn();
+$config = \OC::$server->getConfig();
+$userSession = \OC::$server->getUserSession();
+
+$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', true);
+$isIE = \OCP\Util::isIE();
$tmpl = new OCP\Template('files_trashbin', 'index', '');
+
+// gridview not available for ie
+$tmpl->assign('showgridview', $showgridview && !$isIE);
OCP\Util::addStyle('files_trashbin', 'trash');
OCP\Util::addScript('files_trashbin', 'app');
OCP\Util::addScript('files_trashbin', 'filelist');
diff --git a/apps/files_trashbin/templates/index.php b/apps/files_trashbin/templates/index.php
index 054ffee6176..e503e364af9 100644
--- a/apps/files_trashbin/templates/index.php
+++ b/apps/files_trashbin/templates/index.php
@@ -18,7 +18,7 @@
<p></p>
</div>
-<table id="filestable" class="list-container view-grid">
+<table id="filestable" class="list-container <?php p($_['showgridview'] ? 'view-grid' : '') ?>">
<thead>
<tr>
<th id="headerSelection" class="hidden column-selection">