summaryrefslogtreecommitdiffstats
path: root/apps/files/templates
diff options
context:
space:
mode:
authorNina Pypchenko <22447785+nina-py@users.noreply.github.com>2021-01-10 19:14:49 +1100
committernpmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>2021-01-14 17:36:17 +0000
commitc14638877c0bb0533a72842ccc7c73d88f5122f0 (patch)
treebac7b25321ce61e30b578f51a9692ff52955edc8 /apps/files/templates
parent97743df3fcd6243f9b2755a4c86586b61a96e793 (diff)
downloadnextcloud-server-c14638877c0bb0533a72842ccc7c73d88f5122f0.tar.gz
nextcloud-server-c14638877c0bb0533a72842ccc7c73d88f5122f0.zip
Add "Crop image previews" setting to files
Added a new user setting that toggles cropping on image previews in grid view. True (default value): crops each image to a square. False: keep original aspect ratio. Signed-off-by: Nina Pypchenko <22447785+nina-py@users.noreply.github.com> Closes #18439. Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
Diffstat (limited to 'apps/files/templates')
-rw-r--r--apps/files/templates/appnavigation.php5
-rw-r--r--apps/files/templates/index.php1
2 files changed, 6 insertions, 0 deletions
diff --git a/apps/files/templates/appnavigation.php b/apps/files/templates/appnavigation.php
index f57295e8887..8e654567946 100644
--- a/apps/files/templates/appnavigation.php
+++ b/apps/files/templates/appnavigation.php
@@ -44,6 +44,11 @@ script(\OCA\Files\AppInfo\Application::APP_ID, 'dist/files-app-settings');
checked="checked" type="checkbox">
<label for="showhiddenfilesToggle"><?php p($l->t('Show hidden files')); ?></label>
</div>
+ <div id="files-setting-cropimagepreviews">
+ <input class="checkbox" id="cropimagepreviewsToggle"
+ checked="checked" type="checkbox">
+ <label for="cropimagepreviewsToggle"><?php p($l->t('Crop image previews')); ?></label>
+ </div>
<label for="webdavurl"><?php p($l->t('WebDAV')); ?></label>
<input id="webdavurl" type="text" readonly="readonly"
value="<?php p($_['webdav_url']); ?>"/>
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php
index 3ba0474daaf..8b6e2b0b91b 100644
--- a/apps/files/templates/index.php
+++ b/apps/files/templates/index.php
@@ -28,6 +28,7 @@
<input type="hidden" name="defaultFileSorting" id="defaultFileSorting" value="<?php p($_['defaultFileSorting']) ?>" />
<input type="hidden" name="defaultFileSortingDirection" id="defaultFileSortingDirection" value="<?php p($_['defaultFileSortingDirection']) ?>" />
<input type="hidden" name="showHiddenFiles" id="showHiddenFiles" value="<?php p($_['showHiddenFiles']); ?>" />
+<input type="hidden" name="cropImagePreviews" id="cropImagePreviews" value="<?php p($_['cropImagePreviews']); ?>" />
<?php endif;
foreach ($_['hiddenFields'] as $name => $value) {?>