mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Merge pull request #143 from openclassify/dia
#137 Show ad cover photo, Fixed cover photo not showing if it was saved localy.
This commit is contained in:
commit
b20549ef68
@ -83,8 +83,14 @@ class AdvsController extends AdminController
|
||||
|
||||
$table->setColumns([
|
||||
'cover_photo' => [
|
||||
'wrapper' => '<img width="64" src="{value.cover_photo}">',
|
||||
'value' => ['cover_photo' => 'entry.cover_photo']
|
||||
'wrapper' => function (EntryInterface $entry, Request $request) {
|
||||
if (strpos($entry->cover_photo, 'http') === 0) {
|
||||
$wrapper = '<img width="64" src="'.$entry->cover_photo.'">';
|
||||
} else {
|
||||
$wrapper = '<img width="64" src="'.$request->root().$entry->cover_photo.'">';
|
||||
}
|
||||
return $wrapper;
|
||||
},
|
||||
],
|
||||
'entry.id',
|
||||
'name' => [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user