From a89545c6f3e1dd06e2b6057dc5ac76bf7a69879f Mon Sep 17 00:00:00 2001 From: Anjo Vahldiek-Oberwagner Date: Sat, 16 May 2026 01:01:52 +0200 Subject: [PATCH] feat: make institution affiliations clickable in author rankings and profile - combined_ranking_table.html: link affiliation column to institution profile - reprodb-profile-page.js: link affiliation in author profile header --- src/_includes/combined_ranking_table.html | 4 +++- src/assets/js/reprodb-profile-page.js | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/_includes/combined_ranking_table.html b/src/_includes/combined_ranking_table.html index 596f7729..d5858b3d 100644 --- a/src/_includes/combined_ranking_table.html +++ b/src/_includes/combined_ranking_table.html @@ -83,7 +83,9 @@ tooltip: 'Affiliation', formatter: function(cell) { var d = cell.getRow().getData(); - return escHtml((d.display_affiliation || d.affiliation || '').replace(/^_/, '')); + var aff = (d.display_affiliation || d.affiliation || '').replace(/^_/, ''); + var url = baseUrl + '/profile.html?type=institution&name=' + encodeURIComponent(d.affiliation || ''); + return '' + escHtml(aff) + ''; } }, { title: 'S', field: 'combined_score', sorter: 'number', width: 45, diff --git a/src/assets/js/reprodb-profile-page.js b/src/assets/js/reprodb-profile-page.js index 2c05e5d7..bda61e88 100644 --- a/src/assets/js/reprodb-profile-page.js +++ b/src/assets/js/reprodb-profile-page.js @@ -56,7 +56,12 @@ else if (p.category === 'systems') catTag = 'Systems'; else if (p.category === 'security') catTag = 'Security'; document.getElementById('prof-name').innerHTML = escHtml(cleanName(p.name)) + catTag; - document.getElementById('prof-affil').textContent = p.affiliation || ''; + var affilEl = document.getElementById('prof-affil'); + if (p.affiliation) { + affilEl.innerHTML = '' + escHtml(p.affiliation) + ''; + } else { + affilEl.textContent = ''; + } // Score cards var c = '';