forked from enviPath/enviPy
## Changes - All text input fields are now cleaned with nh3 to remove html tags. We allow certain html tags under `settings.py/ALLOWED_HTML_TAGS` so we can easily update the tags we allow in the future. - All names and descriptions now use the template tag `nh_safe` in all html files. - Usernames and emails are a small exception and are not allowed any html tags Co-authored-by: Liam Brydon <62733830+MyCreativityOutlet@users.noreply.github.com> Co-authored-by: jebus <lorsbach@envipath.com> Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Reviewed-on: enviPath/enviPy#171 Reviewed-by: jebus <lorsbach@envipath.com> Co-authored-by: liambrydon <lbry121@aucklanduni.ac.nz> Co-committed-by: liambrydon <lbry121@aucklanduni.ac.nz>
226 lines
12 KiB
HTML
226 lines
12 KiB
HTML
{% extends "framework.html" %}
|
|
|
|
{% block content %}
|
|
|
|
{% block action_modals %}
|
|
{% include "modals/objects/edit_reaction_modal.html" %}
|
|
{% include "modals/objects/generic_set_aliases_modal.html" %}
|
|
{% include "modals/objects/generic_set_scenario_modal.html" %}
|
|
{% include "modals/objects/generic_copy_object_modal.html" %}
|
|
{% include "modals/objects/generic_set_external_reference_modal.html" %}
|
|
{% include "modals/objects/generic_delete_modal.html" %}
|
|
{% endblock action_modals %}
|
|
|
|
<div class="panel-group" id="reaction-detail">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading" id="headingPanel" style="font-size:2rem;height: 46px">
|
|
{{ reaction.name|safe }}
|
|
<div id="actionsButton"
|
|
style="float: right;font-weight: normal;font-size: medium;position: relative; top: 50%; transform: translateY(-50%);z-index:100;display: none;"
|
|
class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
|
|
aria-haspopup="true" aria-expanded="false"><span
|
|
class="glyphicon glyphicon-wrench"></span> Actions <span class="caret"></span><span
|
|
style="padding-right:1em"></span></a>
|
|
<ul id="actionsList" class="dropdown-menu">
|
|
{% block actions %}
|
|
{% include "actions/objects/reaction.html" %}
|
|
{% endblock %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Description -->
|
|
<div class="panel panel-default panel-heading list-group-item" style="background-color:silver">
|
|
<h4 class="panel-title">
|
|
<a id="reaction-desc-link" data-toggle="collapse" data-parent="#reaction-detail"
|
|
href="#reaction-desc">Description</a>
|
|
</h4>
|
|
</div>
|
|
<div id="reaction-desc" class="panel-collapse collapse in">
|
|
<div class="panel-body list-group-item">
|
|
{{ reaction.description|safe }}
|
|
</div>
|
|
</div>
|
|
|
|
{% if reaction.aliases %}
|
|
<!-- Aliases -->
|
|
<div class="panel panel-default panel-heading list-group-item" style="background-color:silver">
|
|
<h4 class="panel-title">
|
|
<a id="reaction-aliases-link" data-toggle="collapse" data-parent="#reaction-detail"
|
|
href="#reaction-aliases">Aliases</a>
|
|
</h4>
|
|
</div>
|
|
<div id="reaction-aliases" class="panel-collapse collapse in">
|
|
<div class="panel-body list-group-item">
|
|
{% for alias in reaction.aliases %}
|
|
<a class="list-group-item">{{ alias }}</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- Image -->
|
|
<div class="panel panel-default panel-heading list-group-item" style="background-color:silver">
|
|
<h4 class="panel-title">
|
|
<a id="reaction-image-link" data-toggle="collapse" data-parent="#reaction-detail"
|
|
href="#reaction-image">Image Representation</a>
|
|
</h4>
|
|
</div>
|
|
<div id="reaction-image" class="panel-collapse collapse in">
|
|
<div class="panel-body list-group-item">
|
|
<div id="image-div" align="center">
|
|
{{ reaction.as_svg|safe }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Reaction Description -->
|
|
<div class="panel panel-default panel-heading list-group-item" style="background-color:silver">
|
|
<h4 class="panel-title">
|
|
<a id="reaction-description-link" data-toggle="collapse" data-parent="#reaction-description-detail"
|
|
href="#reaction-description-smiles">Reaction Description</a>
|
|
</h4>
|
|
</div>
|
|
<div id="reaction-description-smiles" class="panel-collapse collapse in">
|
|
<div class="panel-body list-group-item">
|
|
{% for educt in reaction.educts.all %}
|
|
<a class="btn btn-default" href="{{ educt.url }}">{{ educt.name|safe }}</a>
|
|
{% endfor %}
|
|
<span class="glyphicon glyphicon-arrow-right" style="margin-left:5em;margin-right:5em;"
|
|
aria-hidden="true"></span>
|
|
{% for product in reaction.products.all %}
|
|
<a class="btn btn-default" href="{{ product.url }}">{{ product.name|safe }}</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- SMIRKS -->
|
|
<div class="panel panel-default panel-heading list-group-item" style="background-color:silver">
|
|
<h4 class="panel-title">
|
|
<a id="reaction-smirks-link" data-toggle="collapse" data-parent="#reaction-detail"
|
|
href="#reaction-smirks">SMIRKS Representation</a>
|
|
</h4>
|
|
</div>
|
|
<div id="reaction-smirks" class="panel-collapse collapse in">
|
|
<div class="panel-body list-group-item">
|
|
{{ reaction.smirks }}
|
|
</div>
|
|
</div>
|
|
|
|
{% if reaction.rules.all %}
|
|
<!-- Rules -->
|
|
<div class="panel panel-default panel-heading list-group-item" style="background-color:silver">
|
|
<h4 class="panel-title">
|
|
<a id="reaction-rules-link" data-toggle="collapse" data-parent="#reaction-detail"
|
|
href="#reaction-rules">Rules</a>
|
|
</h4>
|
|
</div>
|
|
<div id="reaction-rules" class="panel-collapse collapse in">
|
|
<div class="panel-body list-group-item">
|
|
{% for r in reaction.rules.all %}
|
|
<a class="list-group-item" href="{{ r.url }}">{{ r.name|safe }}</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if reaction.get_related_enzymes %}
|
|
<!-- EC Numbers -->
|
|
<div class="panel panel-default panel-heading list-group-item" style="background-color:silver">
|
|
<h4 class="panel-title">
|
|
<a id="rule-ec-numbers-link" data-toggle="collapse" data-parent="#rule-detail"
|
|
href="#rule-ec-numbers">EC Numbers</a>
|
|
</h4>
|
|
</div>
|
|
<div id="rule-ec-numbers" class="panel-collapse collapse in">
|
|
<div class="panel-body list-group-item">
|
|
{% for e in reaction.get_related_enzymes %}
|
|
<a class="list-group-item" href="http://www.brenda-enzymes.org/enzyme.php?ecno={{ e.ec_number }}">{{ e.name }}</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if reaction.related_pathways %}
|
|
<!-- Pathways -->
|
|
<div class="panel panel-default panel-heading list-group-item" style="background-color:silver">
|
|
<h4 class="panel-title">
|
|
<a id="reaction-pathway-link" data-toggle="collapse" data-parent="#reaction-detail"
|
|
href="#reaction-pathway">Pathways</a>
|
|
</h4>
|
|
</div>
|
|
<div id="reaction-pathway" class="panel-collapse collapse in">
|
|
<div class="panel-body list-group-item">
|
|
{% for r in reaction.related_pathways %}
|
|
<a class="list-group-item" href="{{ r.url }}">{{ r.name|safe }}</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if reaction.scenarios.all %}
|
|
<div class="panel panel-default panel-heading list-group-item" style="background-color:silver">
|
|
<h4 class="panel-title">
|
|
<a id="reaction-scenario-link" data-toggle="collapse" data-parent="#reaction-detail"
|
|
href="#reaction-scenario">Scenarios</a>
|
|
</h4>
|
|
</div>
|
|
<div id="reaction-scenario" class="panel-collapse collapse in">
|
|
<div class="panel-body list-group-item">
|
|
{% for s in reaction.scenarios.all %}
|
|
<a class="list-group-item" href="{{ s.url }}">{{ s.name|safe }} <i>({{ s.package.name|safe }})</i></a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- External Identifiers -->
|
|
{% if reaction.get_external_identifiers %}
|
|
<div class="panel panel-default panel-heading list-group-item" style="background-color:silver">
|
|
<h4 class="panel-title">
|
|
<a id="reaction-external-identifier-link" data-toggle="collapse" data-parent="#reaction-detail"
|
|
href="#reaction-external-identifier">External Identifier</a>
|
|
</h4>
|
|
</div>
|
|
<div id="reaction-external-identifier" class="panel-collapse collapse in">
|
|
<div class="panel-body list-group-item">
|
|
{% if reaction.get_rhea_identifiers %}
|
|
<div class="panel panel-default panel-heading list-group-item"
|
|
style="background-color:silver">
|
|
<h4 class="panel-title">
|
|
<a id="reaction-rhea-identifier-link" data-toggle="collapse"
|
|
data-parent="#reaction-external-identifier"
|
|
href="#reaction-rhea-identifier">Rhea</a>
|
|
</h4>
|
|
</div>
|
|
<div id="reaction-rhea-identifier" class="panel-collapse collapse in">
|
|
{% for eid in reaction.get_rhea_identifiers %}
|
|
<a class="list-group-item"
|
|
href="{{ eid.external_url }}">{{ eid.identifier_value }}</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% if reaction.get_uniprot_identifiers %}
|
|
<div class="panel panel-default panel-heading list-group-item"
|
|
style="background-color:silver">
|
|
<h4 class="panel-title">
|
|
<a id="reaction-uniprot-identifier-link" data-toggle="collapse"
|
|
data-parent="#reaction-external-identifier"
|
|
href="#reaction-uniprot-identifier">UniProt</a>
|
|
</h4>
|
|
</div>
|
|
<div id="reaction-uniprot-identifier" class="panel-collapse collapse in">
|
|
{% for eid in reaction.get_uniprot_identifiers %}
|
|
<a class="list-group-item"
|
|
href="{{ eid.external_url }}">10 SwissProt entries ({{ eid.identifier_value }})</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
</div>
|
|
</div>
|
|
{% endblock content %}
|