Commit 1a17eeed authored by Sylvain's avatar Sylvain

Bug menu_more

parent e188ce9e
......@@ -62,13 +62,13 @@
'route_prefix' => $route_prefix,
'can_prefix' => $can_prefix,
'menu' => [
'display' => true,
'display' => true, // Affichage du menu
'is_readable' => true,
'is_editable' => true,
'is_deletable' => true,
'is_duplicable' => false,
'tags' => array(
['template' => '[module|ged|document|%s]', 'key' => 'id']
['template' => '[ module|ged|document|%s ]', 'key' => 'id']
),
'more' => array([
'label' => '<i class="fa fa-unlock mr-1"></i> RAZ validation',
......
......@@ -69,7 +69,7 @@ class Template3Bt4
*/
public function renderListHead(): string
{
$template = '<th scope="col" class="text-nowrap">%s%s</th>' . PHP_EOL;
$template = '<th scope="col" class="text-nowrap%s">%s%s</th>' . PHP_EOL;
$render = '';
......@@ -81,8 +81,10 @@ class Template3Bt4
foreach ($columns as $column) {
$sortable = data_get($column, 'sortable');
$class = data_get($column, 'class');
$render .= vsprintf($template, [
is_null($class) ? '' : ' ' . $class,
data_get($column, 'label'),
is_null($sortable) ? '' : col_sort($sortable)
]);
......@@ -285,7 +287,7 @@ class Template3Bt4
$menu_more = data_get($this->_menu, 'more');
if (count($menu_more) > 0) {
if (!empty($menu_more) && count($menu_more) > 0) {
$template = '<a class="dropdown-item%s"%s>' . PHP_EOL;
$template .= ' %s' . PHP_EOL;
$template .= '</a>' . PHP_EOL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment