index.php 5.3 KB

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