mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 23:06:08 -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([
|
$table->setColumns([
|
||||||
'cover_photo' => [
|
'cover_photo' => [
|
||||||
'wrapper' => '<img width="64" src="{value.cover_photo}">',
|
'wrapper' => function (EntryInterface $entry, Request $request) {
|
||||||
'value' => ['cover_photo' => 'entry.cover_photo']
|
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',
|
'entry.id',
|
||||||
'name' => [
|
'name' => [
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user