index.php 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 class="popup popupTop">
  9. <li style="background-image:url('<?php echo OCP\mimetype_icon('text/plain') ?>')" data-type='file'><p><?php echo $l->t('Text file');?></p></li>
  10. <li style="background-image:url('<?php echo OCP\mimetype_icon('dir') ?>')" data-type='folder'><p><?php echo $l->t('Folder');?></p></li>
  11. <li style="background-image:url('<?php echo OCP\image_path('core','actions/public.png') ?>')" data-type='web'><p><?php echo $l->t('From url');?></p></li>
  12. </ul>
  13. </div>
  14. <div class="file_upload_wrapper svg">
  15. <form data-upload-id='1' id="data-upload-form" class="file_upload_form" action="<?php echo OCP\Util::linkTo('files', 'ajax/upload.php'); ?>" method="post" enctype="multipart/form-data" target="file_upload_target_1">
  16. <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload">
  17. <input type="hidden" class="max_human_file_size" value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)">
  18. <input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir">
  19. <input class="file_upload_start" type="file" name='files[]'/>
  20. <a href="#" class="file_upload_button_wrapper" onclick="return false;" title="<?php echo $l->t('Upload'); echo ' max. '.$_['uploadMaxHumanFilesize'] ?>"></a>
  21. <button class="file_upload_filename"></button>
  22. <iframe name="file_upload_target_1" class='file_upload_target' src=""></iframe>
  23. </form>
  24. </div>
  25. <div id="upload">
  26. <div id="uploadprogressbar"></div>
  27. <input type="button" class="stop" style="display:none" value="<?php echo $l->t('Cancel upload');?>" onclick="javascript:Files.cancelUploads();" />
  28. </div>
  29. </div>
  30. <div id="file_action_panel"></div>
  31. <?php else:?>
  32. <input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir">
  33. <?php endif;?>
  34. <input type="hidden" name="permissions" value="<?php echo $_['permissions']; ?>" id="permissions">
  35. </div>
  36. <div id='notification'></div>
  37. <?php if (isset($_['files']) and $_['isCreatable'] and count($_['files'])==0):?>
  38. <div id="emptyfolder"><?php echo $l->t('Nothing in here. Upload something!')?></div>
  39. <?php endif; ?>
  40. <table>
  41. <thead>
  42. <tr>
  43. <th id='headerName'>
  44. <input type="checkbox" id="select_all" />
  45. <span class='name'><?php echo $l->t( 'Name' ); ?></span>
  46. <span class='selectedActions'>
  47. <!-- <a href="" class="share"><img class='svg' alt="Share" src="<?php echo OCP\image_path("core", "actions/share.svg"); ?>" /> <?php echo $l->t('Share')?></a> -->
  48. <?php if($_['allowZipDownload']) : ?>
  49. <a href="" class="download"><img class='svg' alt="Download" src="<?php echo OCP\image_path("core", "actions/download.svg"); ?>" /> <?php echo $l->t('Download')?></a>
  50. <?php endif; ?>
  51. </span>
  52. </th>
  53. <th id="headerSize"><?php echo $l->t( 'Size' ); ?></th>
  54. <th id="headerDate">
  55. <span id="modified"><?php echo $l->t( 'Modified' ); ?></span>
  56. <?php if ($_['permissions'] & OCP\Share::PERMISSION_DELETE): ?>
  57. <!-- NOTE: Temporary fix to allow unsharing of files in root of Shared folder -->
  58. <?php if ($_['dir'] == '/Shared'): ?>
  59. <span class="selectedActions"><a href="" class="delete"><?php echo $l->t('Unshare')?> <img class="svg" alt="<?php echo $l->t('Unshare')?>" src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" /></a></span>
  60. <?php else: ?>
  61. <span class="selectedActions"><a href="" class="delete"><?php echo $l->t('Delete')?> <img class="svg" alt="<?php echo $l->t('Delete')?>" src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" /></a></span>
  62. <?php endif; ?>
  63. <?php endif; ?>
  64. </th>
  65. </tr>
  66. </thead>
  67. <tbody id="fileList">
  68. <?php echo($_['fileList']); ?>
  69. </tbody>
  70. </table>
  71. <div id="editor"></div>
  72. <div id="uploadsize-message" title="<?php echo $l->t('Upload too large')?>">
  73. <p>
  74. <?php echo $l->t('The files you are trying to upload exceed the maximum size for file uploads on this server.');?>
  75. </p>
  76. </div>
  77. <div id="scanning-message">
  78. <h3>
  79. <?php echo $l->t('Files are being scanned, please wait.');?> <span id='scan-count'></span>
  80. </h3>
  81. <p>
  82. <?php echo $l->t('Current scanning');?> <span id='scan-current'></span>
  83. </p>
  84. </div>
  85. <!-- config hints for javascript -->
  86. <input type="hidden" name="allowZipDownload" id="allowZipDownload" value="<?php echo $_['allowZipDownload']; ?>" />