@extends('layouts.app')

@section('content')
    <h3 class="page-title">@lang('quickadmin.course-of-construction.title')</h3>

    <div class="panel panel-default">
        <div class="panel-heading">
            @lang('quickadmin.qa_view')
        </div>

        <div class="panel-body table-responsive">
            <div class="row">
                <div class="col-md-6">
                    <table class="table table-bordered table-striped">
                        <tr>
                            <th>@lang('quickadmin.course-of-construction.fields.images')</th>
                            <td field-key='images'> @foreach($course_of_construction->getMedia('images') as $media)
                                <p class="form-group">
                                    <a href="{{ $media->getUrl() }}" target="_blank">{{ $media->name }} ({{ $media->size }} bytes)</a>
                                </p>
                            @endforeach</td>
                        </tr>
                        <tr>
                            <th>@lang('quickadmin.course-of-construction.fields.youtube-link')</th>
                            <td field-key='youtube_link'>{{ $course_of_construction->youtube_link }}</td>
                        </tr>
                        <tr>
                            <th>@lang('quickadmin.course-of-construction.fields.report-date')</th>
                            <td field-key='report_date'>{{ $course_of_construction->report_date }}</td>
                        </tr>
                        {{--<tr>--}}
                            {{--<th>@lang('quickadmin.course-of-construction.fields.description')</th>--}}
                            {{--<td field-key='description'>{{ $course_of_construction->description }}</td>--}}
                        {{--</tr>--}}
                        <tr>
                            <th>@lang('quickadmin.course-of-construction.fields.residental-complex')</th>
                            <td field-key='residental_complex'>{{ $course_of_construction->residental_complex->name ?? '' }}</td>
                        </tr>
                    </table>
                </div>
            </div>

            <p>&nbsp;</p>

            <a href="{{ route('admin.course_of_constructions.index') }}" class="btn btn-default">@lang('quickadmin.qa_back_to_list')</a>
        </div>
    </div>
@stop

@section('javascript')
    @parent

    <script src="{{ url('adminlte/plugins/datetimepicker/moment-with-locales.min.js') }}"></script>
    <script src="{{ url('adminlte/plugins/datetimepicker/bootstrap-datetimepicker.min.js') }}"></script>
    <script>
        $(function(){
            moment.updateLocale('{{ App::getLocale() }}', {
                week: { dow: 1 } // Monday is the first day of the week
            });
            
            $('.date').datetimepicker({
                format: "{{ config('app.date_format_moment') }}",
                locale: "{{ App::getLocale() }}",
            });
            
        });
    </script>
            
@stop
