mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 11:27:09 +00:00
105 lines
3.3 KiB
HTML
105 lines
3.3 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
{% block content %}
|
|
<nav aria-label="breadcrumb">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item active" aria-current="page">Network</li>
|
|
</ol>
|
|
</nav>
|
|
|
|
<h1>Network View</h1>
|
|
|
|
<hr>
|
|
|
|
<form class="form"
|
|
method="POST">
|
|
{% csrf_token %}
|
|
{% load bootstrap4 %}
|
|
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<h3>Filter Relationships</h3>
|
|
{% bootstrap_form relationship_form exclude='date' %}
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<h3>Filter People</h3>
|
|
{% bootstrap_form person_form exclude='date' %}
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<h3>Filter Organisations</h3>
|
|
{% bootstrap_form organisation_form exclude='date' %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<hr>
|
|
{% bootstrap_field relationship_form.date %}
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<hr>
|
|
{% bootstrap_field person_form.date %}
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<hr>
|
|
{% bootstrap_field organisation_form.date %}
|
|
</div>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
{% buttons %}
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<button class="btn btn-block btn-success" type="submit">Filter</button>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<input class="btn btn-block btn-danger" type="button" value="Reset Filters" onClick="this.form.reset()" />
|
|
</div>
|
|
</div>
|
|
{% endbuttons %}
|
|
</form>
|
|
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<button class="btn btn-block btn-info mb-3" onclick="save_image();">Save Image</button>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<button class="btn btn-block btn-info mb-3" onclick="toggle_organisations();">Toggle Organisations</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="cy"
|
|
class="mb-2"
|
|
style="width: 100%; min-height: 1000px; flex-grow: 1; border: 2px solid black"></div>
|
|
{% endblock %}
|
|
|
|
{% block extra_script %}
|
|
<!--
|
|
Embedding graph data in page as JSON allows filtering to be performed entirely on the backend when we send a POST.
|
|
-->
|
|
{{ person_set|json_script:'person-set-data' }}
|
|
|
|
{{ organisation_set|json_script:'organisation-set-data' }}
|
|
|
|
{{ relationship_set|json_script:'relationship-set-data' }}
|
|
|
|
{{ organisation_relationship_set|json_script:'organisation-relationship-set-data' }}
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/cytoscape/3.18.2/cytoscape.min.js"
|
|
integrity="sha512-CBGCXtszkG5rYlQSTNUzk54/731Kz28WPk2uT1GCPCqgfVRJ2v514vzzf16HuGX9WVtE7JLqRuAERNAzFZ9Hpw=="
|
|
crossorigin="anonymous"></script>
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js"
|
|
integrity="sha512-Qlv6VSKh1gDKGoJbnyA5RMXYcvnpIqhO++MhIM2fStMcGT9i2T//tSwYFlcyoRRDcDZ+TYHpH8azBBCyhpSeqw=="
|
|
crossorigin="anonymous"></script>
|
|
|
|
{% load staticfiles %}
|
|
<script src="{% static 'js/network.js' %}"></script>
|
|
{% endblock %} |