From 977f9234c8f9fdb4d4dbbc3dccf74e6ae709168f Mon Sep 17 00:00:00 2001 From: Niklaus Johner Date: Thu, 18 Jan 2024 17:36:23 +0100 Subject: [PATCH 1/2] Fix hmm link representation in AMR details view. --- webapp/templates/chlamdb/fam.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/templates/chlamdb/fam.html b/webapp/templates/chlamdb/fam.html index 36956bb62..5abf833d5 100644 --- a/webapp/templates/chlamdb/fam.html +++ b/webapp/templates/chlamdb/fam.html @@ -178,7 +178,7 @@

Description

{% for key, value in info.items %} {{key}} - {{value}} + {{value|safe}} {% endfor %} From a073322711d5acf31fe68392de068017ab006db9 Mon Sep 17 00:00:00 2001 From: Niklaus Johner Date: Thu, 18 Jan 2024 17:36:59 +0100 Subject: [PATCH 2/2] Represent HMM links as an extenal links. --- webapp/views/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webapp/views/utils.py b/webapp/views/utils.py index fc813858c..9b9212925 100644 --- a/webapp/views/utils.py +++ b/webapp/views/utils.py @@ -136,10 +136,14 @@ def format_amr(gene, to_url=False): return f"{gene}" +icon_external_link = '' + + def format_hmm_url(hmm_id): if hmm_id: hmm_id = hmm_id.rsplit(".", 1)[0] - return f"{hmm_id}" # noqa + return f'{hmm_id} {icon_external_link}' # noqa return hmm_id