aboutsummaryrefslogtreecommitdiffstats
path: root/files/templates
diff options
context:
space:
mode:
Diffstat (limited to 'files/templates')
-rw-r--r--files/templates/admin.php5
-rw-r--r--files/templates/index.php7
2 files changed, 10 insertions, 2 deletions
diff --git a/files/templates/admin.php b/files/templates/admin.php
index 8c3ba56ad52..fd86d02e1ed 100644
--- a/files/templates/admin.php
+++ b/files/templates/admin.php
@@ -6,7 +6,10 @@
<?php if($_['htaccessWorking']):?>
<label for="maxUploadSize"><?php echo $l->t( 'Maximum upload size' ); ?> </label><input name='maxUploadSize' id="maxUploadSize" value='<?php echo $_['uploadMaxFilesize'] ?>'/><br/>
<?php endif;?>
- <label for="maxZipInputSize"><?php echo $l->t( 'Maximum input size for zip files (affects folder- and multi-file download)' ); ?> </label><input name="maxZipInputSize" id="maxZipInputSize" value='<?php echo $_['maxZipInputSize'] ?>'/><br/>
+ <input type="checkbox" name="allowZipDownload" id="allowZipDownload" value="1" title="<?php echo $l->t( 'Needed for multi-file and folder downloads.' ); ?>"<?php if ($_['allowZipDownload']) echo ' checked="checked"'; ?> /> <label for="allowZipDownload"><?php echo $l->t( 'Enable ZIP-download' ); ?></label> <br/>
+ <fieldset class="personalblock">
+ <label for="maxZipInputSize"><?php echo $l->t( 'Maximum input size for ZIP files:' ); ?> </label><input name="maxZipInputSize" id="maxZipInputSize" value='<?php echo $_['maxZipInputSize'] ?>' title="<?php echo $l->t( '0 is unlimited' ); ?>"<?php if (!$_['allowZipDownload']) echo ' disabled="disabled"'; ?> /><br/>
+ </fieldset>
<input type="submit" value="Save"/>
</fieldset>
</form>
diff --git a/files/templates/index.php b/files/templates/index.php
index 7fc51c288e1..497a0f36c0d 100644
--- a/files/templates/index.php
+++ b/files/templates/index.php
@@ -40,7 +40,9 @@
<?php if(!isset($_['readonly']) || !$_['readonly']) { ?><input type="checkbox" id="select_all" /><?php } ?>
<span class='name'><?php echo $l->t( 'Name' ); ?></span>
<span class='selectedActions'>
- <a href="" title="<?php echo $l->t('Download')?>" class="download"><img class='svg' alt="Download" src="<?php echo image_path("core", "actions/download.svg"); ?>" /></a>
+ <?php if(OC_Preferences::getValue('', 'files', 'allowZipDownload', 1)) : ?>
+ <a href="" title="<?php echo $l->t('Download')?>" class="download"><img class='svg' alt="Download" src="<?php echo image_path("core", "actions/download.svg"); ?>" /></a>
+ <?php endif; ?>
<a href="" title="Share" class="share"><img class='svg' alt="Share" src="<?php echo image_path("core", "actions/share.svg"); ?>" /></a>
</span>
</th>
@@ -66,3 +68,6 @@
<?php echo $l->t('Current scanning');?> <span id='scan-current'></spann>
</p>
</div>
+
+<!-- config hints for javascript -->
+<input type="hidden" name="allowZipDownload" id="allowZipDownload" value="<?php echo OC_Preferences::getValue('', 'files', 'allowZipDownload', 1); ?>" /> \ No newline at end of file