{% stylesheets 'bundles/visualmmediamanager/css/style.css' %}
    <link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}

{% set js %}
    {% javascripts 
        'bundles/visualmmediamanager/js/dropzone.js'
        'bundles/visualmmediamanager/js/folder_global.js' 
        'bundles/visualmmediamanager/js/folder_items.js' 
    %}
        <script type="text/javascript" src="{{ asset_url }}"></script>
    {% endjavascripts %}
{% endset %}
{{ append_javascript(js, 'filesystem_folder') }}
     
<div class="js-filesystem-upload-modal modal">
    <div class="modal-dialog">
        <div class="modal-content">
            
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">{{ 'upload_modal.title'|trans({}, 'VisualMMediaManagerBundle')}}</h4>
            </div>

            <div class="modal-body">
                <form 
                    class="js-upload-form dropzone" 
                    id="filesystem_dropzone" 
                    action="{{ path('visual_m_media_manager_ajax_upload', { 'config' : config, 'path' : current_path}|merge(extra_args)) }}" 
                    method="POST" 
                    enctype="multipart/form-data"
                    data-dropzone-default-message="{{ 'upload_modal.dropzone_default_message'|trans({}, 'VisualMMediaManagerBundle')}}"
                    data-dropzone-fallback-message="{{ 'upload_modal.dropzone_fallback_message'|trans({}, 'VisualMMediaManagerBundle')}}"
                    data-dropzone-invalid-file-message="{{ 'upload_modal.dropzone_invalid_file_message'|trans({}, 'VisualMMediaManagerBundle')}}"
                    data-dropzone-file-to-big-message="{{ 'upload_modal.dropzone_file_to_big_message'|trans({}, 'VisualMMediaManagerBundle')}}"
                    data-dropzone-response-error-message="{{ 'upload_modal.dropzone_response_error_message'|trans({}, 'VisualMMediaManagerBundle')}}"                    
                    data-dropzone-cancel-upload-message="{{ 'upload_modal.dropzone_cancel_upload_message'|trans({}, 'VisualMMediaManagerBundle')}}"
                >
                    <div class="fallback">
                        <input type="file" name="file" /> <br />
                        <button type="submit" class="btn btn-primary">{{ 'upload_modal.submit'|trans({}, 'VisualMMediaManagerBundle')}}</button>
                    </div>
                </form>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="glyphicon glyphicon-remove"></i></button>    
            </div>
        </div>
    </div>
</div>             
        
<div class="js-filesystem-add-folder-modal modal" data-action-url="{{ path('visual_m_media_manager_ajax_add_folder', { 'config' : config, 'path' : current_path}|merge(extra_args)) }}">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">{{ 'add_folder_modal.title'|trans({}, 'VisualMMediaManagerBundle')}}</h4>
            </div>

            <div class="modal-body">
                <p>
                    {{ 'add_folder_modal.title'|trans({}, 'VisualMMediaManagerBundle')}}
                </p>
                <input class="form-control" type="text" />
                <div class="js-add-folder-error alert alert-danger hide"></div>
                
            </div>

            <div class="modal-footer">
                <button type="button" class="js-action-add-folder-ok btn btn-default btn-primary"><i class="glyphicon glyphicon-ok"></i></button>    
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="glyphicon glyphicon-remove"></i></button>    
            </div>
        </div>
    </div>
</div>        
        
<div class="js-filesystem-rename-modal modal" data-action-url="{{ path('visual_m_media_manager_ajax_rename', { 'config' : config}|merge(extra_args)) }}">    
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">{{ 'rename_modal.title'|trans({}, 'VisualMMediaManagerBundle')}} "<span class="js-filesystem-item-name"></span>"</h4>
            </div>

            <div class="modal-body">
                <p>
                    {{ ('rename_modal.content_html'|trans({}, 'VisualMMediaManagerBundle'))|raw }}
                </p>
                <input class="form-control" type="text" />
                <div class="js-rename-error alert alert-danger hide"></div>
                
            </div>

            <div class="modal-footer">
                <button type="button" class="js-action-rename-ok btn btn-default btn-primary"><i class="glyphicon glyphicon-ok"></i></button>    
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="glyphicon glyphicon-remove"></i></button>    
            </div>
        </div>
    </div>
</div>
        
<div class="js-filesystem-delete-modal modal" data-action-url="{{ path('visual_m_media_manager_ajax_delete', { 'config' : config}|merge(extra_args)) }}">       
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">{{ 'delete_modal.title'|trans({}, 'VisualMMediaManagerBundle')}} "<span class="js-filesystem-item-name"></span>"</h4>
            </div>

            <div class="modal-body">
                <p>
                    {{ ('delete_modal.content_html'|trans({}, 'VisualMMediaManagerBundle'))|raw }}
                </p>
                <div class="js-delete-error alert alert-danger hide"></div>
            </div>

            <div class="modal-footer">
                <button type="button" class="js-action-delete-ok btn btn-default btn-danger"><i class="glyphicon glyphicon-trash"></i></button>    
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="glyphicon glyphicon-remove"></i></button>    
            </div>
        </div>
    </div>
</div>
        
<div class="js-filesystem-delete-selection-modal modal" data-action-url="{{ path('visual_m_media_manager_ajax_delete', { 'config' : config}|merge(extra_args)) }}">       
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">{{ 'delete_selection_modal.title'|trans({}, 'VisualMMediaManagerBundle')}}</h4>
            </div>
            <div class="modal-body">
                <p>
                    {{ ('delete_selection_modal.content_html'|trans({}, 'VisualMMediaManagerBundle'))|raw }}
                </p>
                
                <p class="js-delete-selection-busy alert alert-info hide">
                    {{ ('delete_selection_modal.busy_html'|trans({}, 'VisualMMediaManagerBundle'))|raw }}
                </p>
                
                <div class="js-delete-selection-error alert alert-danger hide"></div>
            </div>
            <div class="modal-footer">
                <button type="button" class="js-action-delete-selection-ok btn btn-default btn-danger"><i class="glyphicon glyphicon-trash"></i></button>    
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="glyphicon glyphicon-remove"></i></button>    
            </div>
        </div>
    </div>
</div>        
        
<div class="js-filesystem-action-popover hide">
    <button type="button" data-filesystem-action="select" class="btn btn-default" title="{{ 'action.select'|trans({}, 'VisualMMediaManagerBundle') }}"><i class="glyphicon glyphicon-check"></i></button>
    <button type="button" data-filesystem-action="rename" class="btn btn-primary" title="{{ 'action.rename'|trans({}, 'VisualMMediaManagerBundle') }}"><i class="glyphicon glyphicon-font"></i></button>
    &nbsp;
    <button type="button" data-filesystem-action="delete" class="btn btn-danger" title="{{ 'action.delete'|trans({}, 'VisualMMediaManagerBundle') }}"><i class="glyphicon glyphicon-trash"></i></button>    
</div>