From 88452b3675cc55569f73b862bc839b2a944fcad9 Mon Sep 17 00:00:00 2001 From: Manuel Rojas Date: Thu, 7 Dec 2023 09:28:08 -0300 Subject: [PATCH 1/4] 9561-Actualizacion, pseudo-cambio de id. --- .../usage-stats/cic-usage-stats.component.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/themes/cicba/app/item-page/simple/field-components/usage-stats/cic-usage-stats.component.ts b/src/themes/cicba/app/item-page/simple/field-components/usage-stats/cic-usage-stats.component.ts index 27187eb9900..174c22ef5fa 100644 --- a/src/themes/cicba/app/item-page/simple/field-components/usage-stats/cic-usage-stats.component.ts +++ b/src/themes/cicba/app/item-page/simple/field-components/usage-stats/cic-usage-stats.component.ts @@ -22,7 +22,7 @@ export class CicUsageStatsComponent implements OnInit { js.src = f; js.async = 1; fjs.parentNode.insertBefore(js, fjs); - }(window, document, 'script', 'lrw', 'parameters', 'https://cdn.jsdelivr.net/gh/lareferencia/lrw@1.1.2/dist/lrw.js')); + }(window, document, 'script', 'lrw', 'parameters', 'https://cdn.jsdelivr.net/gh/lareferencia/lrw@1.1.5/dist/lrw.js')); } ngOnInit() { @@ -30,8 +30,10 @@ export class CicUsageStatsComponent implements OnInit { if (typeof window['lrw'] === 'function') { window['lrw']({ widget_div_id: 'usage-stats', - identifier_prefix: 'oai:digital.cic.gba.gob.ar:11746/', - identifier_regex: '\/handle\/[0-9\.]+\/([0-9]+)\/?', // build the identifier from the url + //identifier_prefix: 'oai:digital.cic.gba.gob.ar:11746/', + //identifier_regex: '\/handle\/[0-9\.]+\/([0-9]+)\/?', // build the identifier from the url + //identifier_meta_field: 'citation_abstract_html_url', + identifier: 'oai:digital.cic.gba.gob.ar:11746/' , event_labels: { 'view': 'Vistas', 'download': 'Descargas', From 16f4af5f66612e344bb663228d5e3d4e28714e2c Mon Sep 17 00:00:00 2001 From: Manuel Rojas Date: Mon, 11 Dec 2023 10:45:58 -0300 Subject: [PATCH 2/4] 9561-Cambio identifier y parametrizacion --- .../usage-stats/cic-usage-stats.component.ts | 28 +++++++++++++------ .../untyped-item/untyped-item.component.html | 12 +++++++- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/themes/cicba/app/item-page/simple/field-components/usage-stats/cic-usage-stats.component.ts b/src/themes/cicba/app/item-page/simple/field-components/usage-stats/cic-usage-stats.component.ts index 174c22ef5fa..f88ff00a7c1 100644 --- a/src/themes/cicba/app/item-page/simple/field-components/usage-stats/cic-usage-stats.component.ts +++ b/src/themes/cicba/app/item-page/simple/field-components/usage-stats/cic-usage-stats.component.ts @@ -1,4 +1,5 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; +import { Item } from '../../../../../../../app/core/shared/item.model'; /** * This component renders the usage-stats badge provided by La Referencia. @@ -9,6 +10,17 @@ import { Component, OnInit } from '@angular/core'; }) export class CicUsageStatsComponent implements OnInit { + + @Input() item!: Item; + @Input() version: string = '1.1.5'; + @Input() baseIdentifierOAI! : string; + @Input() identifierHandle? : string = '/handle/[0-9.]+/([0-9]+)/?'; + @Input() nodoName! : string; + @Input() repositoryName! : string; + @Input() contryCode! : string; + @Input() identifierMetaField? : string; + @Input() nationalSource! : string; + @Input() repositorySource! : string; constructor() { // script @@ -22,7 +34,7 @@ export class CicUsageStatsComponent implements OnInit { js.src = f; js.async = 1; fjs.parentNode.insertBefore(js, fjs); - }(window, document, 'script', 'lrw', 'parameters', 'https://cdn.jsdelivr.net/gh/lareferencia/lrw@1.1.5/dist/lrw.js')); + }(window, document, 'script', 'lrw', 'parameters', 'https://cdn.jsdelivr.net/gh/lareferencia/lrw@$this.{version}/dist/lrw.js')); } ngOnInit() { @@ -33,7 +45,7 @@ export class CicUsageStatsComponent implements OnInit { //identifier_prefix: 'oai:digital.cic.gba.gob.ar:11746/', //identifier_regex: '\/handle\/[0-9\.]+\/([0-9]+)\/?', // build the identifier from the url //identifier_meta_field: 'citation_abstract_html_url', - identifier: 'oai:digital.cic.gba.gob.ar:11746/' , + identifier: '${this.baseIdentifierOAI}:${this.item.handle}' , event_labels: { 'view': 'Vistas', 'download': 'Descargas', @@ -41,12 +53,12 @@ export class CicUsageStatsComponent implements OnInit { }, scope_labels: { 'L': 'LA Referencia', - 'N': 'SNRD', - 'R': 'CIC Digital' + 'N': '${this.nodoName}', + 'R': '${this.repositoryName}' }, - country: 'AR', - national_source: 'SITEID::132', - repository_source: 'OPENDOAR::5634' + country: '${this.countryCode}', + national_source: 'SITEID::${this.nationalSource}', + repository_source: 'OPENDOAR::${this.repositorySource}' }); } } diff --git a/src/themes/cicba/app/item-page/simple/item-types/untyped-item/untyped-item.component.html b/src/themes/cicba/app/item-page/simple/item-types/untyped-item/untyped-item.component.html index 04341f8b2cc..94980acf52c 100644 --- a/src/themes/cicba/app/item-page/simple/item-types/untyped-item/untyped-item.component.html +++ b/src/themes/cicba/app/item-page/simple/item-types/untyped-item/untyped-item.component.html @@ -173,7 +173,17 @@
[inlineLabel]="true" [authorityUrl]="true"> - + +
From 94333dab663c6ffc1999e07b444d6a31bf061fa3 Mon Sep 17 00:00:00 2001 From: Felipe Mosqueira <83314353+178Pelado@users.noreply.github.com> Date: Mon, 11 Dec 2023 10:57:53 -0300 Subject: [PATCH 3/4] =?UTF-8?q?9561=20correcci=C3=B3n=20versi=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../field-components/usage-stats/cic-usage-stats.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/themes/cicba/app/item-page/simple/field-components/usage-stats/cic-usage-stats.component.ts b/src/themes/cicba/app/item-page/simple/field-components/usage-stats/cic-usage-stats.component.ts index f88ff00a7c1..4ffab56abf2 100644 --- a/src/themes/cicba/app/item-page/simple/field-components/usage-stats/cic-usage-stats.component.ts +++ b/src/themes/cicba/app/item-page/simple/field-components/usage-stats/cic-usage-stats.component.ts @@ -34,7 +34,7 @@ export class CicUsageStatsComponent implements OnInit { js.src = f; js.async = 1; fjs.parentNode.insertBefore(js, fjs); - }(window, document, 'script', 'lrw', 'parameters', 'https://cdn.jsdelivr.net/gh/lareferencia/lrw@$this.{version}/dist/lrw.js')); + }(window, document, 'script', 'lrw', 'parameters', 'https://cdn.jsdelivr.net/gh/lareferencia/lrw@${this.version}/dist/lrw.js')); } ngOnInit() { From 2df4ca4e040ca27e1fa613f18f138b4acc14a1bb Mon Sep 17 00:00:00 2001 From: Manuel Rojas Date: Mon, 11 Dec 2023 11:44:01 -0300 Subject: [PATCH 4/4] 9561-Fixes parametros --- .../usage-stats/cic-usage-stats.component.ts | 16 ++++++++-------- .../untyped-item/untyped-item.component.html | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/themes/cicba/app/item-page/simple/field-components/usage-stats/cic-usage-stats.component.ts b/src/themes/cicba/app/item-page/simple/field-components/usage-stats/cic-usage-stats.component.ts index 4ffab56abf2..6cb0c19946c 100644 --- a/src/themes/cicba/app/item-page/simple/field-components/usage-stats/cic-usage-stats.component.ts +++ b/src/themes/cicba/app/item-page/simple/field-components/usage-stats/cic-usage-stats.component.ts @@ -17,7 +17,7 @@ export class CicUsageStatsComponent implements OnInit { @Input() identifierHandle? : string = '/handle/[0-9.]+/([0-9]+)/?'; @Input() nodoName! : string; @Input() repositoryName! : string; - @Input() contryCode! : string; + @Input() countryCode! : string; @Input() identifierMetaField? : string; @Input() nationalSource! : string; @Input() repositorySource! : string; @@ -34,7 +34,7 @@ export class CicUsageStatsComponent implements OnInit { js.src = f; js.async = 1; fjs.parentNode.insertBefore(js, fjs); - }(window, document, 'script', 'lrw', 'parameters', 'https://cdn.jsdelivr.net/gh/lareferencia/lrw@${this.version}/dist/lrw.js')); + }(window, document, 'script', 'lrw', 'parameters', 'https://cdn.jsdelivr.net/gh/lareferencia/lrw@'+this.version+'/dist/lrw.js')); } ngOnInit() { @@ -45,7 +45,7 @@ export class CicUsageStatsComponent implements OnInit { //identifier_prefix: 'oai:digital.cic.gba.gob.ar:11746/', //identifier_regex: '\/handle\/[0-9\.]+\/([0-9]+)\/?', // build the identifier from the url //identifier_meta_field: 'citation_abstract_html_url', - identifier: '${this.baseIdentifierOAI}:${this.item.handle}' , + identifier: this.baseIdentifierOAI +':' + this.item.handle , event_labels: { 'view': 'Vistas', 'download': 'Descargas', @@ -53,12 +53,12 @@ export class CicUsageStatsComponent implements OnInit { }, scope_labels: { 'L': 'LA Referencia', - 'N': '${this.nodoName}', - 'R': '${this.repositoryName}' + 'N': this.nodoName, + 'R': this.repositoryName }, - country: '${this.countryCode}', - national_source: 'SITEID::${this.nationalSource}', - repository_source: 'OPENDOAR::${this.repositorySource}' + country: this.countryCode, + national_source: 'SITEID::' + this.nationalSource , + repository_source: 'OPENDOAR::' + this.repositorySource }); } } diff --git a/src/themes/cicba/app/item-page/simple/item-types/untyped-item/untyped-item.component.html b/src/themes/cicba/app/item-page/simple/item-types/untyped-item/untyped-item.component.html index 94980acf52c..8f2a6b90edf 100644 --- a/src/themes/cicba/app/item-page/simple/item-types/untyped-item/untyped-item.component.html +++ b/src/themes/cicba/app/item-page/simple/item-types/untyped-item/untyped-item.component.html @@ -175,11 +175,11 @@