@php $newsurl = ''; $MODULE_NAME = Config::get('Constant.MODULE.NAME'); @endphp @if(isset($data['news']) && !empty($data['news']) && count($data['news']) > 0) @php $cols = 'col-md-4 col-sm-4 col-xs-12'; $grid = '3'; if($data['cols'] == 'grid_2_col'){ $cols = 'col-xl-6 col-lg-6 col-md-6'; $grid = '2'; }elseif ($data['cols'] == 'grid_3_col') { $cols = 'col-xl-4 col-lg-4 col-md-6'; $grid = '3'; }elseif ($data['cols'] == 'grid_4_col') { $cols = 'col-xl-3 col-lg-3 col-md-3'; $grid = '4'; } if(isset($data['class'])){ $class = $data['class']; } if(isset($data['paginatehrml']) && $data['paginatehrml'] == true){ $pcol = $cols; }else{ $pcol = 'item'; } @endphp @if(Request::segment(1) == '')
@if(isset($data['desc']) && $data['desc'] != '')

{!! $data['desc'] !!}

@endif
@foreach($data['news'] as $news) @php $moduelFrontPageUrl = '#'; $recordLinkUrl = '#'; if(isset(App\Helpers\MyLibrary::getFront_Uri('news')['uri'])) { $moduelFrontPageUrl = App\Helpers\MyLibrary::getFront_Uri('news')['uri']; } $recordLinkUrl = (isset($news['alias']['varAlias']) && !empty($news['alias']['varAlias'])) ? $moduelFrontPageUrl . '/' . $news['alias']['varAlias'] : $moduelFrontPageUrl; $varTitle = $news['varTitle']; @endphp @if(isset($news['fkIntImgId']) && $news['fkIntImgId'] > 0) @php $itemImg = App\Helpers\resize_image::resize($news['fkIntImgId']); @endphp @else @php $itemImg = $CDN_PATH.'assets/images/news-default.jpg'; @endphp @endif @if(isset($news->custom['description'])) @php $description = strtolower($news->custom['description']); @endphp @else @php $description = strtolower($news['varShortDescription']); @endphp @endif @php $colourclass = '';@endphp @if(strtolower($news['varSector']) == 'Admin Panel') @php $colourclass = 'Admin Panel-tag'; @endphp @elseif(strtolower($news['varSector']) == 'ict') @php $colourclass = 'ict-tag'; @endphp @elseif(strtolower($news['varSector']) == 'water') @php $colourclass = 'water-tag'; @endphp @elseif(strtolower($news['varSector']) == 'fuel') @php $colourclass = 'fuel-tag'; @endphp @elseif(strtolower($news['varSector']) == 'energy') @php $colourclass = 'energy-tag'; @endphp @endif
@if(isset($news['dtDateTime']) && $news['dtDateTime'] != '') {{ date('M',strtotime($news['dtDateTime'])) }} {{ date('d',strtotime($news['dtDateTime'])) }}, {{ date('Y',strtotime($news['dtDateTime'])) }} @endif

{{ str_limit($varTitle, $limit = 65, $end = '...') }}

{{-- @if(isset($description) && $description != '')

{!! str_limit(ucfirst($description), $limit = 96, $end = '...') !!}

@endif --}} @if (isset($news['fkIntDocId']) && !empty($news['fkIntDocId'])) @php $docsAray = explode(',', $news['fkIntDocId']); $docObj = App\Document::getDocDataByIds($docsAray); @endphp @if (count($docObj) > 0)
@foreach($docObj as $key => $val) @php $CDN_PATH = Config::get('Constant.CDN_PATH'); if ($val->fk_folder > 0 && !empty($val->foldername)) { if ($val->varDocumentExtension == 'pdf' || $val->varDocumentExtension == 'PDF') { $docURL = route('viewFolderPDF', ['dir' => 'documents', 'foldername' => $val->foldername, 'filename' => $val->txtSrcDocumentName . '.' . $val->varDocumentExtension]); } else { $docURL = $CDN_PATH . 'documents/' . $val->foldername . '/' . $val->txtSrcDocumentName . '.' . $val->varDocumentExtension; } } else { if ($val->varDocumentExtension == 'pdf' || $val->varDocumentExtension == 'PDF') { $docURL = route('viewPDF', ['dir' => 'documents', 'filename' => $val->txtSrcDocumentName . '.' . $val->varDocumentExtension]); } else { $docURL = $CDN_PATH . 'documents/' . $val->txtSrcDocumentName . '.' . $val->varDocumentExtension; } } @endphp Download @endforeach
@endif @endif
@endforeach
@if(Request::segment(1) != '' && isset($data['paginatehrml']) && $data['paginatehrml'] == true && $MODULE_NAME == 'news') @if($data['news']->total() > $data['news']->perPage())
@include('partial.pagination', ['paginator' => $data['news']->links()['paginator'], 'elements' => $data['news']->links()['elements']['0']])
@endif @endif
@else @if(isset($data['desc']) && $data['desc'] != '')

