@@ -67,17 +67,19 @@ function ClusterItem({ currentModel, community }: ClusterItemArgs) {
6767 color = "pink-macaron"
6868 >
6969 { `${ metadata ?. documentsCount } ${ intl . formatMessage ( {
70- id : " networks.section.clusters.badge-publications" ,
70+ id : ` networks.source. ${ currentSource } ` ,
7171 } ) } `}
7272 </ Badge >
73- < Badge noIcon size = "sm" color = { oaColor ( metadata ?. oaPercent ) } >
74- { `${ intl . formatMessage ( {
75- id : "networks.section.clusters.open-access" ,
76- } ) } : ${ metadata ?. oaPercent . toFixed ( 1 ) } %`}
77- </ Badge >
73+ { metadata ?. oaPercent && (
74+ < Badge noIcon size = "sm" color = { oaColor ( metadata ?. oaPercent ) } >
75+ { `${ intl . formatMessage ( {
76+ id : "networks.section.clusters.open-access" ,
77+ } ) } : ${ metadata ?. oaPercent . toFixed ( 1 ) } %`}
78+ </ Badge >
79+ ) }
7880 < Badge size = "sm" color = "yellow-tournesol" >
7981 { `${ intl . formatMessage ( {
80- id : " networks.section.clusters.last-activity" ,
82+ id : ` networks.section.clusters.last-activity. ${ currentSource } ` ,
8183 } ) } : ${ community ?. maxYear || "N/A" } `}
8284 </ Badge >
8385 { currentSource === "publications" && (
@@ -123,7 +125,7 @@ function ClusterItem({ currentModel, community }: ClusterItemArgs) {
123125 . map ( ( [ domain ] , k ) => (
124126 < Fragment key = { k } >
125127 { k > 0 ? ", " : "" }
126- < Link key = { k } href = { `/search/publications ?q="${ encode ( domain ) } "` } >
128+ < Link key = { k } href = { `/search/${ currentSource } ?q="${ encode ( domain ) } "` } >
127129 #{ domain }
128130 </ Link >
129131 </ Fragment >
@@ -149,18 +151,18 @@ function ClusterItem({ currentModel, community }: ClusterItemArgs) {
149151 < Modal isOpen = { showDocumentsModal } hide = { ( ) => setShowDocumentsModal ( false ) } >
150152 < ModalTitle >
151153 { intl . formatMessage ( {
152- id : " networks.section.clusters.badge-publications" ,
154+ id : ` networks.source. ${ currentSource } ` ,
153155 } ) }
154156 </ ModalTitle >
155157 < ModalContent >
156- { metadata ?. documents ?. map ( ( publication ) => (
157- < li key = { publication . id } className = "fr-mt-1w" >
158+ { metadata ?. documents ?. map ( ( document ) => (
159+ < li key = { document . id } className = "fr-mt-1w" >
158160 < Link
159- key = { publication . id }
161+ key = { document . id }
160162 target = "_blank"
161- href = { window . location . origin + "/publications/" + encode ( publication . id as string ) }
163+ href = { window . location . origin + `/ ${ currentSource } /` + encode ( document . id as string ) }
162164 >
163- { publication . title }
165+ { document ? .title || document . id }
164166 </ Link >
165167 </ li >
166168 ) ) }
0 commit comments