-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aggregation: make the name customizable #375
Conversation
f7cc5a4
to
222b089
Compare
222b089
to
ba27bd0
Compare
ba27bd0
to
b96c723
Compare
<ng-container *ngIf="aggregation.name; else nameWithKey"> | ||
{{ aggregation.name | translate | ucfirst }} | ||
</ng-container> | ||
<ng-template #nameWithKey> | ||
{{ aggregation.key | translate | ucfirst }} | ||
</ng-template> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can do something like this:
{{ (aggregation.name || aggregation.key) | translate | ucfirst }}
@@ -597,7 +599,8 @@ export class RecordSearchComponent implements OnInit, OnChanges, OnDestroy { | |||
doc_count: aggr[key].doc_count || null, | |||
value: { buckets: aggr[key].buckets }, | |||
type: aggr[key].type || 'terms', | |||
config: aggr[key].config || null | |||
config: aggr[key].config || null, | |||
name: this._aggregationName(key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you change this statement as this:
name: aggr[key].name || this._aggregationName(key)
With this, we can set the name in the backend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit message: aggregation: make the name customizable
A new parameter "aggregationsName" has been added to the configuration to allow the customization of the aggregation name. Supports a name property to set a custom title for an aggregation. Co-Authored-by: Bertrand Zuchuat <bertrand.zuchuat@rero.ch>
b96c723
to
cfce430
Compare
A new parameter "aggregationsName" has been added
to the configuration to allow the customization of the aggregation name.
Supports a name property to set a custom title for an aggregation.
Co-Authored-by: Bertrand Zuchuat bertrand.zuchuat@rero.ch
Why are you opening this PR?
Code review check list