Multi-images component, refactoring medias functions
This commit is contained in:
@@ -76,10 +76,13 @@ class ArticlesDataTable extends DataTable
|
||||
->editColumn('tags2', function (Article $article) {
|
||||
$html = '';
|
||||
foreach ($article->tags as $tag) {
|
||||
$html .= '<span class="btn btn-xs btn-success pb-2">' . Tags::getFullnameByTag($tag) . '</span> ';
|
||||
$html .= '<span class="btn btn-xs btn-success pb-2 mb-1" style="font-size: 0.8em;">' . Tags::getFullnameByTag($tag) . '</span> ';
|
||||
}
|
||||
return $html;
|
||||
})
|
||||
->editColumn('images_count2', function (Article $article) {
|
||||
return Articles::countFullImagesByArticle($article);
|
||||
})
|
||||
->rawColumns(['tags2', 'thumb', 'action']);
|
||||
return parent::modifier($datatables);
|
||||
}
|
||||
@@ -97,6 +100,7 @@ class ArticlesDataTable extends DataTable
|
||||
Column::make('categories_count')->title('#Ray')->class('text-right')->searchable(false)->width(40),
|
||||
Column::make('offers_count')->title('#Ofr')->class('text-right')->searchable(false)->width(40),
|
||||
Column::make('images_count')->title('#Pho')->class('text-right')->searchable(false)->width(40),
|
||||
Column::make('images_count2')->title('#PhoH')->class('text-right')->searchable(false)->orderable(false)->width(40),
|
||||
$this->makeColumnButtons(),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user