You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.php 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <!--[if IE 8]><style>input[type="checkbox"]{padding:0;}table td{position:static !important;}</style><![endif]-->
  2. <div id="controls">
  3. <?php echo($_['breadcrumb']); ?>
  4. <?php if ($_['isCreatable']):?>
  5. <div class="actions <?php if (isset($_['files']) and count($_['files'])==0):?>emptyfolder<?php endif; ?>">
  6. <div id="new" class="button">
  7. <a><?php echo $l->t('New');?></a>
  8. <ul>
  9. <li style="background-image:url('<?php echo OCP\mimetype_icon('text/plain') ?>')"
  10. data-type='file'><p><?php echo $l->t('Text file');?></p></li>
  11. <li style="background-image:url('<?php echo OCP\mimetype_icon('dir') ?>')"
  12. data-type='folder'><p><?php echo $l->t('Folder');?></p></li>
  13. <li style="background-image:url('<?php echo OCP\image_path('core', 'actions/public.png') ?>')"
  14. data-type='web'><p><?php echo $l->t('From link');?></p></li>
  15. </ul>
  16. </div>
  17. <div id="upload" class="button"
  18. title="<?php echo $l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize'] ?>">
  19. <form data-upload-id='1'
  20. id="data-upload-form"
  21. class="file_upload_form"
  22. action="<?php echo OCP\Util::linkTo('files', 'ajax/upload.php'); ?>"
  23. method="post"
  24. enctype="multipart/form-data"
  25. target="file_upload_target_1">
  26. <input type="hidden" name="MAX_FILE_SIZE" id="max_upload"
  27. value="<?php echo $_['uploadMaxFilesize'] ?>">
  28. <!-- Send the requesttoken, this is needed for older IE versions
  29. because they don't send the CSRF token via HTTP header in this case -->
  30. <input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>" id="requesttoken">
  31. <input type="hidden" class="max_human_file_size"
  32. value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)">
  33. <input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir">
  34. <input type="file" id="file_upload_start" name='files[]'/>
  35. <a href="#" class="svg" onclick="return false;"></a>
  36. </form>
  37. </div>
  38. <div id="uploadprogresswrapper">
  39. <div id="uploadprogressbar"></div>
  40. <input type="button" class="stop" style="display:none"
  41. value="<?php echo $l->t('Cancel upload');?>"
  42. onclick="javascript:Files.cancelUploads();"
  43. />
  44. </div>
  45. </div>
  46. <div id="file_action_panel"></div>
  47. <?php else:?>
  48. <input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir">
  49. <?php endif;?>
  50. <input type="hidden" name="permissions" value="<?php echo $_['permissions']; ?>" id="permissions">
  51. </div>
  52. <?php if (isset($_['files']) and $_['isCreatable'] and count($_['files'])==0):?>
  53. <div id="emptyfolder"><?php echo $l->t('Nothing in here. Upload something!')?></div>
  54. <?php endif; ?>
  55. <table>
  56. <thead>
  57. <tr>
  58. <th id='headerName'>
  59. <input type="checkbox" id="select_all" />
  60. <span class='name'><?php echo $l->t( 'Name' ); ?></span>
  61. <span class='selectedActions'>
  62. <?php if($_['allowZipDownload']) : ?>
  63. <a href="" class="download">
  64. <img class="svg" alt="Download"
  65. src="<?php echo OCP\image_path("core", "actions/download.svg"); ?>" />
  66. <?php echo $l->t('Download')?>
  67. </a>
  68. <?php endif; ?>
  69. </span>
  70. </th>
  71. <th id="headerSize"><?php echo $l->t( 'Size' ); ?></th>
  72. <th id="headerDate">
  73. <span id="modified"><?php echo $l->t( 'Modified' ); ?></span>
  74. <?php if ($_['permissions'] & OCP\PERMISSION_DELETE): ?>
  75. <!-- NOTE: Temporary fix to allow unsharing of files in root of Shared folder -->
  76. <?php if ($_['dir'] == '/Shared'): ?>
  77. <span class="selectedActions"><a href="" class="delete">
  78. <?php echo $l->t('Unshare')?>
  79. <img class="svg" alt="<?php echo $l->t('Unshare')?>"
  80. src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" />
  81. </a></span>
  82. <?php else: ?>
  83. <span class="selectedActions"><a href="" class="delete">
  84. <?php echo $l->t('Delete')?>
  85. <img class="svg" alt="<?php echo $l->t('Delete')?>"
  86. src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" />
  87. </a></span>
  88. <?php endif; ?>
  89. <?php endif; ?>
  90. </th>
  91. </tr>
  92. </thead>
  93. <tbody id="fileList">
  94. <?php echo($_['fileList']); ?>
  95. </tbody>
  96. </table>
  97. <div id="editor"></div>
  98. <div id="uploadsize-message" title="<?php echo $l->t('Upload too large')?>">
  99. <p>
  100. <?php echo $l->t('The files you are trying to upload exceed the maximum size for file uploads on this server.');?>
  101. </p>
  102. </div>
  103. <div id="scanning-message">
  104. <h3>
  105. <?php echo $l->t('Files are being scanned, please wait.');?> <span id='scan-count'></span>
  106. </h3>
  107. <p>
  108. <?php echo $l->t('Current scanning');?> <span id='scan-current'></span>
  109. </p>
  110. </div>
  111. <!-- config hints for javascript -->
  112. <input type="hidden" name="allowZipDownload" id="allowZipDownload" value="<?php echo $_['allowZipDownload']; ?>" />
  113. <input type="hidden" name="usedSpacePercent" id="usedSpacePercent" value="<?php echo $_['usedSpacePercent']; ?>" />