diff --git a/templates/modals/objects/add_pathway_edge_modal.html b/templates/modals/objects/add_pathway_edge_modal.html index 6a7d8cd6..02c3f86a 100644 --- a/templates/modals/objects/add_pathway_edge_modal.html +++ b/templates/modals/objects/add_pathway_edge_modal.html @@ -5,6 +5,7 @@ x-data="{ isSubmitting: false, reactionImageUrl: '', + pes: false, reset() { this.isSubmitting = false; @@ -15,20 +16,30 @@ const substratesSelect = document.getElementById('add_pathway_edge_substrates'); const productsSelect = document.getElementById('add_pathway_edge_products'); + const pesLinks = []; + const substrates = []; for (const option of substratesSelect.selectedOptions) { substrates.push(option.dataset.smiles); + if (option.dataset.pes === 'true') { + pesLinks.push(option.dataset.pes); + } } const products = []; for (const option of productsSelect.selectedOptions) { products.push(option.dataset.smiles); + if (option.dataset.pes === 'true') { + pesLinks.push(option.dataset.pes); + } } if (substrates.length > 0 && products.length > 0) { const reaction = substrates.join('.') + '>>' + products.join('.'); this.reactionImageUrl = '{% url "depict" %}?smirks=' + encodeURIComponent(reaction); + this.pes = pesLinks.length > 0; } else { + this.pes = false; this.reactionImageUrl = ''; } }, @@ -106,6 +117,7 @@ {% for n in pathway.nodes %} {{ n.default_node_label.name|safe }} @@ -132,6 +144,7 @@ {% for n in pathway.nodes %} {{ n.default_node_label.name|safe }} @@ -144,6 +157,9 @@ + + The reaction contains a partially elucidated structure!For visualization the representative structure is used. The pathway itself will show the actual partially elucidated structure. +