{% import "shelf-library-modal-macros.html" as macros with context %}
<div class="modal-dialog modalBiblio--uploader">
    <div class="modal-content" style='border-radius: 0px'>
        <div class="modal-header">
            <button aria-hidden="true" data-dismiss="modal" class="close" type="button"><i class="fa fa-times fa-lg"></i></button>
            <h1 class="modalBiblio--title">{{ _gettext("File upload") }}</h1>
            <div class="modalBiblio--arborescence">
                <span>{{ _gettext("Root") }}</span><span>{{ path }}</span>
            </div>
        </div>

        <div class="image-cropper" data-url="{{ url_for('static', filename='media/'+path) }}" data-path="{{ path }}">
          <!-- This is where the preview image is displayed -->
          <div class="cropit-preview"></div>

          <!-- This range input controls zoom -->
          <!-- You can add additional elements here, e.g. the image icons -->
          <input type="range" class="cropit-image-zoom-input" />

          <!-- The cropit- classes above are needed
               so cropit can identify these elements -->
        </div>

        <div class="modal-footer">
            <ul style="float: left; display: inline-block" class="nav nav-pills nav-justified">
                <li class="retour">
                {% if prev_view_type == 'list' %}
                    {% if dir_path %}
                        <a class="xhr_link" href="{{ url_for('.modal_index', path=dir_path) }}"><i class="fa fa-long-arrow-left"></i> {{ _("Go back") }}</a>
                    {% else %}
                        <a class="xhr_link" href="{{ url_for('.modal_index') }}"><i class="fa fa-long-arrow-left"></i> {{ _("Go back") }}</a>
                    {% endif %}
                {% else %}
                    {% if dir_path %}
                        <a class="xhr_link" href="{{ url_for('.modal_iconic_index', path=dir_path) }}"><i class="fa fa-long-arrow-left"></i> {{ _("Go back") }}</a>
                    {% else %}
                        <a class="xhr_link" href="{{ url_for('.modal_iconic_index') }}"><i class="fa fa-long-arrow-left"></i> {{ _("Go back") }}</a>
                    {% endif %}
                {% endif %}
                </li>
                <li  class="actions validate disabled modal_file_validate_crop" data-path="{{ path }}" data-crop-save-url="{{ url_for('.modal_crop_save') }}">
                    <a href="javascript:void(0)"><span class="modal_validation_message">{{ _("Validate") }}</span> <i class="fa fa-check"></i></a>
                </li>
            </ul>
        </div>
    </div>
</div>