From 5682d302c72ae42dfa16b068ad70fe312ed1ff9d Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Tue, 6 Nov 2018 09:06:24 +0100 Subject: Add grid toggle for every files view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- apps/files/simplelist.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'apps/files/simplelist.php') diff --git a/apps/files/simplelist.php b/apps/files/simplelist.php index 1d61b397050..9515ec62363 100644 --- a/apps/files/simplelist.php +++ b/apps/files/simplelist.php @@ -22,8 +22,16 @@ */ // TODO: move to handlebars +$config = \OC::$server->getConfig(); +$userSession = \OC::$server->getUserSession(); + +$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', true); +$isIE = \OCP\Util::isIE(); // renders the controls and table headers template $tmpl = new OCP\Template('files', 'simplelist', ''); + +// gridview not available for ie +$tmpl->assign('showgridview', $showgridview && !$isIE); $tmpl->printPage(); -- cgit v1.2.3