forked from DSpace/dspace-angular
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in task/dspace-cris-2023_02_x/DSC-2050 (pull request DSpace#2636)
[DSC-2050] use queryParam for item reports Approved-by: Francesco Molinaro
- Loading branch information
Showing
7 changed files
with
189 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 10 additions & 2 deletions
12
...red/metric/metric-embedded/metric-embedded-download/metric-embedded-download.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
import { Component, Renderer2 } from '@angular/core'; | ||
import { Component, OnInit, Renderer2 } from '@angular/core'; | ||
import { BaseEmbeddedHtmlMetricComponent } from '../base-embedded-html-metric.component'; | ||
|
||
export const METRIC_TYPE_DOWNLOAD = 'TotalDownloads'; | ||
@Component({ | ||
selector: 'ds-metric-embedded-download', | ||
templateUrl: './metric-embedded-download.component.html', | ||
styleUrls: ['./metric-embedded-download.component.scss', '../../metric-loader/base-metric.component.scss'] | ||
}) | ||
export class MetricEmbeddedDownloadComponent extends BaseEmbeddedHtmlMetricComponent { | ||
export class MetricEmbeddedDownloadComponent extends BaseEmbeddedHtmlMetricComponent implements OnInit { | ||
|
||
constructor(protected render: Renderer2) { | ||
super(render); | ||
} | ||
|
||
ngOnInit() { | ||
super.ngOnInit(); | ||
if (this.href) { | ||
this.href += (this.href.includes('?') ? '&' : '?') + 'reportType=' + METRIC_TYPE_DOWNLOAD; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters