@@ -139,7 +139,6 @@ qx.Class.define("osparc.vipMarket.AnatomicalModelDetails", {
139139 topGrid . setColumnFlex ( 0 , 1 ) ;
140140 const headerLayout = new qx . ui . container . Composite ( topGrid ) ;
141141 const anatomicalModel = licensedItemBundleData [ "licensedResources" ] [ selectedIdx ] [ "source" ] ;
142- const anatomicalModel = anatomicalModelsData [ "licensedResources" ] [ selectedIdx ] [ "source" ] ;
143142 let description = anatomicalModel [ "description" ] || "" ;
144143 description = description . replace ( / S P E A G / g, " " ) ; // remove SPEAG substring
145144 const delimiter = " - " ;
@@ -257,7 +256,7 @@ qx.Class.define("osparc.vipMarket.AnatomicalModelDetails", {
257256 value : "DOI" ,
258257 font : "text-14" ,
259258 alignX : "right" ,
260- marginTop : 16 ,
259+ marginTop : 10 ,
261260 } ) ;
262261 featuresLayout . add ( doiTitle , {
263262 column : 0 ,
@@ -268,7 +267,7 @@ qx.Class.define("osparc.vipMarket.AnatomicalModelDetails", {
268267 const doiLabel = new osparc . ui . basic . LinkLabel ( "-" ) . set ( {
269268 font : "text-14" ,
270269 alignX : "left" ,
271- marginTop : 16 ,
270+ marginTop : 10 ,
272271 } ) ;
273272 if ( doi ) {
274273 doiLabel . set ( {
@@ -283,6 +282,23 @@ qx.Class.define("osparc.vipMarket.AnatomicalModelDetails", {
283282 column : 1 ,
284283 row : idx ,
285284 } ) ;
285+ idx ++ ;
286+ }
287+
288+ if ( licensedItemBundleData [ "termsOfUseUrl" ] || anatomicalModel [ "termsOfUseUrl" ] ) { // remove the first one when this info goes down to the model
289+ const tAndC = new qx . ui . basic . Label ( ) . set ( {
290+ font : "text-14" ,
291+ value : this . tr ( "<u>Terms and Conditions</u>" ) ,
292+ rich : true ,
293+ anonymous : false ,
294+ cursor : "pointer" ,
295+ } ) ;
296+ tAndC . addListener ( "tap" , ( ) => this . __openLicense ( licensedItemBundleData [ "termsOfUseUrl" ] || anatomicalModel [ "termsOfUseUrl" ] ) ) ;
297+ featuresLayout . add ( tAndC , {
298+ column : 1 ,
299+ row : idx ,
300+ } ) ;
301+ idx ++ ;
286302 }
287303
288304 middleLayout . add ( featuresLayout ) ;
@@ -293,6 +309,19 @@ qx.Class.define("osparc.vipMarket.AnatomicalModelDetails", {
293309 this . __selectedModelLayout . add ( importSection ) ;
294310 } ,
295311
312+ __openLicense : function ( rawLink ) {
313+ if ( rawLink . includes ( "github" ) ) {
314+ // make sure the raw version of the link is shown
315+ rawLink += "?raw=true" ;
316+ }
317+ const mdWindow = new osparc . ui . markdown . MarkdownWindow ( rawLink ) . set ( {
318+ caption : this . tr ( "Terms and Conditions" ) ,
319+ width : 800 ,
320+ height : 600 ,
321+ } ) ;
322+ mdWindow . open ( ) ;
323+ } ,
324+
296325 __createImportSection : function ( anatomicalModelsData , selectedIdx ) {
297326 const importSection = new qx . ui . container . Composite ( new qx . ui . layout . VBox ( ) . set ( {
298327 alignX : "center"
@@ -359,7 +388,6 @@ qx.Class.define("osparc.vipMarket.AnatomicalModelDetails", {
359388 } ) ;
360389 const pUnit = new osparc . study . PricingUnitLicense ( pricingUnit ) . set ( {
361390 showRentButton : true ,
362- licenseUrl : licensedItemData [ "termsOfUseUrl" ] ,
363391 } ) ;
364392 pUnit . addListener ( "rentPricingUnit" , ( ) => {
365393 this . fireDataEvent ( "modelPurchaseRequested" , {
0 commit comments