Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
search: update search tab title & aggregation name
Browse files Browse the repository at this point in the history
* Closes rero/rero-ils#1728.
* Renames the title of the "Organisations" tab into "Corporate bodies".
* Allows to configure the aggregation name.

Co-Authored-by: Bertrand Zuchuat <bertrand.zuchuat@rero.ch>
Garfield-fr committed Apr 20, 2021
1 parent 7a7cf37 commit 21e9c1f
Showing 4 changed files with 12 additions and 5 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@
"@ngx-loading-bar/http-client": "^5.1.1",
"@ngx-loading-bar/router": "^5.1.1",
"@ngx-translate/core": "^13.0.0",
"@rero/ng-core": "^1.6.0",
"@rero/ng-core": "^1.7.0",
"bootstrap": "^4.6.0",
"crypto-js": "^3.3.0",
"document-register-element": "^1.14.10",
4 changes: 4 additions & 0 deletions projects/admin/src/app/routes/documents-route.ts
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
import { DetailComponent, RouteInterface } from '@rero/ng-core';
import { CanUpdateGuard } from '../guard/can-update.guard';
import { DocumentsBriefViewComponent } from '../record/brief-view/documents-brief-view/documents-brief-view.component';
@@ -74,6 +75,9 @@ export class DocumentsRoute extends BaseRoute implements RouteInterface {
},
aggregations: (aggregations: any) => this._routeToolService
.aggregationFilter(aggregations),
aggregationsName: {
organisation: _('Library')
},
aggregationsOrder: [
'document_type',
'author',
Original file line number Diff line number Diff line change
@@ -80,6 +80,9 @@ export class DocumentsRouteService extends BaseRoute implements ResourceRouteInt
component: DocumentBriefComponent,
label: _('Documents'),
aggregations: (aggregations: any) => this.aggFilter(aggregations),
aggregationsName: {
organisation: _('Library')
},
aggregationsOrder: this.aggregations(viewcode),
aggregationsExpand: ['document_type'],
aggregationsBucketSize: 10,
@@ -111,7 +114,7 @@ export class DocumentsRouteService extends BaseRoute implements ResourceRouteInt
key: 'corporate-bodies',
index: 'contributions',
component: ContributionBriefComponent,
label: _('Organisations'),
label: _('Corporate bodies'),
aggregationsOrder: ['sources'],
aggregationsExpand: ['sources'],
listHeaders: {

0 comments on commit 21e9c1f

Please sign in to comment.