Skip to content

Commit 3f6c5ec

Browse files
committed
Filter now accepts headers syntax for column names
1 parent ceb78f4 commit 3f6c5ec

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

meta/Filter.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public function render($showNotFound = false)
3535
->addClass('advancedOptions');
3636

3737
// column dropdowns
38+
$num = 0;
3839
foreach ($colValues as $colName => $colData) {
3940
$qualifiedColName = $colName[0] !== '%' ? "$schema.$colName" : $colName;
4041

@@ -43,9 +44,13 @@ public function render($showNotFound = false)
4344
->id("__filter-$colName")
4445
->attr('aria-haspopup', 'true');
4546

46-
// popup toggler
47+
// popup toggler uses header if defined in syntax, otherwise label
48+
$header = $colData['label'];
49+
if (!empty($this->data['headers'][$num])) {
50+
$header = $this->data['headers'][$num];
51+
}
4752
$form->addTagOpen('div')->addClass('current');
48-
$form->addHTML($colData['label']);
53+
$form->addHTML($header);
4954
$form->addTagClose('div');
5055

5156
$form->addTagOpen('ul')->attr('aria-expanded', 'false');
@@ -64,6 +69,7 @@ public function render($showNotFound = false)
6469

6570
$form->addTagClose('ul');
6671
$form->addTagClose('div'); // close div.toggle
72+
$num++;
6773
}
6874

6975
$form->addButton('struct-filter-submit', $this->helper->getLang('filter_button'))

0 commit comments

Comments
 (0)