Skip to content

Commit cc1f1de

Browse files
committed
DIS-382 Default modules page to show 50 modules by default and add a default filter for the module name at the top of the screen.
1 parent cd5bacc commit cc1f1de

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

code/web/release_notes/25.03.00.MD

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// mark
1818
### Administration Updates
1919
- If a translatable text block does not have a default value, do not show the default tab or the copy from default button. (DIS-428) (*MDN*)
20+
- Default modules page to show 50 modules by default and add a default filter for the module name at the top of the screen. (DIS-382) (*MDN*)
2021

2122
### Aspen LiDA Configuration Updates
2223
- Add the ability to configure an Android Icon independently of the iOS icon for LiDA within Branded App Settings. Defaults to iOS icon if not supplied. (DIS-200) (*MDN*)

code/web/services/Admin/Modules.php

+18-3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,21 @@ function getDefaultSort(): string {
3737
return 'name asc';
3838
}
3939

40+
protected function getDefaultRecordsPerPage() : int {
41+
return 50;
42+
}
43+
44+
function getDefaultFilters(array $filterFields): array {
45+
return [
46+
'name' => [
47+
'fieldName' => 'name',
48+
'filterType' => 'text',
49+
'filterValue' => '',
50+
'field' => $filterFields['name'],
51+
],
52+
];
53+
}
54+
4055
function getObjectStructure($context = ''): array {
4156
return Module::getObjectStructure($context);
4257
}
@@ -53,15 +68,15 @@ function canView(): bool {
5368
return UserAccount::userHasPermission('Administer Modules');
5469
}
5570

56-
function canAddNew() {
71+
function canAddNew() : bool {
5772
return false;
5873
}
5974

60-
function canDelete() {
75+
function canDelete() : bool {
6176
return false;
6277
}
6378

64-
function canCompare() {
79+
function canCompare() : bool {
6580
return false;
6681
}
6782

code/web/sys/Module.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php /** @noinspection PhpMissingFieldTypeInspection */
22

33

44
class Module extends DataObject {
@@ -13,6 +13,7 @@ class Module extends DataObject {
1313
public $settingsClassPath;
1414
public $settingsClassName;
1515

16+
/** @noinspection PhpUnusedParameterInspection */
1617
static function getObjectStructure($context = ''): array {
1718
return [
1819
'id' => [

0 commit comments

Comments
 (0)