@extends('adminlte::page')

@section('content_header')
<h1>Lista delle Cartelle</h1>
@endsection

@section('content')
<div class="row p-2">
    <button id="open_modal_folder" ><i class="fas fa-fw fa-folder"></i> + Nuova Cartella</button>
</div>

<div class="row">
	<div class="col-lg-12">
    	<div class="panel panel-default">
            <div class="panel-heading">
                Lista cartelle
            </div>
            <div class="panel-body">               
                <table class="table table-striped table-bordered table-hover" id="tab_documenti">
					<thead>
						<tr>
							<th>Nome Cartella</th>
                            <th>Path</th>
						</tr>
					</thead>
                    <tbody> 
                        @foreach($data as $dato)
                        <tr>
                            <td><a href="/admin/movimenti/docs?entity={{$dato->id}}">{{$dato->descrizione}}</a></td>
                            <td>{{$dato->path}}</td>
                        </tr>
                        @endforeach
                    </tbody>
                </table>
            </div>
            <div class="panel-footer">
               
            </div>
        </div>
    </div>
</div>

<!-- MODAL NEW -->
<div class="modal fade " id="myModal" tabindex="-1" role="dialog"
	aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog draggable" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h4 class="modal-title">Nuova cartella</h4>

			</div>
			<div class="modal-body">
				<div class="row">
					<div class="col-md-12">
						<form action="" method="POST" id="form">
                            @csrf
                            <div class="row">
                                <div class="col-xs-6">
                                    <label for="data" class="form-label">Nome Cartella</label> <input
                                        type="text" class="form-control" id="descrizione" name="descrizione">
                                </div>
                                <div class="col-xs-12">
                                    <label for="descrizione" class="form-label">Path</label>
                                    <input type="text" class="form-control" id="path" size="50" name="path">
                                </div>
                            </div>
                            <div class="modal-footer">
                               
                                <button type="submit" class="btn btn-primary">Submit</button>
				        </form>
			        </div>
		        </div>
	        </div>
        </div>
    </div>
</div>

@endsection
@section('js')
    <script src="/js/app/documenti.js"></script>
@endsection