Back

Template Source: spike_eval/evaluation/algo_list.html

{% extends "spike_eval/evaluation/base_algo.html" %} {% load i18n %} {% load bootstrap_tags %} {% load pagination_tags %} {% load sorting_tags %} {% load spike_eval_tags %} {% load taggit_extras %} {% block head_title %}{% trans "Algorithms" %}{% endblock %} {% block content %} {% if user.is_authenticated %} <section class="well"> <form class="actions"> <span class="label">Actions:</span> <a class="btn btn-mini" onclick="$('#create-algorithm').toggle();">Create Algorithm</a> <a class="btn btn-mini" onclick="$('#tagcloud').toggle();">Show Tagcloud</a> </form> <form id="create-algorithm" class="form form-horizontal" method="POST" {% if not a_form.errors %}style="display:none"{% endif %}> <fieldset> <legend>Create Algorithm</legend> {% csrf_token %} {{ a_form|as_bootstrap }} <div class="form-actions"> <input type="submit" class="btn btn-primary" value="{% trans 'Create Algorithm' %}"/> </div> </fieldset> </form> </section> {% endif %} <section id="tagcloud" style="display: none;"> <h2>Algorithm Tagcloud <small>visualisation of the Algorithm tag space</small> </h2> <div class="well"> {% include_tagcloud 'evaluation.Algorithm' %} </div> </section> {% if a_list_self %} <section> <h2>Algorithm List ({% icn_profile user %}) <small>only your Algorithms are listed here</small> </h2> {% autosort a_list_self %} {% autopaginate a_list_self 20 %} <table class="table table-striped table-condensed"> <thead> <tr> <th>{% trans "Algorithm" %}</th> <th>{% trans "Owner" %}</th> <th>{% trans "Date" %}</th> </tr> </thead> <tbody> {% for a in a_list_self %} <tr> <td> <a href="{{ a.get_absolute_url }}">{{ a.name }}</a> </td> <td> {% icn_profile a %} </td> <td> {% icn_time a %} </td> </tr> {% endfor %} </tbody> </table> {% paginate %} </section> {% endif %} <section> <h2>Algorithm List <small>public Algorithms are listed here</small> </h2> {% if not a_list %} <p>There are no public Algorithms available.</p> {% else %} {% autosort a_list %} {% autopaginate a_list 20 %} <form class="form" method="GET"> <div class="control-group"> <div class="controls"> <div class="input-prepend input-append"> <span class="add-on"><i class="icon-search"></i></span> <input type="text" name="search" value="{{ search_terms }}" class="input-medium search-query"/> <input class="btn" type="submit" value="Search"/> {% if search_terms %} <a class="btn" href="{% clear_search_url request %}">Clear</a> {% endif %} </div> </div> <div class="controls"> <i class="icon-filter"></i> {% anchor name Algorithm %} {% anchor added_by__username Owner %} {% anchor date_created Date %} </div> </div> </form> <table class="table table-striped table-condensed"> <thead> <tr> <th>{% trans "Algorithm" %}</th> <th>{% trans "Owner" %}</th> <th>{% trans "Date" %}</th> </tr> </thead> <tbody> {% for a in a_list %} <tr> <td> <a href="{{ a.get_absolute_url }}">{{ a.name }}</a> </td> <td> {% icn_profile a %} </td> <td> {% icn_time a %} </td> </tr> {% endfor %} </tbody> </table> {% paginate %} {% endif %} </section> {% endblock %}