GenericTable: rename 'parse' option to 'format'

This commit is contained in:
2025-01-08 17:19:09 +01:00
parent cc0ff71ef7
commit 77809faada
6 changed files with 22 additions and 22 deletions

View File

@@ -35,7 +35,7 @@ class ManageAlbums extends HTMLController
'tag' => [
'header' => 'Album',
'is_sortable' => true,
'parse' => [
'format' => [
'link' => BASEURL . '/editalbum/?id={ID_TAG}',
'data' => 'tag',
],
@@ -43,7 +43,7 @@ class ManageAlbums extends HTMLController
'slug' => [
'header' => 'Slug',
'is_sortable' => true,
'parse' => [
'format' => [
'link' => BASEURL . '/editalbum/?id={ID_TAG}',
'data' => 'slug',
],

View File

@@ -38,7 +38,7 @@ class ManageAssets extends HTMLController
'checkbox' => [
'header' => '<input type="checkbox" id="selectall">',
'is_sortable' => false,
'parse' => [
'format' => [
'type' => 'function',
'data' => function($row) {
return '<input type="checkbox" class="asset_select" name="delete[]" value="' . $row['id_asset'] . '">';
@@ -49,7 +49,7 @@ class ManageAssets extends HTMLController
'header' => '&nbsp;',
'is_sortable' => false,
'cell_class' => 'text-center',
'parse' => [
'format' => [
'type' => 'function',
'data' => function($row) {
$asset = Image::byRow($row);
@@ -87,7 +87,7 @@ class ManageAssets extends HTMLController
'value' => 'filename',
'header' => 'Filename',
'is_sortable' => true,
'parse' => [
'format' => [
'type' => 'value',
'link' => BASEURL . '/editasset/?id={ID_ASSET}',
'data' => 'filename',
@@ -96,7 +96,7 @@ class ManageAssets extends HTMLController
'id_user_uploaded' => [
'header' => 'User uploaded',
'is_sortable' => true,
'parse' => [
'format' => [
'type' => 'function',
'data' => function($row) {
if (!empty($row['id_user']))
@@ -110,7 +110,7 @@ class ManageAssets extends HTMLController
'dimensions' => [
'header' => 'Dimensions',
'is_sortable' => false,
'parse' => [
'format' => [
'type' => 'function',
'data' => function($row) {
if (!empty($row['image_width']))

View File

@@ -45,7 +45,7 @@ class ManageErrors extends HTMLController
'is_sortable' => true,
],
'message' => [
'parse' => [
'format' => [
'type' => 'function',
'data' => function($row) {
return $row['message'] . '<br>' .
@@ -71,7 +71,7 @@ class ManageErrors extends HTMLController
'is_sortable' => true,
],
'time' => [
'parse' => [
'format' => [
'type' => 'timestamp',
'data' => [
'timestamp' => 'time',
@@ -89,7 +89,7 @@ class ManageErrors extends HTMLController
'uid' => [
'header' => 'UID',
'is_sortable' => true,
'parse' => [
'format' => [
'link' => BASEURL . '/edituser/?id={ID_USER}',
'data' => 'id_user',
],

View File

@@ -37,7 +37,7 @@ class ManageTags extends HTMLController
'tag' => [
'header' => 'Tag',
'is_sortable' => true,
'parse' => [
'format' => [
'link' => BASEURL . '/edittag/?id={ID_TAG}',
'data' => 'tag',
],
@@ -45,7 +45,7 @@ class ManageTags extends HTMLController
'slug' => [
'header' => 'Slug',
'is_sortable' => true,
'parse' => [
'format' => [
'link' => BASEURL . '/edittag/?id={ID_TAG}',
'data' => 'slug',
],
@@ -53,7 +53,7 @@ class ManageTags extends HTMLController
'id_user_owner' => [
'header' => 'Owning user',
'is_sortable' => true,
'parse' => [
'format' => [
'type' => 'function',
'data' => function($row) {
if (!empty($row['id_user']))

View File

@@ -37,7 +37,7 @@ class ManageUsers extends HTMLController
'surname' => [
'header' => 'Last name',
'is_sortable' => true,
'parse' => [
'format' => [
'link' => BASEURL . '/edituser/?id={ID_USER}',
'data' => 'surname',
],
@@ -45,7 +45,7 @@ class ManageUsers extends HTMLController
'first_name' => [
'header' => 'First name',
'is_sortable' => true,
'parse' => [
'format' => [
'link' => BASEURL . '/edituser/?id={ID_USER}',
'data' => 'first_name',
],
@@ -53,7 +53,7 @@ class ManageUsers extends HTMLController
'slug' => [
'header' => 'Slug',
'is_sortable' => true,
'parse' => [
'format' => [
'link' => BASEURL . '/edituser/?id={ID_USER}',
'data' => 'slug',
],
@@ -64,7 +64,7 @@ class ManageUsers extends HTMLController
'is_sortable' => true,
],
'last_action_time' => [
'parse' => [
'format' => [
'type' => 'timestamp',
'data' => [
'timestamp' => 'last_action_time',
@@ -82,7 +82,7 @@ class ManageUsers extends HTMLController
'is_admin' => [
'is_sortable' => true,
'header' => 'Admin?',
'parse' => [
'format' => [
'type' => 'function',
'data' => function($row) {
return $row['is_admin'] ? 'yes' : 'no';