-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat_optional_inputs' of github.com:comic/grand-challen…
…ge.org into feat_optional_inputs
- Loading branch information
Showing
11 changed files
with
502 additions
and
49 deletions.
There are no files selected for viewing
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
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
52 changes: 52 additions & 0 deletions
52
app/grandchallenge/algorithms/templates/algorithms/algorithmalgorithminterface_list.html
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,52 @@ | ||
{% extends "base.html" %} | ||
{% load crispy_forms_tags %} | ||
{% load remove_whitespace %} | ||
|
||
{% block title %} | ||
Interfaces - {{ algorithm.title }} - {{ block.super }} | ||
{% endblock %} | ||
|
||
{% block breadcrumbs %} | ||
<ol class="breadcrumb"> | ||
<li class="breadcrumb-item"><a | ||
href="{% url 'algorithms:list' %}">Algorithms</a> | ||
</li> | ||
<li class="breadcrumb-item"><a | ||
href="{{ algorithm.get_absolute_url }}">{{ algorithm.title }} | ||
</a> | ||
</li> | ||
<li class="breadcrumb-item active" | ||
aria-current="page">Interfaces | ||
</li> | ||
</ol> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<h2>Algorithm Interfaces for {{ algorithm }}</h2> | ||
|
||
<p> | ||
The following interfaces are configured for your algorithm: | ||
</p> | ||
<p><a class="btn btn-primary" href="{% url 'algorithms:interface-create' slug=algorithm.slug %}">Add new interface</a></p> | ||
|
||
<div class="table-responsive"> | ||
<table class="table table-hover table-borderless"> | ||
<thead class="thead-light"> | ||
<th>Inputs</th> | ||
<th>Outputs</th> | ||
<th>Default</th> | ||
</thead> | ||
<tbody> | ||
{% for object in object_list %} | ||
<tr> | ||
<td>{{ object.interface.inputs.all|oxford_comma }}</td> | ||
<td>{{ object.interface.outputs.all|oxford_comma }}</td> | ||
<td>{% if object.is_default %}<i class="fas fa-check-circle text-success mr-1"></i>{% else %}<i class="fas fa-times-circle text-danger mr-1"></i>{% endif %}</td> | ||
</tr> | ||
{% empty %} | ||
<tr><td colspan="100%" class="text-center">This algorithm does not have any interfaces defined yet.</td></tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
{% endblock %} |
42 changes: 42 additions & 0 deletions
42
app/grandchallenge/algorithms/templates/algorithms/algorithminterface_form.html
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,42 @@ | ||
{% extends "base.html" %} | ||
{% load crispy_forms_tags %} | ||
|
||
{% block title %} | ||
Create Interface - {{ algorithm.title }} - {{ block.super }} | ||
{% endblock %} | ||
|
||
{% block breadcrumbs %} | ||
<ol class="breadcrumb"> | ||
<li class="breadcrumb-item"><a href="{% url 'algorithms:list' %}">Algorithms</a> | ||
</li> | ||
<li class="breadcrumb-item"><a | ||
href="{{ algorithm.get_absolute_url }}">{{ algorithm.title }} | ||
</a></li> | ||
<li class="breadcrumb-item"><a | ||
href="{% url 'algorithms:interface-list' slug=algorithm.slug %}">Interfaces | ||
</a></li> | ||
<li class="breadcrumb-item active" | ||
aria-current="page">Create Interface | ||
</li> | ||
</ol> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
|
||
<h2>Create An Algorithm Interface</h2> | ||
<br> | ||
<p> | ||
Create an interface for your algorithm: define any combination of inputs and outputs, and optionally mark the interface as default for the algorithm. | ||
</p> | ||
<p> | ||
Please see the <a href="{% url 'components:component-interface-list-input' %}">list of input options</a> and the <a href="{% url 'components:component-interface-list-output' %}"> | ||
list of output options | ||
</a> for more information and examples. | ||
</p> | ||
<p> | ||
If you cannot find suitable inputs or outputs, please contact <a href="mailto:[email protected]">[email protected]</a>. | ||
</p> | ||
|
||
{% crispy form %} | ||
|
||
{% 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.