diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-11-06 09:06:24 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-11-06 11:42:18 +0100 |
commit | 5682d302c72ae42dfa16b068ad70fe312ed1ff9d (patch) | |
tree | 6ec25f56e0a085117a2fd685a55c3ed46d637cf6 /apps/files/templates | |
parent | 54a30a4b81700570303eaae03810f6ef553d66a2 (diff) | |
download | nextcloud-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/templates')
-rw-r--r-- | apps/files/templates/index.php | 8 | ||||
-rw-r--r-- | apps/files/templates/list.php | 8 | ||||
-rw-r--r-- | apps/files/templates/recentlist.php | 2 | ||||
-rw-r--r-- | apps/files/templates/simplelist.php | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index b49684643bb..69ad73f1081 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -1,6 +1,14 @@ <?php /** @var $l \OCP\IL10N */ ?> <?php $_['appNavigation']->printPage(); ?> <div id="app-content"> + + <?php if (!$_['isIE']) { ?> + <input type="checkbox" class="hidden-visually" id="showgridview" + <?php if($_['showgridview']) { ?>checked="checked" <?php } ?>/> + <label id="view-toggle" for="showgridview" class="button <?php p($_['showgridview'] ? 'icon-toggle-filelist' : 'icon-toggle-pictures') ?>" + title="<?php p($l->t('Toggle grid view'))?>"></label> + <?php } ?> + <?php foreach ($_['appContents'] as $content) { ?> <div id="app-content-<?php p($content['id']) ?>" class="hidden viewcontainer"> <?php print_unescaped($content['content']) ?> diff --git a/apps/files/templates/list.php b/apps/files/templates/list.php index 2bc94ca7afb..75dc2bee26f 100644 --- a/apps/files/templates/list.php +++ b/apps/files/templates/list.php @@ -24,13 +24,6 @@ <?php endif;?> <input type="hidden" class="max_human_file_size" value="(max <?php isset($_['uploadMaxHumanFilesize']) ? p($_['uploadMaxHumanFilesize']) : ''; ?>)"> - <!-- IF NOT IE, SHOW GRIDVIEW --> - <?php if (!$_['isIE']) { ?> - <input type="checkbox" class="hidden-visually" id="showgridview" - <?php if($_['showgridview']) { ?>checked="checked" <?php } ?>/> - <label id="view-toggle" for="showgridview" class="button <?php p($_['showgridview'] ? 'icon-toggle-filelist' : 'icon-toggle-pictures') ?>" - title="<?php p($l->t('Toggle grid view'))?>"></label> - <?php } ?> </div> <div id="emptycontent" class="hidden"> @@ -44,7 +37,6 @@ <h2><?php p($l->t('No entries found in this folder')); ?></h2> <p></p> </div> - <table id="filestable" class="list-container <?php p($_['showgridview'] ? 'view-grid' : '') ?>" data-allow-public-upload="<?php p($_['publicUploadEnabled'])?>" data-preview-x="250" data-preview-y="250"> <thead> <tr> diff --git a/apps/files/templates/recentlist.php b/apps/files/templates/recentlist.php index 4c269c20256..360b5c95ee4 100644 --- a/apps/files/templates/recentlist.php +++ b/apps/files/templates/recentlist.php @@ -11,7 +11,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='headerName' class="hidden column-name"> diff --git a/apps/files/templates/simplelist.php b/apps/files/templates/simplelist.php index a99607ea642..9fd9c49c9c3 100644 --- a/apps/files/templates/simplelist.php +++ b/apps/files/templates/simplelist.php @@ -13,7 +13,7 @@ <h2><?php p($l->t('No entries found in this folder')); ?></h2> <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='headerName' class="hidden column-name"> |