Skip to content

Commit

Permalink
Display "Show All" link for linked invoices when there are more than 10.
Browse files Browse the repository at this point in the history
  • Loading branch information
emaijala committed Dec 9, 2024
1 parent d4ac212 commit 02e4926
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
6 changes: 4 additions & 2 deletions form.php
Original file line number Diff line number Diff line change
Expand Up @@ -1227,8 +1227,10 @@ function createFormButtons($form, $formConfig, $new, $top, $deleted)
<?php
if (++$linkCount === 10) {
?>
<td colspan="*">
...
<td colspan="6">
<a href="?func=results&type=invoice&s_op=AND&s_op1=AND&s_type1[]=template_invoice_id&s_cmp1[]=eq&s_field1[]=<?php echo $id?>">
<?php echo Translator::translate('ShowAll')?>
</a>
</td>
<?php
break;
Expand Down
1 change: 1 addition & 0 deletions lang/en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ RemoveFromStartPage = 'Remove from start page'
CopyToDefaultStartPage = 'Copy to start page defaults'
CopyToOwnStartPage = 'Copy to own start page'
ResetStartPage = 'Reset to defaults'
ShowAll = 'Show All'

; Main Functions
ShowSearch = 'Search'
Expand Down
1 change: 1 addition & 0 deletions lang/fi-FI.ini
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ RemoveFromStartPage = 'Poista aloitussivulta'
CopyToDefaultStartPage = 'Kopioi aloitussivun oletuksiksi'
CopyToOwnStartPage = 'Kopioi omalle aloitussivulle'
ResetStartPage = 'Palauta oletusarvoihin'
ShowAll = 'Näytä kaikki'

; Main Functions
ShowSearch = 'Haku'
Expand Down
1 change: 1 addition & 0 deletions lang/sv-FI.ini
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ RemoveFromStartPage = 'Radera från startsidan'
CopyToDefaultStartPage = 'Kopiera till den gemensamma startsidan'
CopyToOwnStartPage = 'Kopiera till egen startsida'
ResetStartPage = 'Återställ till standardinställningarna'
ShowAll = 'Visa alla'

; Main Functions
ShowSearch = 'Sök'
Expand Down
4 changes: 3 additions & 1 deletion search.php
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,8 @@ protected function getSearchDescription(string $type, array $searchGroups)
$fieldConfig = $formConfig['fields'][$type] ?? [];
if ('tags' === $type) {
$type = 'Tags';
} elseif ('template_invoice_id' === $type) {
$type = 'RecurringInvoiceTemplate';
} else {
$type = $fieldConfig['label'] ?? null;
if (!$type) {
Expand All @@ -715,7 +717,7 @@ protected function getSearchDescription(string $type, array $searchGroups)
}

$value = $field['value'];
switch ($fieldConfig['type']) {
switch ($fieldConfig['type'] ?? null) {
case 'TEXT':
case 'INT':
case 'AREA':
Expand Down

0 comments on commit 02e4926

Please sign in to comment.