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

{% extends sonata_block.templates.block_base %}
{% block block %}
{% block documents %}
<script data-main="/en/admin/elfinder.main.js" src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js"></script>
<script type="application/javascript">
define('elFinderConfig', {
defaultOpts : {
url : "{{path('ef_connect', { 'instance': instance, 'homeFolder': homeFolder } )}}",
lang : "{{ locale }}",
//onlyMimes: ['application/pdf'],
resizable: false,
uiOptions : {
// toolbar configuration
toolbar : [
['home', 'up'],
['upload'],
['rm'],
['search']
],
// directories tree options
tree : {
// expand current root on init
openRootOnLoad : true,
// auto load current dir parents
syncTree : true
},
// navbar options
navbar : {
minWidth : 0,
maxWidth : 0
},
// current working directory options
cwd : {
// display parent directory in listing as ".."
oldSchool : false
}
},
commandsOptions : {
edit : {
extraOptions : {
// set API key to enable Creative Cloud image editor
// see https://console.adobe.io/
creativeCloudApiKey : '',
// browsing manager URL for CKEditor, TinyMCE
// uses self location with the empty value
managerUrl : ''
}
},
quicklook : {
// to enable CAD-Files and 3D-Models preview with sharecad.org
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'],
// to enable preview with Google Docs Viewer
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'],
// to enable preview with Microsoft Office Online Viewer
// these MIME types override "googleDocsMimes"
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']
}
},
// bootCalback calls at before elFinder boot up
bootCallback : function(fm, extraObj) {
/* any bind functions etc. */
fm.bind('init', function() {
// any your code
});
// for example set document.title dynamically.
/*var title = document.title;
fm.bind('open', function() {
var path = '',
cwd = fm.cwd();
if (cwd) {
path = fm.path(cwd.hash) || null;
}
document.title = path? path + ':' + title : title;
}).bind('destroy', function() {
document.title = title;
});*/
}
},
managers : {
// 'DOM Element ID': { /* elFinder options of this DOM Element */ }
'elfinder': {}
}
});
setTimeout(function(){
$(".elfinder-cwd-icon-html").each(function( index ) {
$( this ).parent().parent().remove();
});
}, 3000);
</script>
<style>
.elfinder-cwd-icon-pdf.elfinder-cwd-icon.elfinder-cwd-bgurl {
background-size: cover;
background-color: #fff;
background-image: none!important;
}
.elfinder-cwd-icon-pdf.elfinder-cwd-icon.elfinder-cwd-bgurl:before {
/* left: -10px; */
z-index: 99;
}
.elfinder-cwd-bgurl:after {
position: relative;
display: inline-block;
top: 0px;
left: 0px;
width: 48px;
height: 48px;
background-image: url(/bundles/fmelfinder/img/icons-big.svg) !important;
background-image: url(/bundles/fmelfinder/img/icons-big.png) \9 !important;
/* background-repeat: no-repeat; */
/* background-size: auto!important; */
opacity: .8;
filter: Alpha(Opacity=60);
/*-webkit-transform-origin: 54px -24px; */
/* -webkit-transform: scale(.6); */
-moz-transform-origin: 54px -24px;
-moz-transform: scale(1);
-ms-transform-origin: 54px -24px;
-ms-transform: scale(1);
-o-transform-origin: 54px -24px;
-o-transform: scale(.6);
/* transform-origin: 54px -24px; */
transform: scale(1);
}
</style>
<div class="box box-primary" >
<div class="box-header with-border">
<h3 class="box-title">{{ 'elfinder_cocuments' | trans({}, 'dashboard') }}</h3>
</div><!-- /.box-header -->
<div class="box-body ">
<div id="elfinder"></div>
</div>
</div>
{% endblock %}
{% endblock %}