forked from enviPath/enviPy
Cleanup (#52)
Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Reviewed-on: enviPath/enviPy#52
This commit is contained in:
@ -12,7 +12,7 @@
|
||||
<i class="glyphicon glyphicon-plus"></i> Set Scenarios</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="button" data-toggle="modal" data-target="#delete_compound_modal">
|
||||
<a class="button" data-toggle="modal" data-target="#generic_delete_modal">
|
||||
<i class="glyphicon glyphicon-trash"></i> Delete Compound</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@ -8,7 +8,7 @@
|
||||
<i class="glyphicon glyphicon-plus"></i> Set Scenarios</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="button" data-toggle="modal" data-target="#delete_compound_structure_modal">
|
||||
<a class="button" data-toggle="modal" data-target="#generic_delete_modal">
|
||||
<i class="glyphicon glyphicon-trash"></i> Delete Compound Structure</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
10
templates/actions/objects/edge.html
Normal file
10
templates/actions/objects/edge.html
Normal file
@ -0,0 +1,10 @@
|
||||
{% if meta.can_edit %}
|
||||
<li>
|
||||
<a role="button" data-toggle="modal" data-target="#set_scenario_modal">
|
||||
<i class="glyphicon glyphicon-plus"></i> Set Scenarios</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="button" data-toggle="modal" data-target="#generic_delete_modal">
|
||||
<i class="glyphicon glyphicon-trash"></i> Delete Edge</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@ -1,10 +1,10 @@
|
||||
{% if meta.can_edit %}
|
||||
<li>
|
||||
<a role="button" data-toggle="modal" data-target="#delete_group_modal">
|
||||
<i class="glyphicon glyphicon-trash"></i> Delete Group</a>
|
||||
</li>
|
||||
<li>
|
||||
<a role="button" data-toggle="modal" data-target="#edit_group_member_modal">
|
||||
<a role="button" data-toggle="modal" data-target="#edit_group_member_modal">
|
||||
<i class="glyphicon glyphicon-trash"></i> Add/Remove Member</a>
|
||||
</li>
|
||||
<li>
|
||||
<a role="button" data-toggle="modal" data-target="#generic_delete_modal">
|
||||
<i class="glyphicon glyphicon-trash"></i> Delete Group</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@ -1,6 +1,6 @@
|
||||
{% if meta.can_edit %}
|
||||
<li>
|
||||
<a class="button" data-toggle="modal" data-target="#delete_model_modal">
|
||||
<a class="button" data-toggle="modal" data-target="#generic_delete_modal">
|
||||
<i class="glyphicon glyphicon-trash"></i> Delete Model</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@ -8,7 +8,7 @@
|
||||
<i class="glyphicon glyphicon-plus"></i> Set Scenarios</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="button" data-toggle="modal" data-target="#delete_node_modal">
|
||||
<a class="button" data-toggle="modal" data-target="#generic_delete_modal">
|
||||
<i class="glyphicon glyphicon-trash"></i> Delete Node</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
<i class="glyphicon glyphicon-duplicate"></i> License</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="button" data-toggle="modal" data-target="#delete_package_modal">
|
||||
<a class="button" data-toggle="modal" data-target="#generic_delete_modal">
|
||||
<i class="glyphicon glyphicon-trash"></i> Delete Package</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@ -35,7 +35,7 @@
|
||||
<i class="glyphicon glyphicon-trash"></i> Delete Reaction</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="button" data-toggle="modal" data-target="#delete_pathway_modal">
|
||||
<a class="button" data-toggle="modal" data-target="#generic_delete_modal">
|
||||
<i class="glyphicon glyphicon-trash"></i> Delete Pathway</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@ -8,7 +8,7 @@
|
||||
<i class="glyphicon glyphicon-plus"></i> Set Scenarios</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="button" data-toggle="modal" data-target="#delete_reaction_modal">
|
||||
<a class="button" data-toggle="modal" data-target="#generic_delete_modal">
|
||||
<i class="glyphicon glyphicon-trash"></i> Delete Reaction</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@ -8,7 +8,7 @@
|
||||
<i class="glyphicon glyphicon-plus"></i> Set Scenarios</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="button" data-toggle="modal" data-target="#delete_rule_modal">
|
||||
<a class="button" data-toggle="modal" data-target="#generic_delete_modal">
|
||||
<i class="glyphicon glyphicon-trash"></i> Delete Rule</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@ -16,7 +16,7 @@
|
||||
{# <i class="glyphicon glyphicon-console"></i> Manage API Token</a>#}
|
||||
{# </li>#}
|
||||
<li>
|
||||
<a role="button" data-toggle="modal" data-target="#delete_user_modal">
|
||||
<a role="button" data-toggle="modal" data-target="#generic_delete_modal">
|
||||
<i class="glyphicon glyphicon-trash"></i> Delete Account</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@ -83,21 +83,26 @@
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse collapse-framework navbar-collapse-framework" id="navbarCollapse">
|
||||
<ul class="nav navbar-nav navbar-nav-framework">
|
||||
<li class="dropdown">
|
||||
<a data-toggle="dropdown" class="dropdown-toggle" href="#">Predict Pathway<b class="caret"></b></a>
|
||||
<ul role="menu" class="dropdown-menu">
|
||||
<li>
|
||||
<a class="button" data-toggle="modal" data-target="#predict_modal">
|
||||
<i class=" glyphicon glyphicon-tag"></i> Predict Pathway
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="button" data-toggle="modal" data-target="#batch_predict_modal">
|
||||
<i class=" glyphicon glyphicon-tags"></i> Batch Prediction
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<li>
|
||||
<a class="button" data-toggle="modal" data-target="#predict_modal">
|
||||
Predict Pathway
|
||||
</a>
|
||||
</li>
|
||||
{# <li class="dropdown">#}
|
||||
{# <a data-toggle="dropdown" class="dropdown-toggle" href="#">Predict Pathway<b class="caret"></b></a>#}
|
||||
{# <ul role="menu" class="dropdown-menu">#}
|
||||
{# <li>#}
|
||||
{# <a class="button" data-toggle="modal" data-target="#predict_modal">#}
|
||||
{# <i class=" glyphicon glyphicon-tag"></i> Predict Pathway#}
|
||||
{# </a>#}
|
||||
{# </li>#}
|
||||
{# <li>#}
|
||||
{# <a class="button" data-toggle="modal" data-target="#batch_predict_modal">#}
|
||||
{# <i class=" glyphicon glyphicon-tags"></i> Batch Prediction#}
|
||||
{# </a>#}
|
||||
{# </li>#}
|
||||
{# </ul>#}
|
||||
{# </li>#}
|
||||
<li><a href="{{ meta.server_url }}/package" id="packageLink">Package</a></li>
|
||||
<li><a href="{{ meta.server_url }}/search" id="searchLink">Search</a></li>
|
||||
<li><a href="{{ meta.server_url }}/model" id="modelLink">Modelling</a></li>
|
||||
@ -192,6 +197,23 @@
|
||||
{% endif %}
|
||||
{% block content %}
|
||||
{% endblock content %}
|
||||
{% if meta.current_package.license %}
|
||||
<p></p>
|
||||
<div class="panel-group" id="license_accordion">
|
||||
<div class="panel panel-default list-group-item" style="background-color:#f5f5f5">
|
||||
<div class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#licence_accordion" href="#license">License</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="license" class="panel-collapse collapse in">
|
||||
<div class="panel-body list-group-item">
|
||||
<a target="_blank" href="{{ meta.current_package.license.link }}">
|
||||
<img src="{{ meta.current_package.license.image_link }}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- FOOTER -->
|
||||
|
||||
@ -143,6 +143,14 @@
|
||||
}
|
||||
|
||||
$(function () {
|
||||
|
||||
$('#index-form').on("keydown", function (e) {
|
||||
if (e.key === "Enter") {
|
||||
e.preventDefault();
|
||||
goButtonClicked();
|
||||
}
|
||||
});
|
||||
|
||||
// Code that should be executed once DOM is ready goes here
|
||||
$('#dropdown-predict').on('click', actionDropdownClicked);
|
||||
$('#dropdown-search').on('click', actionDropdownClicked);
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
{% load static %}
|
||||
<!-- Delete Compound -->
|
||||
<div id="delete_compound_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Delete Compound</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Deletes the Compound and associated Structures.
|
||||
<form id="delete-compound-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" id="hidden" name="hidden" value="delete-compound"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="delete-compound-modal-submit">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#delete-compound-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#delete-compound-modal-form').submit();
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
@ -1,38 +0,0 @@
|
||||
{% load static %}
|
||||
<!-- Delete Group -->
|
||||
<div id="delete_group_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Delete Group</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-danger">
|
||||
Clicking "Delete" will <strong>permanently</strong> delete the Group.
|
||||
This action can't be undone!
|
||||
</div>
|
||||
<form id="delete-group-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="hidden" value="delete-group">
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-danger" id="delete-group-modal-submit">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#delete-group-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#delete-group-modal-form').submit();
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
@ -1,35 +0,0 @@
|
||||
{% load static %}
|
||||
<!-- Delete Model -->
|
||||
<div id="delete_model_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Delete Model</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Deletes the Model.
|
||||
<form id="delete-model-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" id="hidden" name="hidden" value="delete-model"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="delete-model-modal-submit">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#delete-model-modal-submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('#delete-model-modal-form').submit();
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
@ -1,35 +0,0 @@
|
||||
{% load static %}
|
||||
<!-- Delete Node -->
|
||||
<div id="delete_node_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Delete Node</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Deletes the Node as well as ingoing and outgoing edges.
|
||||
<form id="delete-node-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" id="hidden" name="hidden" value="delete-node"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="delete-node-modal-submit">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#delete-node-modal-submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('#delete-node-modal-form').submit();
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
@ -1,36 +0,0 @@
|
||||
{% load static %}
|
||||
<!-- Delete Package -->
|
||||
<div id="delete_package_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Delete Package</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Deleting a Package deletes the very Package
|
||||
as well as all Objects stored in the Package.
|
||||
<form id="delete-package-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" id="hidden" name="hidden" value="delete-package"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="delete-package-modal-submit">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#delete-package-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#delete-package-modal-form').submit();
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
@ -22,7 +22,7 @@
|
||||
<option value="{{ e.url }}">{{ e.edge_label.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="hidden" id="hidden" name="hidden" value="delete-edge"/>
|
||||
<input type="hidden" id="hidden" name="hidden" value="delete"/>
|
||||
</form>
|
||||
<p></p>
|
||||
<div id="delete_pathway_edge_image"></div>
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
{% load static %}
|
||||
<!-- Delete Pathway -->
|
||||
<div id="delete_pathway_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Delete Pathway</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Deletes the Pathway together with all Nodes and Edges.
|
||||
<form id="delete-pathway-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" id="hidden" name="hidden" value="delete-pathway"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="delete-pathway-modal-submit">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#delete-pathway-modal-submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('#delete-pathway-modal-form').submit();
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
@ -22,7 +22,7 @@
|
||||
<option value="{{ n.url }}">{{ n.default_node_label.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="hidden" id="hidden" name="hidden" value="delete-node"/>
|
||||
<input type="hidden" id="hidden" name="hidden" value="delete"/>
|
||||
</form>
|
||||
<p></p>
|
||||
<div id="delete_pathway_node_image"></div>
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
{% load static %}
|
||||
<!-- Delete Reaction -->
|
||||
<div id="delete_reaction_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Delete Reaction</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Deletes the Reaction.
|
||||
<form id="delete-reaction-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" id="hidden" name="hidden" value="delete-reaction"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="delete-reaction-modal-submit">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#delete-reaction-modal-submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('#delete-reaction-modal-form').submit();
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
@ -1,38 +0,0 @@
|
||||
{% load static %}
|
||||
<!-- Delete User -->
|
||||
<div id="delete_user_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Delete User</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-danger">
|
||||
Clicking "Delete" will <strong>permanently</strong> delete the User and associated data.
|
||||
This action can't be undone!
|
||||
</div>
|
||||
<form id="delete-user-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="hidden" value="delete-user">
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-danger" id="delete-user-modal-submit">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#delete-user-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#delete-user-modal-form').submit();
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
@ -29,6 +29,7 @@
|
||||
$('#download-pathway-modal-submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('#download-pathway-modal-form').submit();
|
||||
$('#download_pathway_modal').modal('hide');
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
42
templates/modals/objects/generic_delete_modal.html
Normal file
42
templates/modals/objects/generic_delete_modal.html
Normal file
@ -0,0 +1,42 @@
|
||||
{% load static %}
|
||||
<!-- Delete Object -->
|
||||
<div id="generic_delete_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Delete {{ object_type|capfirst }}</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{% if object_type == 'user' %}
|
||||
Clicking "Delete" will <strong>permanently</strong> delete the User and associated data.
|
||||
This action can't be undone!
|
||||
{% else %}
|
||||
Deletes the {{ object_type|capfirst }}. Related objects that depend on this {{ object_type|capfirst }}
|
||||
will be deleted as well.
|
||||
{% endif %}
|
||||
<form id="generic-delete-modal-form" accept-charset="UTF-8" action="{{ current_object.url }}"
|
||||
data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" id="hidden" name="hidden" value="delete"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="generic-delete-modal-form-submit">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#generic-delete-modal-form-submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('#generic-delete-modal-form').submit();
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
@ -49,6 +49,18 @@
|
||||
<iframe id="predict-modal-ketcher" src="{% static '/js/ketcher2/ketcher.html' %}" width="100%"
|
||||
height="510"></iframe>
|
||||
</div>
|
||||
|
||||
<label for="prediction-setting">Default Prediction Setting</label>
|
||||
<select id="prediction-setting" name="prediction-setting" class="form-control"
|
||||
data-width='100%'>
|
||||
<option disabled>Select a Setting</option>
|
||||
{% for s in meta.available_settings %}
|
||||
<option value="{{ s.url }}"{% if s.id == meta.user.default_setting.id %}selected{% endif %}>
|
||||
{{ s.name }}{% if s.id == meta.user.default_setting.id %} <i>(User default)</i>{% endif %}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
{% block action_modals %}
|
||||
{% include "modals/objects/edit_rule_modal.html" %}
|
||||
{% include "modals/objects/generic_set_scenario_modal.html" %}
|
||||
{% include "modals/objects/generic_delete_modal.html" %}
|
||||
{% endblock action_modals %}
|
||||
|
||||
<div class="panel-group" id="rule-detail">
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
{% include "modals/objects/edit_compound_modal.html" %}
|
||||
{% include "modals/objects/add_structure_modal.html" %}
|
||||
{% include "modals/objects/generic_set_scenario_modal.html" %}
|
||||
{% include "modals/objects/delete_compound_modal.html" %}
|
||||
{% include "modals/objects/generic_delete_modal.html" %}
|
||||
{% endblock action_modals %}
|
||||
|
||||
<div class="panel-group" id="compound-detail">
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
{% block action_modals %}
|
||||
{% include "modals/objects/edit_compound_structure_modal.html" %}
|
||||
{% include "modals/objects/generic_set_scenario_modal.html" %}
|
||||
{% include "modals/objects/generic_delete_modal.html" %}
|
||||
{% endblock action_modals %}
|
||||
|
||||
<div class="panel-group" id="compound-structure-detail">
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
|
||||
{% block action_modals %}
|
||||
{# {% include "modals/objects/edit_edge_modal.html" %}#}
|
||||
{# {% include "modals/objects/delete_edge_modal.html" %}#}
|
||||
{% include "modals/objects/generic_set_scenario_modal.html" %}
|
||||
{% include "modals/objects/generic_set_scenario_modal.html" %}
|
||||
{% include "modals/objects/generic_delete_modal.html" %}
|
||||
{% endblock action_modals %}
|
||||
|
||||
<div class="panel-group" id="edge-detail">
|
||||
@ -20,7 +20,7 @@
|
||||
style="padding-right:1em"></span></a>
|
||||
<ul id="actionsList" class="dropdown-menu">
|
||||
{% block actions %}
|
||||
{# {% include "actions/objects/edge.html" %}#}
|
||||
{% include "actions/objects/edge.html" %}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
{% block action_modals %}
|
||||
{% include "modals/objects/edit_group_modal.html" %}
|
||||
{% include "modals/objects/edit_group_member_modal.html" %}
|
||||
{% include "modals/objects/delete_group_modal.html" %}
|
||||
{% include "modals/objects/generic_delete_modal.html" %}
|
||||
{% endblock action_modals %}
|
||||
|
||||
<div class="panel-group" id="package-detail">
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
{% block content %}
|
||||
|
||||
{% block action_modals %}
|
||||
{% include "modals/objects/delete_model_modal.html" %}
|
||||
{% include "modals/objects/generic_delete_modal.html" %}
|
||||
{% endblock action_modals %}
|
||||
|
||||
<!-- Include required libs -->
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
{% block action_modals %}
|
||||
{% include "modals/objects/edit_node_modal.html" %}
|
||||
{% include "modals/objects/generic_set_scenario_modal.html" %}
|
||||
{% include "modals/objects/delete_node_modal.html" %}
|
||||
{% include "modals/objects/generic_delete_modal.html" %}
|
||||
{% endblock action_modals %}
|
||||
|
||||
<div class="panel-group" id="node-detail">
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
{% include "modals/objects/edit_package_modal.html" %}
|
||||
{% include "modals/objects/edit_package_permissions_modal.html" %}
|
||||
{% include "modals/objects/set_license_modal.html" %}
|
||||
{% include "modals/objects/delete_package_modal.html" %}
|
||||
{% include "modals/objects/generic_delete_modal.html" %}
|
||||
{% endblock action_modals %}
|
||||
|
||||
<div class="panel-group" id="package-detail">
|
||||
@ -52,23 +52,5 @@
|
||||
|
||||
</div>
|
||||
|
||||
{% if package.license %}
|
||||
<p></p>
|
||||
<div class="panel-group" id="license_accordion">
|
||||
<div class="panel panel-default list-group-item" style="background-color:#f5f5f5">
|
||||
<div class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#licence_accordion" href="#license">License</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="license" class="panel-collapse collapse in">
|
||||
<div class="panel-body list-group-item">
|
||||
<a target="_blank" href="{{ package.license.link }}">
|
||||
<img src="{{ package.license.image_link }}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
{% include "modals/objects/generic_set_scenario_modal.html" %}
|
||||
{% include "modals/objects/delete_pathway_node_modal.html" %}
|
||||
{% include "modals/objects/delete_pathway_edge_modal.html" %}
|
||||
{% include "modals/objects/delete_pathway_modal.html" %}
|
||||
{% include "modals/objects/generic_delete_modal.html" %}
|
||||
{% endblock action_modals %}
|
||||
|
||||
<p></p>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
{% block action_modals %}
|
||||
{% include "modals/objects/edit_reaction_modal.html" %}
|
||||
{% include "modals/objects/generic_set_scenario_modal.html" %}
|
||||
{% include "modals/objects/delete_reaction_modal.html" %}
|
||||
{% include "modals/objects/generic_delete_modal.html" %}
|
||||
{% endblock action_modals %}
|
||||
|
||||
<div class="panel-group" id="reaction-detail">
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
{% block content %}
|
||||
|
||||
{% block action_modals %}
|
||||
|
||||
{% include "modals/objects/generic_delete_modal.html" %}
|
||||
{% endblock action_modals %}
|
||||
<div class="panel-group" id="scenario-detail">
|
||||
<div class="panel panel-default">
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
{% block action_modals %}
|
||||
{% include "modals/objects/edit_rule_modal.html" %}
|
||||
{% include "modals/objects/generic_set_scenario_modal.html" %}
|
||||
{% include "modals/objects/generic_delete_modal.html" %}
|
||||
{% endblock action_modals %}
|
||||
|
||||
<div class="panel-group" id="rule-detail">
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
{% include "modals/objects/edit_password_modal.html" %}
|
||||
{% include "modals/collections/new_prediction_setting_modal.html" %}
|
||||
{% include "modals/objects/manage_api_token_modal.html" %}
|
||||
{% include "modals/objects/delete_user_modal.html" %}
|
||||
{% include "modals/objects/generic_delete_modal.html" %}
|
||||
{% endblock action_modals %}
|
||||
|
||||
<div class="panel-group" id="user-detail">
|
||||
|
||||
@ -79,6 +79,10 @@
|
||||
|
||||
allEmpty = true;
|
||||
for (key in data) {
|
||||
if (key === 'searchterm') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (data[key].length < 1) {
|
||||
continue;
|
||||
}
|
||||
@ -176,8 +180,16 @@
|
||||
$("#selPackages").selectpicker();
|
||||
$("#search-button").on("click", search);
|
||||
|
||||
$("#searchbar").on("keydown", function (e) {
|
||||
if (e.key === "Enter") {
|
||||
e.preventDefault();
|
||||
search(e);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
{% if search_result %}
|
||||
$('#searchbar').val('{{ search_result.searchterm }}')
|
||||
handleSearchResponse("results", {{ search_result|safe }});
|
||||
{% endif %}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user