forked from Public/pics
ManageTags: display owning user in table
This commit is contained in:
parent
310fe7c3d6
commit
5cff62836e
@ -50,10 +50,18 @@ class ManageTags extends HTMLController
|
|||||||
'data' => 'slug',
|
'data' => 'slug',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'kind' => [
|
'id_user_owner' => [
|
||||||
'header' => 'Kind',
|
'header' => 'Owning user',
|
||||||
'is_sortable' => true,
|
'is_sortable' => true,
|
||||||
'value' => 'kind',
|
'parse' => [
|
||||||
|
'type' => 'function',
|
||||||
|
'data' => function($row) {
|
||||||
|
if (!empty($row['first_name']))
|
||||||
|
return $row['first_name'] . ' ' . $row['surname'];
|
||||||
|
else
|
||||||
|
return 'n/a';
|
||||||
|
},
|
||||||
|
],
|
||||||
],
|
],
|
||||||
'count' => [
|
'count' => [
|
||||||
'header' => 'Cardinality',
|
'header' => 'Cardinality',
|
||||||
@ -76,8 +84,9 @@ class ManageTags extends HTMLController
|
|||||||
$direction = 'up';
|
$direction = 'up';
|
||||||
|
|
||||||
$data = Registry::get('db')->queryAssocs('
|
$data = Registry::get('db')->queryAssocs('
|
||||||
SELECT *
|
SELECT t.*, u.id_user, u.first_name, u.surname
|
||||||
FROM tags
|
FROM tags AS t
|
||||||
|
LEFT JOIN users AS u ON t.id_user_owner = u.id_user
|
||||||
WHERE kind != {string:album}
|
WHERE kind != {string:album}
|
||||||
ORDER BY {raw:order}
|
ORDER BY {raw:order}
|
||||||
LIMIT {int:offset}, {int:limit}',
|
LIMIT {int:offset}, {int:limit}',
|
||||||
|
Loading…
Reference in New Issue
Block a user