-
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 'main' into flexible-file
- Loading branch information
Showing
16 changed files
with
520 additions
and
33 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
19 changes: 19 additions & 0 deletions
19
app/grandchallenge/challenges/migrations/0049_alter_onboardingtask_options.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,19 @@ | ||
# Generated by Django 4.2.18 on 2025-02-06 15:26 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
( | ||
"challenges", | ||
"0048_onboardingtask_onboardingtaskgroupobjectpermission", | ||
), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name="onboardingtask", | ||
options={}, | ||
), | ||
] |
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
11 changes: 11 additions & 0 deletions
11
app/grandchallenge/challenges/static/js/challenges/challengeonboardingtask_list_table.mjs
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,11 @@ | ||
$(document).ready(() => { | ||
$("#onboardingTasksTable").DataTable({ | ||
order: [ | ||
[0, "asc"], | ||
[5, "asc"], | ||
], | ||
paging: false, | ||
info: false, | ||
searching: false, | ||
}); | ||
}); |
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
114 changes: 114 additions & 0 deletions
114
app/grandchallenge/challenges/templates/challenges/onboardingtask_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,114 @@ | ||
{% extends "pages/challenge_settings_base.html" %} | ||
{% load user_profile_link from profiles %} | ||
{% load url %} | ||
{% load static %} | ||
{% load dict_lookup %} | ||
{% load humanize %} | ||
{% load guardian_tags %} | ||
|
||
{% block title %} | ||
Onboarding Tasks - {% firstof challenge.title challenge.short_name %} - {{ block.super }} | ||
{% endblock %} | ||
|
||
{% block breadcrumbs %} | ||
<ol class="breadcrumb"> | ||
<li class="breadcrumb-item"><a | ||
href="{% url 'challenges:list' %}">Challenges</a> | ||
</li> | ||
<li class="breadcrumb-item"><a | ||
href="{{ challenge.get_absolute_url }}">{% firstof challenge.title challenge.short_name %}</a></li> | ||
<li class="breadcrumb-item active" | ||
aria-current="page">Onboarding Tasks</li> | ||
</ol> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
|
||
|
||
<h2>Onboarding Tasks for {{ challenge.short_name }}</h2> | ||
|
||
{% if all_tasks_are_complete %} | ||
<p> | ||
<h4>All onboarding tasks are complete.</h4> | ||
</p> | ||
{% endif %} | ||
|
||
<div class="table-responsive"> | ||
<table class="table table-hover table-borderless table-sm w-100" id="onboardingTasksTable"> | ||
<thead class="thead-light"> | ||
<tr> | ||
<th class="text-center">Status</th> | ||
<th class="nonSortable">Title</th> | ||
<th class="nonSortable">Description</th> | ||
<th class="text-right">Due</th> | ||
<th>Action</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for task in object_list %} | ||
|
||
<tr> | ||
|
||
<td data-order="{{ task.complete|yesno:'1,0' }}" class="align-middle text-center"> | ||
{% if task.complete %} | ||
<i class="fas fa-check-circle fa-fw text-success" title="Completed!"></i> | ||
{% elif task.is_overdue_soon %} | ||
<i class="far fa-circle fa-fw text-warning" title="Overdue soon!"></i> | ||
{% elif task.is_overdue %} | ||
<i class="far fa-circle fa-fw text-danger" title="Overdue!"></i> | ||
{% else %} | ||
<i class="far fa-circle fa-fw text-muted" title="Not yet completed"></i> | ||
{% endif %} | ||
</td> | ||
<td class="align-middle"> | ||
{{ task.title }} | ||
</td> | ||
<td class="align-middle"> | ||
|
||
{{ task.description }} | ||
</td> | ||
<td title="{{ task.deadline }}" | ||
data-order="{{ task.deadline|date:"U" }}" | ||
class="align-middle text-nowrap text-right" | ||
style="{{ task.complete|yesno:'text-decoration: line-through;,' }}" | ||
> | ||
{{ task.deadline|naturaltime }} | ||
{% if task.is_overdue_soon %} | ||
<i class="fas fa-exclamation-triangle text-warning"></i> | ||
{% elif task.is_overdue %} | ||
<i class="fas fa-exclamation-triangle text-danger"></i> | ||
{% endif %} | ||
|
||
</td> | ||
<td class="align-middle text-nowrap"> | ||
<form method="post" | ||
action="{% url 'challenge-onboarding-task-complete' challenge_short_name=challenge.short_name pk=task.pk %}"> | ||
{% csrf_token %} | ||
<input type="hidden" | ||
name="complete" | ||
value="{{ task.complete|yesno:'false,true' }}" | ||
> | ||
{% if task.complete %} | ||
<button type="submit" | ||
class="btn btn-xs btn-danger" | ||
title="Mark as incomplete"> | ||
<i class="fas fa-undo fa-fw"></i> Undo Complete | ||
</button> | ||
{% else %} | ||
<button type="submit" class="btn btn-success"> | ||
<i class="fas fa-check-circle fa-fw"></i> Mark Complete | ||
</button> | ||
{% endif %} | ||
</form> | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
{% endblock %} | ||
|
||
{% block script %} | ||
{{ block.super }} | ||
<script type="module" src="{% static 'js/challenges/challengeonboardingtask_list_table.mjs' %}"></script> | ||
{% endblock %} |
11 changes: 11 additions & 0 deletions
11
...dchallenge/challenges/templates/challenges/partials/challenge_onboardingtask_overdue.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,11 @@ | ||
{% if aggregates.num_is_overdue > 0 %} | ||
<span class="badge badge-pill badge-danger align-middle" title="Onboarding tasks overdue"> | ||
{{ aggregates.num_is_overdue }} | ||
</span> | ||
{% endif %} | ||
|
||
{% if aggregates.num_is_overdue_soon > 0 %} | ||
<span class="badge badge-pill badge-warning align-middle" title="Onboarding tasks due soon"> | ||
{{ aggregates.num_is_overdue_soon }} | ||
</span> | ||
{% endif %} |
Oops, something went wrong.