OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Add shore more text
Oliver Günther71d36970ea20
diff --git a/config/locales/js-en.yml b/config/locales/js-en.ymlindex 84ba517218e..1be55787ad4 100644--- a/config/locales/js-en.yml+++ b/config/locales/js-en.yml@@ -279,6 +279,7 @@ en:enumeration_doc_categories: "Document categories"enumeration_work_package_priorities: "Work package priorities"filter:+ more_values_not_shown: "There are %{total} more results, search to filter results."description:text_open_filter: "Open this filter with 'ALT' and arrow keys."text_close_filter: "To select an entry leave the focus for example by pressing enter. To leave without filter select the first (empty) entry."diff --git a/frontend/src/app/features/work-packages/components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component.html b/frontend/src/app/features/work-packages/components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component.htmlindex 214509e5e79..6900bb55735 100644--- a/frontend/src/app/features/work-packages/components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component.html+++ b/frontend/src/app/features/work-packages/components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component.html@@ -21,5 +21,10 @@bindLabel="name"[typeahead]="requests.input$"[virtualScroll]="true">+ <ng-template ng-footer-tmp *ngIf="total > count">+ <div class="ng-footer-text">+ <span [textContent]="moreItemsText(count, total)"></span>+ </div>+ </ng-template></ng-select></div>diff --git a/frontend/src/app/features/work-packages/components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component.ts b/frontend/src/app/features/work-packages/components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component.tsindex 8d7cb2912f9..6a2ad633fcf 100644--- a/frontend/src/app/features/work-packages/components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component.ts+++ b/frontend/src/app/features/work-packages/components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component.ts@@ -1,10 +1,13 @@import { NgSelectComponent } from '@ng-select/ng-select';import { ApiV3Service } from 'core-app/core/apiv3/api-v3.service';-import { DebouncedRequestSwitchmap, errorNotificationHandler } from 'core-app/shared/helpers/rxjs/debounced-input-switchmap';+import {+ DebouncedRequestSwitchmap,+ errorNotificationHandler,+} from 'core-app/shared/helpers/rxjs/debounced-input-switchmap';import { Observable } from 'rxjs';import { CurrentProjectService } from 'core-app/core/current-project/current-project.service';import { ApiV3FilterBuilder } from 'core-app/shared/helpers/api-v3/api-v3-filter-builder';-import { map } from 'rxjs/operators';+import { map, tap } from 'rxjs/operators';import { ApiV3ResourceCollection } from 'core-app/core/apiv3/paths/apiv3-resource';import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';import { ApiV3Resource } from 'core-app/core/apiv3/cache/cachable-apiv3-resource';@@ -41,6 +44,10 @@ export class FilterSearchableMultiselectValueComponent extends UntilDestroyedMixpublic active:Set<string>;+ public count = 0;++ public total = 0;+public requests = new DebouncedRequestSwitchmap<string, HalResource>((searchTerm:string) => this.loadAvailable(searchTerm),errorNotificationHandler(this.halNotification),@@ -96,14 +103,21 @@ export class FilterSearchableMultiselectValueComponent extends UntilDestroyedMixthis.requests.output$.pipe(- this.untilDestroyed(),- )+ this.untilDestroyed(),+ ).subscribe((values:HalResource[]) => {this.availableOptions = values;this.cdRef.detectChanges();});}+ public moreItemsText(count:number, total:number) {+ return this.I18n.t(+ 'js.filter.more_values_not_shown',+ { total: total - count },+ )+ }+public loadAvailable(matching:string):Observable<HalResource[]> {const filters:ApiV3FilterBuilder = this.createFilters(matching);const { href } = this.filter.currentSchema!.values!.allowedValues as any;@@ -112,7 +126,13 @@ export class FilterSearchableMultiselectValueComponent extends UntilDestroyedMixApiV3ResourceCollection<HalResource, ApiV3Resource>).filtered(filters).get()- .pipe(map((collection) => collection.elements));+ .pipe(+ tap((collection) => {+ this.count = collection.count;+ this.total = collection.total;+ }),+ map((collection) => collection.elements),+ );return filteredData;}@@ -146,4 +166,5 @@ export class FilterSearchableMultiselectValueComponent extends UntilDestroyedMix}}}+}diff --git a/frontend/src/global_styles/content/_autocomplete.sass b/frontend/src/global_styles/content/_autocomplete.sassindex 9db10bc8251..ff477a967bd 100644--- a/frontend/src/global_styles/content/_autocomplete.sass+++ b/frontend/src/global_styles/content/_autocomplete.sass@@ -183,6 +183,12 @@ mark.ui-autocomplete-match.ng-dropdown-panelz-index: 9500 !important+ // Overrides for the ng-footer-tmp option+ .ng-footer-text+ font-size: 0.9rem+ padding: 5px+ font-style: italic+.ng-option-labelvertical-align: top@@ -190,7 +196,7 @@ mark.ui-autocomplete-matchfont-size: 14pxline-height: 22px- .op-avatar+ .op-avatarmargin-right: 8px.work-package-table--container .ng-dropdown-panel