<div id="media" class="modal fade" tabindex="-1" style="display: none;" aria-hidden="true">
	<div class="modal-dialog modal-full media-modal">
		<div class="modal-content media-modal-content">
			<div class="media-frame">
				<div class="modal-header">
					<h6 class="modal-title">{fileManager:title}</h6>
					<button type="button" class="btn-close close" data-bs-dismiss="modal"></button>
				</div>

				<div class="media-frame-content">

					<div class="attachments-browser">
						<div class="breadcrumb breadcrumb-line header-elements-inline border-bottom">
							<div class="d-flex">
								<div class="breadcrumb breadcrumb_path"></div>
							</div>
							<div class="d-lg-block ms-lg-auto">
								<div class="breadcrumb justify-content-center py-2">
									<div class="media-actions d-none">
										<div class="list-icons">
											<span class="count_check list-icons-item me-2"></span>
											<a href="javascript:void('')" class="list-icons-item select-all" data-popup="tooltip" data-placement="top" data-trigger="hover" data-action="select_all"  data-original-title="Выбрать все"><i class="ph-plus-circle"></i></a>
											<a href="javascript:void('')" class="list-icons-item deselect-all mx-1" data-popup="tooltip" data-placement="top" data-trigger="hover" data-action="deselect_all" data-original-title="Отменить"><i class="ph-minus-circle"></i></a>
											<a href="javascript:void('')" class="list-icons-item text-danger remove-files" data-popup="tooltip" data-placement="top" data-trigger="hover" data-action="delete" data-confirm="Вы действительно хотите удалить выбранные файлы? Не забывайте что картинка может прикреплена к контенту!!!" data-original-title="Удалить выбранные"><i class="ph-x-circle"></i></a>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="media-toolbar border-bottom">
							<div class="media-toolbar-secondary">
								<ul class="nav nav-tabs nav-tabs-overline border-top-0 mb-0">

									<li class="nav-item"><a href="#listFiles" class="nav-link active show" data-bs-toggle="tab"><i class="ph-folder-notch"></i></a></li>
									<li class="nav-item"><a href="#uploadFile" class="nav-link" data-bs-toggle="tab"><i class="ph-cloud-arrow-up"></i></a></li>
									<li class="nav-item"><a href="javascript:void('')" class="nav-link new_folder" data-bs-path="{if isset($path)}{$path|escape}{else}/{/if}" data-action="new_folder" data-confirm="{fileManager:addFolder}"><i class="ph-folder-notch-plus"></i></a></li>
									<li class="nav-item px-3">
										<div class="input-group">
											<select id="attachment_filters_mime" name="type" class="form-control select" data-width="220">
												<option value="0" selected>Все медиафайлы</option>
												<option value="mine">Мои файлы</option>
											</select>
											<select id="attachment_filters" name="filters" class="form-control select" data-width="200">
												<option value="0" selected>Все</option>
												<option value="date">По добавлению</option>
												<option value="size">По размеру</option>
												<option value="name">По имени файла</option>
											</select>
										</div>
									</li>
								</ul>
							</div>
							<div class="media-toolbar-primary">

								<div class="media-search">
									<div class="input-group">
										<input id="search_file" type="text" class="form-control" placeholder="Поиск по названию файла" style="min-width: 230px">
									</div>
								</div>
							</div>
						</div>

						<div class="attachments">
							<div class="tab-content border-top-0 rounded-top-0 mb-0">
								<div class="tab-pane fade show active" id="listFiles">
									<div id="file_list" class="row"></div>
									<div id="modal_show_more_trigger" data-page="1" data-path="{if isset($path)}{$path|escape}{else}/{/if}"></div>
								</div>
								<div class="tab-pane fade" id="uploadFile">
									<div class="fileupload-process my-1">
                                        <div id="total-progress" class="progress" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" style="height: 0.625rem;">
                                            <div class="progress-bar progress-bar-striped progress-bar-animated  bg-success" style="width:0%;" data-dz-uploadprogress=""></div>
                                        </div>
                                    </div>
									<div id="upload_files" class="dropzone">
										<div class="dz-default dz-message"><span>Максимальный размер загружаемого файла: {$upload_max_filesize}.</span></div>
										<input type="hidden" name="send_path" value="{if isset($path)}{$path|escape}{else}/{/if}" id="send_path">
									</div>
								</div>
							</div>
						</div>
						<div class="media-sidebar bg-light border-start">
							<div class="media-uploader-status">
								<div class="attachment-details pt-2 d-none"></div>
							</div>
						</div>
					</div>
				</div>

				<div class="media-frame-toolbar">
					<div class="media-toolbar border-top">
						<div class="media-toolbar-secondary"> </div>
						<div class="media-toolbar-primary">
							<button type="button" class="btn btn-sm btn-link" data-bs-dismiss="modal">{general:cancel}</button>
							<button type="button" class="btn btn-sm btn-primary add-content" data-type="" data-action="" data-model="">{general:choose}</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
{literal}
<style>
    .dropzone .dz-preview.dz-success .dz-progress {
	    display: none !important;
        opacity: 0 !important;
        height: 0px;
    }
</style>
{/literal}


{* script *}
{include file="components/script/uploads-script.tpl"}
{* /script *}