blob: f2bfa0885c9a24e779be63a1148c66a4bc3d7e4b [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
{% extends "experimentpage.html" %}
{% block content %}
<form id="add_task_form" method="get" action="{% url 'exp_portal:add_task' %}">
{% csrf_token %}
<button class="btn btn-default btn-lg" type="submit">Add Task</button>
</form>
<div class="col-md-15">
{% for dataset in datasets %}
{% if dataset.optask_set.count > 0 %}
<h2>Tasks for {{dataset.name}}</h2>
<table class="table table-hover table-condensed">
<thead>
<tr>
<th>Item</th>
<th>Active</th>
<th>Task name</th>
<!-- <th>Challenge Problem</th> -->
<th>Task URL</th>
<th>Exit Survey URL</th>
</tr>
</thead>
<tbody>
{% for task in dataset.optask_set.all %}
<tr>
<td>
{{ forloop.counter }}
</td>
<td>
{% if task.is_active %}
<span class="glyphicon glyphicon-ok" style="color:green"></span>
{% else %}
<span class="glyphicon glyphicon-remove" style="color:red"></span>
{% endif %}
<td>
<a href="{% url 'exp_portal:view_task_details' taskname=task.name %}">
{{ task.name }}
</a>
</td>
<!-- <td>
{{task.dataset.name}}
</td> -->
<td>
<a href="{{ task.survey_url }}" target='_blank'>
{{ task.survey_url }}
</a>
</td>
<td>
<a href="{{ task.exit_url }}" target='_blank'>
{{ task.exit_url }}
</a>
</td>
<!-- <td>
<form id="delete_task_form" method="POST"
action="{% url 'exp_portal:delete_task' taskpk=task.pk %}">
{% csrf_token %}
<button class="btn btn-danger" type="submit">Delete</button>
</form>
</td> -->
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endfor %}
</div>
{% endblock %}