Back

Template Source: spike_eval/benchmark/detail.html

{% extends "spike_eval/benchmark/base.html" %} {% load i18n %} {% load spike_eval_tags %} {% load bootstrap_tags %} {% block head_title %}{B:{{ b.id }}}&nbsp;{{ b.name }}{% endblock %} {% block content %} {% if b|is_editable:user %} <section class="well"> <form class="actions"> <span class="label">Actions:</span> <a id="edit-benchmark-toggle" class="btn btn-mini"> {% trans "Edit Benchmark" %}</a> <a id="create-trial-toggle" class="btn btn-mini"> {% trans "Create Trial" %}</a> <a id="create-suppl-toggle" class="btn btn-mini"> {% trans "Create Supplementary File" %}</a> </form> <form id="edit-benchmark" class="form form-horizontal" method="POST" style="display:none"> <fieldset> <legend>Edit Benchmark</legend> {% csrf_token %} {{ b_form|as_bootstrap }} <div class="form-actions"> <input type="submit" class="btn btn-primary" name="b_edit" value="{% trans 'Edit Benchmark' %}"/> </div> </fieldset> </form> <form id="create-trial" class="form form-horizontal" method="POST" enctype="multipart/form-data" style="display:none"> <fieldset> <legend>Create Trial</legend> {% csrf_token %} {{ t_form|as_bootstrap }} <div class="form-actions"> <input type="submit" class="btn btn-primary" name="t_create" value="{% trans 'Create Trial' %}"/> </div> </fieldset> </form> <form id="create-suppl" class="form form-horizontal" method="POST" enctype="multipart/form-data" style="display:none"> <fieldset> <legend>Create Supplementary</legend> {% csrf_token %} {{ s_form|as_bootstrap }} <div class="form-actions"> <input type="submit" class="btn btn-primary" name="s_create" value="{% trans 'Create Supplementary' %}"/> </div> </fieldset> </form> </section> {% endif %} <section> <h1> &quot;{{ b }}&quot; <small>({{ b.get_state_display }})</small> </h1> <dl class="dl-horizontal"> <dt> <strong>Description:</strong> </dt> <dd> {{ b.description|default:"no description" }} </dd> <dt> <strong>Owner:</strong> </dt> <dd> {% icn_profile b %} {% ifequal b.owner request.user %}(you){% endifequal %} </nobr> </dd> <dt> <strong>Date Created:</strong> </dt> <dd> {% icn_time b %} </dd> {% if b|is_editable:user %} <dt> <strong>Status:</strong> </dt> <dd> {% if b.is_active %} <i class="icon-ok"></i> <b style="color: green">ACTIVE</b> - available for user download {% else %} <i class="icon-lock"></i> <b style="color: red">INACTIVE</b> - for your eyes only {% endif %} </dd> {% endif %} <dt> <strong>Tags:</strong> </dt> <dd> {% for tag in b.tags.all %} <i class="icon-tag"></i>{{ tag }}&nbsp; {% endfor %} </dd> <dt> <strong>Summary</strong> </dt> <dd> <a href="{% url b_summary b.id %}">CLICK HERE TO VIEW COMPARISON OF DIFFERENT EVALUATIONS</a><br> </dd> </dl> </section> <section> <h2>Trial Set <small>touples of rawdata file and groundtruth file</small> </h2> <p>Benchmarks consist of one or more Trials. You may download Trials and apply your spike sorting algorithm. After the spike sorting on your end, you can may upload the resulting spike train set here and start an Evaluation.</p> {% if t_list %} <table class="table table-striped table-condensed"> <thead> <tr> <th>{% trans "Name" %}</th> <th>{% trans "Created" %}</th> <th>{{ b.parameter }}</th> <th>{% trans "Description" %}</th> <th>{% trans "Download" %}</th> {% ifequal b.owner user %} <th>{% trans "Status" %}</th> {% endifequal %} </tr> </thead> <tbody> {% for t in t_list %} <tr> <td> {% if b|is_editable:user %} <a href="{{ t.get_absolute_url }}"> {% endif %} <nobr><strong>{{ t }}</strong></nobr> {% if b|is_editable:user %} </a> {% endif %} </td> <td> <nobr> <i class="icon-time"></i> {{ t.date_created|date }} </nobr> </td> <td> {{ t.parameter }} </td> <td> {{ t.description|truncatewords:15|escape }} </td> {% with t.rd_file as f %} <td> <nobr> <a href="{{ f.get_absolute_url }}"> {{ f.name }} - {{ f.size|filesizeformat }} </a> </nobr> {% if b.gt_access == 20 or b|is_editable:user %} {% with t.gt_file as f %} </br> <nobr> <a href="{{ f.get_absolute_url }}"> {{ f.name }} - {{ f.size|filesizeformat }} </a> </nobr> {% endwith %} {% endif %} </td> {% endwith %} {% if b|is_editable:user %} <td> {% if t.is_validated %} <i class="icon-ok"></i> <strong style="color: green">VALID</strong> {% else %} <i class="icon-exclamation-sign"></i> <strong style="color: red">INVALID</strong> {% endif %} </td> {% endif %} </tr> {% endfor %} <tr> <td></td> <td></td> <td></td> <td></td> <td><a href="{% url b_dl_zip b.id %}">ZIP ARCHIVE</a></td> {% ifequal b.owner user %} <td></td>{% endifequal %} </tr> </tbody> </table> {% else %} <p>This benchmark has no trials yet.</p> {% ifequal b.owner request.user %} <p>You can add new trials by clicking on the "Create Trial" button above.</p> {% endifequal %} {% endif %} </section> <section> <h2>Supplementary Files <small>additional files describing the Benchmark</small> </h2> {% if b.datafile_set %} <table class="table table-striped table-condensed"> <thead> <tr> <th>{% trans "Name" %}</th> <th>{% trans "Filename" %}</th> <th>{% trans "Size" %}</th> <th>{% trans "Created" %}</th> {% if user.is_authenticated %} {% if b.added_by == user or user.is_superuser %} <th>{% trans "Actions" %}</th> {% endif %} {% endif %} </tr> </thead> <tbody> {% for d in b.datafile_set %} <tr> <td> <nobr>{{ d.name }}</nobr> </td> <td> <nobr> <a href="{{ d.get_absolute_url }}">{{ d.file.name }}</a> </nobr> </td> <td> {{ d.size|filesizeformat }} </td> <td> {% icn_time d %} </td> {% if user.is_authenticated %} {% if b.added_by == user or user.is_superuser %} <td> <form method="POST"> {% csrf_token %} <input type="hidden" name="s_id" value="{{ d.id }}"> <input type="submit" name="s_delete" value="delete"> </form> </td> {% endif %} {% endif %} </tr> {% endfor %} </tbody> </table> {% else %} <p>This Benchmark has no Supplementaries yet. {% if b|is_editable:user %} You can add new Supplementary Files by clicking on the "Create Supplementary" button under "Actions:" above. {% endif %} </p> {% endif %} </section> <section> <h2>Submit Evaluation <small>upload your spike sorting to start an Evaluation</small> </h2> {% if not user.is_authenticated %} <p>Please log in to submit for this Benchmark!</p> {% else %} {% if b.trial_set.all %} <form method="POST" enctype="multipart/form-data" class="form form-horizontal well"> <fieldset> <legend>Submit Evaluation</legend> {% csrf_token %} {{ e_form|as_bootstrap }} <div class="form-actions" style="clear: both;"> <input type="submit" class="btn btn-primary" name="e_submit" value="{% trans 'Submit Evaluations' %}"/> </div> </fieldset> </form> {% else %} There are no Trials for this Benchmark yet! {% endif %} {% endif %} </section> {% endblock %} {% block extra_body %} <script type="text/javascript"> $(document).ready(function () { $('#edit-benchmark-toggle').click(function () { $('#create-trial').hide(); $('#create-suppl').hide(); $('#edit-benchmark').toggle(); return false; }); if ($('#edit-benchmark .error').length) { $('#edit-benchmark').show(); $('#edit-benchmark .error').autoscroll(); } ; $('#create-trial-toggle').click(function () { $('#edit-benchmark').hide(); $('#create-suppl').hide(); $('#create-trial').toggle(); return false; }); if ($('#create-trial .error').length) { $('#create-trial').show(); $('#create-trial .error').autoscroll(); } ; $('#create-suppl-toggle').click(function () { $('#edit-benchmark').hide(); $('#create-trial').hide(); $('#create-suppl').toggle(); return false; }); if ($('#create-suppl .error').length) { $('#create-suppl').show(); $('#create-suppl .error').autoscroll(); } ; }); </script> {% endblock %}