Skip to content

Instantly share code, notes, and snippets.

@Lodo4ka
Created August 16, 2018 07:25
Show Gist options
  • Save Lodo4ka/2719814352d3c1e7a8eca9a16df875ef to your computer and use it in GitHub Desktop.
Save Lodo4ka/2719814352d3c1e7a8eca9a16df875ef to your computer and use it in GitHub Desktop.
<!-- Модальное окно добавления рамки -->
<div class="modal fade" id="modalAddFrame"
role="dialog" aria-labelledby="historyLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span>&times;</span></button>
<h4 class="modal-title" id="historyLabel"><i class="fa fa-list"></i> Добавить рамку</h4>
</div>
<div class="panel-body">
<form id="" class="form-horizontal">
<div class="table-responsive">
<table id="tableModalFrames" class="table table-bordered table-striped">
<thead>
<tr>
<th class="text-center">Материал</th>
<th class="text-center">Ширина рамки, мм</th>
<th class="text-center">Гнутая/Резаная</th>
<th class="text-center">Цвет</th>
<th class="text-center col-lg-1">Цена</th>
<th class="text-center col-lg-1">Давальческое</th>
<th class="text-center col-lg-1">...</th>
</tr>
</thead>
<tbody>
@foreach($frames as $frame)
<tr>
<td>{{$frame->material}}</td>
<td>{{$frame->width}}</td>
<td>{{$frame->type}}</td>
<td>{{$frame->color}}</td>
<td>{{$frame->price}}</td>
<td>
<select style="width: 100%" class="form-control" name="take">
<option value="N">Нет</option>
<option value="Y">Да</option>
</select>
</td>
<td><a data-hash="{{$calculation['info']->hash}}" data-frame_id="{{$frame->frame_id}}" class="btnAddFrame btn btn-success btn-block"><i class="fa fa-plus"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</form>
</div>
</div>
</div>
</div>
@push('scripts')
<script>
$(document).ready(function() {
if($.fn.dataTable.isDataTable.("#tableModalFrames")) {
$('#tableModalFrames').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": true,
"iDisplayLength": 10,
"lengthMenu": [10, 25, 50, 75, 100],
"language": {
"search": "Фильтр:",
"info": "Показать страницу _PAGE_ из _PAGES_",
"infoEmpty": "No records available",
"lengthMenu": "Показать _MENU_ записей на странице",
"zeroRecords": "Ничего не нашел, извини",
"infoFiltered": "(filtered from _MAX_ total records)",
"paginate": {
previous: "Предыдущая",
next: "Следущая"
},
"processing": "Загружается...",
},
"showNEntries": true,
});
}
})
</script>
@endpush
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment