@extends('backEnd.master') @section('title') @lang('downloadCenter.content_list') @endsection @push('css') @endpush @section('mainContent')

@lang('common.search')

{{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => 'download-center.content-list-search', 'method' => 'GET', 'enctype' => 'multipart/form-data']) }}
@if ($errors->has('name')) {{ $errors->first('name') }} @endif
{{ Form::close() }}
@if (isset($editContent)) {{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => 'download-center.content-list-update', 'method' => 'POST', 'enctype' => 'multipart/form-data']) }} @else {{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => 'download-center.content-list-save', 'method' => 'POST', 'enctype' => 'multipart/form-data']) }} @endif

@if (isset($editContent)) @lang('downloadCenter.edit_content') @else @lang('downloadCenter.add_content') @endif

@if (isset($editContent))
@if ($errors->has('file_name')) {{ $errors->first('file_name') }} @endif
@endif
@if ($errors->has('content_type_id')) {{ $errors->first('content_type_id') }} @endif
@if ($editContent == null)
@if ($errors->has('youtube_link')) {{ $errors->first('youtube_link') }} @endif
@lang('downloadCenter.or')
(jpg,png,jpeg,pdf,doc,docx,txt,xlsx,rar,zip are allowed for upload)
@if ($errors->has('content_file')) {{ $errors->first('content_file') }} @endif
@endif
{{ Form::close() }}

@lang('downloadCenter.content_list')

@lang('downloadCenter.share') @lang('downloadCenter.generate_url')
@foreach (@$contents as $key => $content) @php $fileSize = ''; $dataUnit = ''; if ($content->file_size < 1000000) { $fileSize = $content->file_size / 1000; $dataUnit = 'KB'; } else { $fileSize = $content->file_size / 1000000; $dataUnit = 'MB'; } @endphp @endforeach
@lang('downloadCenter.sl') @lang('downloadCenter.document') @lang('downloadCenter.content_type') @lang('downloadCenter.size') @lang('downloadCenter.uploaded_by') @lang('downloadCenter.created_on') @lang('downloadCenter.action')
{{ $key + 1 }} {{ $content->file_name }} {{ $content->contentType->name }} {{ number_format($fileSize, 2, '.', ',') }} {{ $dataUnit }} {{ $content->user->full_name }} {{ $content->created_at }} @lang('common.edit') @lang('common.delete')
@endsection @include('backEnd.partials.data_table_js') @include('backEnd.partials.multi_select_js') @include('backEnd.partials.date_picker_css_js') @push('script') @endpush