{!! $data['desc'] !!}

@endif
@foreach($data['news'] as $news) @php $moduelFrontPageUrl = '#'; $recordLinkUrl = '#'; if(isset(App\Helpers\MyLibrary::getFront_Uri('news')['uri'])) { $moduelFrontPageUrl = App\Helpers\MyLibrary::getFront_Uri('news')['uri']; } $recordLinkUrl = (isset($news['alias']['varAlias']) && !empty($news['alias']['varAlias'])) ? $moduelFrontPageUrl . '/' . $news['alias']['varAlias'] : $moduelFrontPageUrl; $varTitle = $news['varTitle']; @endphp @if(isset($news['fkIntImgId']) && $news['fkIntImgId'] > 0) @php $itemImg = App\Helpers\resize_image::resize($news['fkIntImgId']); @endphp @else @php $itemImg = $CDN_PATH.'assets/images/news-default.jpg'; @endphp @endif @if(isset($news->custom['description'])) @php $description = strtolower($news->custom['description']); @endphp @else @php $description = strtolower($news['varShortDescription']); @endphp @endif @php $colourclass = '';@endphp @if(strtolower($news['varSector']) == 'ofreg') @php $colourclass = 'ofreg-tag'; @endphp @elseif(strtolower($news['varSector']) == 'ict') @php $colourclass = 'ict-tag'; @endphp @elseif(strtolower($news['varSector']) == 'water') @php $colourclass = 'water-tag'; @endphp @elseif(strtolower($news['varSector']) == 'fuel') @php $colourclass = 'fuel-tag'; @endphp @elseif(strtolower($news['varSector']) == 'energy') @php $colourclass = 'energy-tag'; @endphp @endif
@if(isset($news['dtDateTime']) && $news['dtDateTime'] != '') {{ date('M',strtotime($news['dtDateTime'])) }} {{ date('d',strtotime($news['dtDateTime'])) }}, {{ date('Y',strtotime($news['dtDateTime'])) }} @endif

{{ str_limit($varTitle, $limit = 65, $end = '...') }}

{{-- @if(isset($description) && $description != '')

{!! str_limit(ucfirst($description), $limit = 96, $end = '...') !!}

@endif --}} @if (isset($news['fkIntDocId']) && !empty($news['fkIntDocId'])) @php $docsAray = explode(',', $news['fkIntDocId']); $docObj = App\Document::getDocDataByIds($docsAray); @endphp @if (count($docObj) > 0)
@foreach($docObj as $key => $val) @php $CDN_PATH = Config::get('Constant.CDN_PATH'); if ($val->fk_folder > 0 && !empty($val->foldername)) { if ($val->varDocumentExtension == 'pdf' || $val->varDocumentExtension == 'PDF') { $docURL = route('viewFolderPDF', ['dir' => 'documents', 'foldername' => $val->foldername, 'filename' => $val->txtSrcDocumentName . '.' . $val->varDocumentExtension]); } else { $docURL = $CDN_PATH . 'documents/' . $val->foldername . '/' . $val->txtSrcDocumentName . '.' . $val->varDocumentExtension; } } else { if ($val->varDocumentExtension == 'pdf' || $val->varDocumentExtension == 'PDF') { $docURL = route('viewPDF', ['dir' => 'documents', 'filename' => $val->txtSrcDocumentName . '.' . $val->varDocumentExtension]); } else { $docURL = $CDN_PATH . 'documents/' . $val->txtSrcDocumentName . '.' . $val->varDocumentExtension; } } @endphp Download @endforeach
@endif @endif
@endforeach
@if(Request::segment(1) != '' && isset($data['paginatehrml']) && $data['paginatehrml'] == true && $MODULE_NAME == 'news') @if($data['news']->total() > $data['news']->perPage())
@include('partial.pagination', ['paginator' => $data['news']->links()['paginator'], 'elements' => $data['news']->links()['elements']['0']])
@endif @endif
@endif @else
No data found
Please reset filter to see the data.
@endif