Licitator 1.0
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.

138 lines
6.6 KiB

5 years ago
  1. {% extends sonata_block.templates.block_base %}
  2. {% block block %}
  3. {% block documents %}
  4. <script data-main="/en/admin/elfinder.main.js" src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js"></script>
  5. <script type="application/javascript">
  6. define('elFinderConfig', {
  7. defaultOpts : {
  8. url : "{{path('ef_connect', { 'instance': instance, 'homeFolder': homeFolder } )}}",
  9. lang : "{{ locale }}",
  10. //onlyMimes: ['application/pdf'],
  11. resizable: false,
  12. uiOptions : {
  13. // toolbar configuration
  14. toolbar : [
  15. ['home', 'up'],
  16. ['upload'],
  17. ['rm'],
  18. ['search']
  19. ],
  20. // directories tree options
  21. tree : {
  22. // expand current root on init
  23. openRootOnLoad : true,
  24. // auto load current dir parents
  25. syncTree : true
  26. },
  27. // navbar options
  28. navbar : {
  29. minWidth : 0,
  30. maxWidth : 0
  31. },
  32. // current working directory options
  33. cwd : {
  34. // display parent directory in listing as ".."
  35. oldSchool : false
  36. }
  37. },
  38. commandsOptions : {
  39. edit : {
  40. extraOptions : {
  41. // set API key to enable Creative Cloud image editor
  42. // see https://console.adobe.io/
  43. creativeCloudApiKey : '',
  44. // browsing manager URL for CKEditor, TinyMCE
  45. // uses self location with the empty value
  46. managerUrl : ''
  47. }
  48. },
  49. quicklook : {
  50. // to enable CAD-Files and 3D-Models preview with sharecad.org
  51. sharecadMimes : ['image/vnd.dwg', 'image/vnd.dxf', 'model/vnd.dwf', 'application/vnd.hp-hpgl', 'application/plt', 'application/step', 'model/iges', 'application/vnd.ms-pki.stl', 'application/sat', 'image/cgm', 'application/x-msmetafile'],
  52. // to enable preview with Google Docs Viewer
  53. googleDocsMimes : [ 'application/pdf','image/tiff', 'application/vnd.ms-office', 'application/msword', 'application/vnd.ms-word', 'application/vnd.ms-excel', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/postscript', 'application/rtf'],
  54. // to enable preview with Microsoft Office Online Viewer
  55. // these MIME types override "googleDocsMimes"
  56. officeOnlineMimes : ['application/vnd.ms-office', 'application/msword', 'application/vnd.ms-word', 'application/vnd.ms-excel', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.oasis.opendocument.text', 'application/vnd.oasis.opendocument.spreadsheet', 'application/vnd.oasis.opendocument.presentation']
  57. }
  58. },
  59. // bootCalback calls at before elFinder boot up
  60. bootCallback : function(fm, extraObj) {
  61. /* any bind functions etc. */
  62. fm.bind('init', function() {
  63. // any your code
  64. });
  65. // for example set document.title dynamically.
  66. /*var title = document.title;
  67. fm.bind('open', function() {
  68. var path = '',
  69. cwd = fm.cwd();
  70. if (cwd) {
  71. path = fm.path(cwd.hash) || null;
  72. }
  73. document.title = path? path + ':' + title : title;
  74. }).bind('destroy', function() {
  75. document.title = title;
  76. });*/
  77. }
  78. },
  79. managers : {
  80. // 'DOM Element ID': { /* elFinder options of this DOM Element */ }
  81. 'elfinder': {}
  82. }
  83. });
  84. setTimeout(function(){
  85. $(".elfinder-cwd-icon-html").each(function( index ) {
  86. $( this ).parent().parent().remove();
  87. });
  88. }, 3000);
  89. </script>
  90. <style>
  91. .elfinder-cwd-icon-pdf.elfinder-cwd-icon.elfinder-cwd-bgurl {
  92. background-size: cover;
  93. background-color: #fff;
  94. background-image: none!important;
  95. }
  96. .elfinder-cwd-icon-pdf.elfinder-cwd-icon.elfinder-cwd-bgurl:before {
  97. /* left: -10px; */
  98. z-index: 99;
  99. }
  100. .elfinder-cwd-bgurl:after {
  101. position: relative;
  102. display: inline-block;
  103. top: 0px;
  104. left: 0px;
  105. width: 48px;
  106. height: 48px;
  107. background-image: url(/bundles/fmelfinder/img/icons-big.svg) !important;
  108. background-image: url(/bundles/fmelfinder/img/icons-big.png) \9 !important;
  109. /* background-repeat: no-repeat; */
  110. /* background-size: auto!important; */
  111. opacity: .8;
  112. filter: Alpha(Opacity=60);
  113. /*-webkit-transform-origin: 54px -24px; */
  114. /* -webkit-transform: scale(.6); */
  115. -moz-transform-origin: 54px -24px;
  116. -moz-transform: scale(1);
  117. -ms-transform-origin: 54px -24px;
  118. -ms-transform: scale(1);
  119. -o-transform-origin: 54px -24px;
  120. -o-transform: scale(.6);
  121. /* transform-origin: 54px -24px; */
  122. transform: scale(1);
  123. }
  124. </style>
  125. <div class="box box-primary" >
  126. <div class="box-header with-border">
  127. <h3 class="box-title">{{ 'elfinder_cocuments' | trans({}, 'dashboard') }}</h3>
  128. </div><!-- /.box-header -->
  129. <div class="box-body ">
  130. <div id="elfinder"></div>
  131. </div>
  132. </div>
  133. {% endblock %}
  134. {% endblock %}