-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from wseis/source
Source
- Loading branch information
Showing
13 changed files
with
404 additions
and
15 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
tools/qmratool/migrations/0003_sourcewater_user_alter_inflow_water_source.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Generated by Django 4.1.2 on 2024-04-23 14:31 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("qmratool", "0002_riskassessment_created_at"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="sourcewater", | ||
name="user", | ||
field=models.ForeignKey( | ||
default=1, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="sourcewaters", | ||
to=settings.AUTH_USER_MODEL, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="inflow", | ||
name="water_source", | ||
field=models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="inflow", | ||
to="qmratool.sourcewater", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
{% extends "qmratool/layout.html" %}!-- Extend your base template --> | ||
{% load crispy_forms_tags %} | ||
{% block body %} | ||
|
||
<div class="container" style="padding: 5%"> | ||
<div class="row"> | ||
<div class="col-sm-8"> | ||
<h1 class = "headline">Create a new Inflow</h1> | ||
<form method="post"> | ||
{% csrf_token %} | ||
{{ source_form|crispy }} | ||
{{ inflow_formset.management_form }} | ||
{% for form in inflow_formset %} | ||
<div class="inflow-form"> | ||
{{ form|crispy }} | ||
</div> | ||
{% endfor %} | ||
<button class = "btn btn-primary" type="submit">Submit</button> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
{% extends "qmratool/layout.html" %}!-- Extend your base template --> | ||
{% load crispy_forms_tags %} | ||
{% block body %} | ||
|
||
<div class="container" style="padding: 5%"> | ||
<div class="row"> | ||
<div class="col-sm-8"> | ||
<h1 class = "headline">Create a new Treatment</h1> | ||
<form method="post"> | ||
{% csrf_token %} | ||
{{ treatment_form|crispy }} | ||
{{ logremoval_formset.management_form }} | ||
{% for form in logremoval_formset %} | ||
<div class="logremoval-form"> | ||
{{ form|crispy }} | ||
</div> | ||
{% endfor %} | ||
<button class = "btn btn-primary" type="submit">Submit</button> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{% extends "qmratool/layout.html" %} | ||
{% load crispy_forms_tags %} | ||
|
||
|
||
{% block body %} | ||
<div class="container" style="padding: 5%"> | ||
<div class="row action-panel"> | ||
<div class="col"> | ||
<h4 class= "mb-2 .kwb_headline"> Configure a custom source water</h4> | ||
<a class = "btn btn-primary mt-3" href="{%url 'create_water_source_inflows'%}"> | ||
Configuration a new source water | ||
</a> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-10"> | ||
{% if user.is_authenticated %} | ||
<h4 class= "mb-5 mt-5 .kwb_headline"> My Source waters</h4> | ||
{%for source_water in object_list%} | ||
|
||
<div class="media p-3 mt-3 custom-media" data-url="" style="border: 2px solid; border-radius: 5px; border-color: #d3d3d3 "> | ||
<div class="media-left mt-2 pr-3"> | ||
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<rect x="0.906006" y="0.361328" width="50" height="50" rx="4" fill="#0003e2"/> | ||
|
||
<svg width="51" height="51" viewBox="-5 -2 40 40" fill="#0003e2" xmlns="http://www.w3.org/2000/svg"> | ||
<rect x="1.90601" y="1.64844" width="26" height="32" rx="3" stroke="white" stroke-width="2"/> | ||
<path d="M7.15601 8.89844L21.906 8.89844" stroke="white" stroke-width="2" stroke-linecap="round"/> | ||
<path d="M7.15601 14.7319L21.906 14.7319" stroke="white" stroke-width="2" stroke-linecap="round"/> | ||
<path d="M7.15601 20.5649L21.906 20.5649" stroke="white" stroke-width="2" stroke-linecap="round"/> | ||
<path d="M7.15601 26.3984L21.906 26.3984" stroke="white" stroke-width="2" stroke-linecap="round"/> | ||
</svg> | ||
</svg> | ||
</a> | ||
|
||
|
||
</div > | ||
<div class="media-body" > | ||
<h4 class="media-heading d-flex justify-content-between .kwb_headline">{{source_water.water_source_name|title}} | ||
<span> | ||
<svg width="93" height="21" viewBox="0 0 93 21" fill="none" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<a xlink:href="" target="__blank"> | ||
<circle cx="10.0881" cy="10.4404" r="10" fill="#AFAFAF"/> | ||
<path d="M4.76792 16.3104L5.98981 11.7283L13.7284 3.98966L17.0886 7.34985L9.35 15.0885L4.76792 16.3104Z" fill="white"/> | ||
</a> | ||
<a xlink:href="" target="__blank"> | ||
<circle cx="36.0439" cy="10.4404" r="10" fill="#AFAFAF"/> | ||
<rect x="39.9143" y="4.34375" width="3.1485" height="14.0952" transform="rotate(45 39.9143 4.34375)" fill="white"/> | ||
<rect x="42.1406" y="14.3105" width="3.1485" height="14.0952" transform="rotate(135 42.1406 14.3105)" fill="white"/> | ||
</a> | ||
</svg> | ||
</h4> | ||
|
||
</span> | ||
|
||
<p> {{source_water.water_source_description|capfirst}} </p> | ||
</div> | ||
</div> | ||
|
||
{%empty%} | ||
There are currently no Source waters. | ||
{%endfor%} | ||
{%endif%} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{% extends "qmratool/layout.html" %} | ||
{% load crispy_forms_tags %} | ||
|
||
|
||
{% block body %} | ||
<div class="container" style="padding: 5%"> | ||
<div class="row action-panel"> | ||
<div class="col"> | ||
<h4 class= "mb-2 .kwb_headline"> Configure a custom Treatment</h4> | ||
<a class = "btn btn-primary mt-3" href="{%url 'create_treatment_logremoval'%}"> | ||
Configure a new treatment | ||
</a> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-10"> | ||
{% if user.is_authenticated %} | ||
<h4 class= "mb-5 mt-5 .kwb_headline"> My Treatment</h4> | ||
{%for treatment in object_list%} | ||
|
||
<div class="media p-3 mt-3 custom-media" data-url="" style="border: 2px solid; border-radius: 5px; border-color: #d3d3d3 "> | ||
<div class="media-left mt-2 pr-3"> | ||
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<rect x="0.906006" y="0.361328" width="50" height="50" rx="4" fill="#0003e2"/> | ||
|
||
<svg width="51" height="51" viewBox="-5 -2 40 40" fill="#0003e2" xmlns="http://www.w3.org/2000/svg"> | ||
<rect x="1.90601" y="1.64844" width="26" height="32" rx="3" stroke="white" stroke-width="2"/> | ||
<path d="M7.15601 8.89844L21.906 8.89844" stroke="white" stroke-width="2" stroke-linecap="round"/> | ||
<path d="M7.15601 14.7319L21.906 14.7319" stroke="white" stroke-width="2" stroke-linecap="round"/> | ||
<path d="M7.15601 20.5649L21.906 20.5649" stroke="white" stroke-width="2" stroke-linecap="round"/> | ||
<path d="M7.15601 26.3984L21.906 26.3984" stroke="white" stroke-width="2" stroke-linecap="round"/> | ||
</svg> | ||
</svg> | ||
</a> | ||
|
||
|
||
</div > | ||
<div class="media-body" > | ||
<h4 class="media-heading d-flex justify-content-between .kwb_headline">{{treatment.name|title}} | ||
<span> | ||
<svg width="93" height="21" viewBox="0 0 93 21" fill="none" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<a xlink:href="" target="__blank"> | ||
<circle cx="10.0881" cy="10.4404" r="10" fill="#AFAFAF"/> | ||
<path d="M4.76792 16.3104L5.98981 11.7283L13.7284 3.98966L17.0886 7.34985L9.35 15.0885L4.76792 16.3104Z" fill="white"/> | ||
</a> | ||
<a xlink:href="" target="__blank"> | ||
<circle cx="36.0439" cy="10.4404" r="10" fill="#AFAFAF"/> | ||
<rect x="39.9143" y="4.34375" width="3.1485" height="14.0952" transform="rotate(45 39.9143 4.34375)" fill="white"/> | ||
<rect x="42.1406" y="14.3105" width="3.1485" height="14.0952" transform="rotate(135 42.1406 14.3105)" fill="white"/> | ||
</a> | ||
</svg> | ||
</h4> | ||
|
||
</span> | ||
|
||
<p> {{treatment.description|capfirst}} </p> | ||
</div> | ||
</div> | ||
|
||
{%empty%} | ||
There are currently no Treatments. | ||
{%endfor%} | ||
{%endif%} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.