@extends('backend.layouts.app')

@section('title', app_name() . ' | ' .'Shaoes management')

@section('content')
    <div class="card">
        <div class="card-body">
            <div class="row">
                <div class="col">

                </div>

                <div class="col">
                    <div class="btn-toolbar float-right" role="toolbar"
                         aria-label="@lang('labels.general.toolbar_btn_groups')">
                        <a href="{{ route('admin.shapes.create') }}"
                           class="btn btn-success ml-1" data-toggle="tooltip"
                           title="@lang('labels.general.create_new')"><i class="fas fa-plus-circle"></i></a>

                    </div>
                </div><!--col-->
            </div><!--row-->

            <div class="row mt-4">
                <div class="col">
                    <div class="table-responsive">
                        <table class="table">
                            <thead>
                            <tr>
                                <th>Thumbnail</th>
                                <th>Name</th>
                                <th>Description</th>

                                <th>Owner</th>
                                <th></th>

                            </tr>
                            </thead>
                            <tbody>
                            @foreach($shapes as $shape)
                                <tr>
                                    <td>
                                        <img
                                            src="{{$shape->path()}}"
                                            alt="{{$shape->name}}"
                                            style="width: 40px; height: auto">
                                    </td>
                                    <td class="text-wrap">{{$shape->name}}</td>
                                    <td class="text-wrap">{{$shape->description}}</td>
                                    <td class="text-wrap">{{$shape->citations}}</td>

                                    <td>{{$shape->owner->first_name}} {{$shape->owner->last_name}}</td>

                                    <td>
                                        <div class="btn-group" role="group"
                                             aria-label="@lang('labels.backend.access.users.user_actions')">
                                            <a href="{{ route('admin.shapes.show', $shape) }}" data-toggle="tooltip"
                                               data-placement="top" title="@lang('buttons.general.crud.view')"
                                               class="btn btn-info">
                                                <i class="fas fa-eye"></i>
                                            </a>

                                            <a href="{{ route('admin.shapes.edit', $shape) }}" data-toggle="tooltip"
                                               data-placement="top" title="@lang('buttons.general.crud.edit')"
                                               class="btn btn-primary">
                                                <i class="fas fa-edit"></i>
                                            </a>
                                            <a href="#" data-toggle="tooltip" data-placement="top"
                                               title="@lang('buttons.general.crud.delete')" class="btn btn-danger">
                                                <i class="fas fa-times"></i>
                                            </a>
                                        </div>
                                    </td>

                                </tr>
                            @endforeach
                            </tbody>
                        </table>
                    </div>
                </div><!--col-->
            </div><!--row-->
            <div class="row">
                <div class="col-7">

                </div><!--col-->

                <div class="col-5">

                </div><!--col-->
            </div><!--row-->
        </div><!--card-body-->
    </div><!--card-->
@endsection
@section('dialogs')



@endsection
@push('after-scripts')
    <script>
        $(document).ready(function () {

        })
    </script>
@endpush

@push('after-styles')
    <style>
        /*.select2 {*/
        /*    width: 100% !important;*/
        /*}*/
    </style>
@endpush
