Replace generic alert, form and table templates with new Bootstrap equivalents

This commit is contained in:
2023-03-11 13:20:59 +01:00
parent daf6b6b264
commit f9eefe7b41
18 changed files with 681 additions and 573 deletions

View File

@@ -3,7 +3,8 @@
* GenericTable.php
* Contains key class GenericTable.
*
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
* Global Data Lab code (C) Radboud University Nijmegen
* Programming (C) Aaron van Geffen, 2015-2021
*****************************************************************************/
class GenericTable
@@ -19,7 +20,7 @@ class GenericTable
public $form_above;
public $form_below;
private $table_class;
private $sort_direction;
private $sort_order;
private $base_url;
@@ -84,6 +85,8 @@ class GenericTable
else
$this->body = $options['no_items_label'] ?? '';
$this->table_class = $options['table_class'] ?? '';
// Got a title?
$this->title = $options['title'] ?? '';
$this->title_class = $options['title_class'] ?? '';
@@ -105,6 +108,7 @@ class GenericTable
$header = [
'class' => isset($column['class']) ? $column['class'] : '',
'cell_class' => isset($column['cell_class']) ? $column['cell_class'] : null,
'colspan' => !empty($column['header_colspan']) ? $column['header_colspan'] : 1,
'href' => $isSortable ? $this->getLink($this->start, $key, $sortDirection) : null,
'label' => $column['header'],
@@ -168,6 +172,11 @@ class GenericTable
return $this->pageIndex;
}
public function getTableClass()
{
return $this->table_class;
}
public function getTitle()
{
return $this->title;
@@ -196,6 +205,7 @@ class GenericTable
// Append the cell to the row.
$newRow['cells'][] = [
'class' => $column['cell_class'] ?? '',
'value' => $value,
];
}