Fix grid UI

pull/3064/head
Julio Montoya 5 years ago
parent b6c8faa2dd
commit dceed0c11c
  1. 25
      main/exercise/TestCategory.php
  2. 4
      main/exercise/tests_category.php
  3. 11
      main/inc/lib/ExerciseCategoryManager.php

@ -1120,19 +1120,14 @@ class TestCategory
'number',
[
'title' => '#',
'primary' => 'true',
'primary' => true,
'visible' => false
]
)->add(
'title',
'text',
[
'title' => 'title',
]
)->add(
'description',
'text',
[
'title' => 'description',
'title' => get_lang('Name'),
]
);
@ -1149,7 +1144,12 @@ class TestCategory
['class' => 'btn btn-secondary']
);
$myRowAction->setRouteParameters(
['id', 'name' => 'exercise/tests_category.php', 'cidReq' => api_get_course_id(), 'action' => 'editcategory']
[
'id',
'name' => 'exercise/tests_category.php',
'cidReq' => api_get_course_id(),
'action' => 'editcategory',
]
);
$grid->addRowAction($myRowAction);
@ -1161,7 +1161,12 @@ class TestCategory
['class' => 'btn btn-danger', 'form_delete' => true]
);
$myRowAction->setRouteParameters(
['id', 'name' => 'exercise/tests_category.php', 'cidReq' => api_get_course_id(), 'action' => 'deletecategory']
[
'id',
'name' => 'exercise/tests_category.php',
'cidReq' => api_get_course_id(),
'action' => 'deletecategory',
]
);
$grid->addRowAction($myRowAction);

@ -37,8 +37,8 @@ $sessionId = api_get_session_id();
// breadcrumbs
$interbreadcrumb[] = [
"url" => "exercise.php?".api_get_cidreq(),
"name" => get_lang('Tests'),
'url' => 'exercise.php?'.api_get_cidreq(),
'name' => get_lang('Tests'),
];
$action = isset($_GET['action']) ? $_GET['action'] : '';

@ -323,19 +323,14 @@ JAVASCRIPT;
'number',
[
'title' => '#',
'primary' => 'true',
'primary' => true,
'visible' => false
]
)->add(
'name',
'text',
[
'title' => 'name',
]
)->add(
'description',
'text',
[
'title' => 'description',
'title' => get_lang('Name'),
]
);
$grid = $grid->getGrid();

Loading…
Cancel
Save