From 3feb26cb8c5c01ef6ff9c61212dd80c409dccd7e Mon Sep 17 00:00:00 2001 From: Ammar Ammar <43293485+ammar257ammar@users.noreply.github.com> Date: Mon, 14 Oct 2024 09:04:39 +0000 Subject: [PATCH 1/6] Clean HTML titles for algorithms app --- .../templates/algorithms/algorithm_form.html | 4 ++-- .../templates/algorithms/algorithmmodel_form.html | 8 ++++++-- .../algorithms/algorithmpermissionrequest_form.html | 10 ++-------- .../algorithms/display_set_from_job_form.html | 2 +- .../algorithms/templates/algorithms/job_detail.html | 2 +- .../templates/algorithms/job_form_update.html | 2 +- .../templates/algorithms/job_progress_detail.html | 4 ++-- .../templates/algorithms/user_groups_form.html | 4 ++-- 8 files changed, 17 insertions(+), 19 deletions(-) diff --git a/app/grandchallenge/algorithms/templates/algorithms/algorithm_form.html b/app/grandchallenge/algorithms/templates/algorithms/algorithm_form.html index 2342d14a6..870321ccb 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/algorithm_form.html +++ b/app/grandchallenge/algorithms/templates/algorithms/algorithm_form.html @@ -3,7 +3,7 @@ {% load url %} {% block title %} - {{ object|yesno:"Update,Create" }} -{% if object %} {{ object }} -{% endif %} {{ block.super }} + {{ object|yesno:"Update,Create Algorithm" }} {% if object %} {{ object }} {% endif %} - Algorithms - {{ block.super }} {% endblock %} {% block breadcrumbs %} @@ -14,7 +14,7 @@ href="{{ object.get_absolute_url }}">{{ object }} {% endif %} + aria-current="page">{{ object|yesno:"Update,Create Algorithm"}} {% endblock %} diff --git a/app/grandchallenge/algorithms/templates/algorithms/algorithmmodel_form.html b/app/grandchallenge/algorithms/templates/algorithms/algorithmmodel_form.html index 9b8f9ee86..11853e234 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/algorithmmodel_form.html +++ b/app/grandchallenge/algorithms/templates/algorithms/algorithmmodel_form.html @@ -3,7 +3,7 @@ {% load url %} {% block title %} - Create Model - {{ algorithm.title }} - {{ block.super }} + {{ object|yesno:"Update,Create Model" }} {% if object %} {{ object }} {% endif %} - {{ algorithm.title }} - {{ block.super }} {% endblock %} {% block breadcrumbs %} @@ -13,8 +13,12 @@ + {% if object %} + + {% endif %} {% endblock %} diff --git a/app/grandchallenge/algorithms/templates/algorithms/algorithmpermissionrequest_form.html b/app/grandchallenge/algorithms/templates/algorithms/algorithmpermissionrequest_form.html index 2f3f17df1..1f42e39c4 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/algorithmpermissionrequest_form.html +++ b/app/grandchallenge/algorithms/templates/algorithms/algorithmpermissionrequest_form.html @@ -4,12 +4,10 @@ {% load guardian_tags %} {% block title %} - {% get_obj_perms request.user for algorithm as "algorithm_perms" %} - {% if "change_algorithm" in algorithm_perms %}Review Access Request{% else %}Request Access{% endif %} - {{ algorithm.title }} - {{ block.super }} + Access Request - {{ algorithm.title }} - {{ block.super }} {% endblock %} {% block breadcrumbs %} - {% get_obj_perms request.user for algorithm as "algorithm_perms" %} {% endblock %} diff --git a/app/grandchallenge/algorithms/templates/algorithms/display_set_from_job_form.html b/app/grandchallenge/algorithms/templates/algorithms/display_set_from_job_form.html index 0ad7a8180..b4626ad50 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/display_set_from_job_form.html +++ b/app/grandchallenge/algorithms/templates/algorithms/display_set_from_job_form.html @@ -3,7 +3,7 @@ {% load url %} {% block title %} - Create a Display Set - {{ object.pk }} - {{ block.super }} + Create a Display Set from Result {{ object.pk }} - {{ object.algorithm_image.algorithm.title }} - {{ block.super }} {% endblock %} {% block breadcrumbs %} diff --git a/app/grandchallenge/algorithms/templates/algorithms/job_detail.html b/app/grandchallenge/algorithms/templates/algorithms/job_detail.html index 0632dd60a..f7b270f06 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/job_detail.html +++ b/app/grandchallenge/algorithms/templates/algorithms/job_detail.html @@ -12,7 +12,7 @@ {% load civ %} {% block title %} - {{ object.pk }} - Results - {{ block.super }} + Result {{ object.pk }} - {{ object.algorithm_image.algorithm.title }} - {{ block.super }} {% endblock %} {% block breadcrumbs %} diff --git a/app/grandchallenge/algorithms/templates/algorithms/job_form_update.html b/app/grandchallenge/algorithms/templates/algorithms/job_form_update.html index e9ae4e07d..427ee07f9 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/job_form_update.html +++ b/app/grandchallenge/algorithms/templates/algorithms/job_form_update.html @@ -3,7 +3,7 @@ {% load url %} {% block title %} - Update - {{ object.pk }} - {{ block.super }} + Update Result {{ object.pk }} - {{ object.algorithm_image.algorithm.title }} - {{ block.super }} {% endblock %} {% block breadcrumbs %} diff --git a/app/grandchallenge/algorithms/templates/algorithms/job_progress_detail.html b/app/grandchallenge/algorithms/templates/algorithms/job_progress_detail.html index 2d8f2d8d2..3902a9435 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/job_progress_detail.html +++ b/app/grandchallenge/algorithms/templates/algorithms/job_progress_detail.html @@ -2,7 +2,7 @@ {% load static %} {% block title %} - Progress - {{ object.pk }} - {{ block.super }} + Job Progress {{ object.pk }} - {{ object.algorithm_image.algorithm.title }} - {{ block.super }} {% endblock %} {% block breadcrumbs %} @@ -17,7 +17,7 @@ href="{% url 'algorithms:job-list' slug=object.algorithm_image.algorithm.slug %}">Results {% endblock %} diff --git a/app/grandchallenge/algorithms/templates/algorithms/user_groups_form.html b/app/grandchallenge/algorithms/templates/algorithms/user_groups_form.html index fbd04fc71..4798d064d 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/user_groups_form.html +++ b/app/grandchallenge/algorithms/templates/algorithms/user_groups_form.html @@ -2,13 +2,13 @@ {% load url %} {% block title %} - Add user - {% firstof object.title object %} - {{ block.super }} + Add User - {% firstof object.title object %} - {{ block.super }} {% endblock %} {% block breadcrumbs %} {% endblock %} From e8bffd068ef457a680758ffda9de866e7e420785 Mon Sep 17 00:00:00 2001 From: Ammar Ammar <43293485+ammar257ammar@users.noreply.github.com> Date: Mon, 14 Oct 2024 09:26:10 +0000 Subject: [PATCH 2/6] Fix whitespaces --- .../algorithms/templates/algorithms/algorithm_form.html | 2 +- .../algorithms/templates/algorithms/job_detail.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/grandchallenge/algorithms/templates/algorithms/algorithm_form.html b/app/grandchallenge/algorithms/templates/algorithms/algorithm_form.html index 870321ccb..d96be6135 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/algorithm_form.html +++ b/app/grandchallenge/algorithms/templates/algorithms/algorithm_form.html @@ -14,7 +14,7 @@ href="{{ object.get_absolute_url }}">{{ object }} {% endif %} + aria-current="page">{{ object|yesno:"Update,Create Algorithm" }} {% endblock %} diff --git a/app/grandchallenge/algorithms/templates/algorithms/job_detail.html b/app/grandchallenge/algorithms/templates/algorithms/job_detail.html index f7b270f06..7d9770b5b 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/job_detail.html +++ b/app/grandchallenge/algorithms/templates/algorithms/job_detail.html @@ -12,7 +12,7 @@ {% load civ %} {% block title %} - Result {{ object.pk }} - {{ object.algorithm_image.algorithm.title }} - {{ block.super }} + Result {{ object.pk }} - {{ object.algorithm_image.algorithm.title }} - {{ block.super }} {% endblock %} {% block breadcrumbs %} From 82601477e94275ad54222f42d4311db8c287fd8d Mon Sep 17 00:00:00 2001 From: Ammar Ammar <43293485+ammar257ammar@users.noreply.github.com> Date: Mon, 14 Oct 2024 10:28:15 +0000 Subject: [PATCH 3/6] Update title for permissionreques view --- .../templates/algorithms/algorithmpermissionrequest_form.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/grandchallenge/algorithms/templates/algorithms/algorithmpermissionrequest_form.html b/app/grandchallenge/algorithms/templates/algorithms/algorithmpermissionrequest_form.html index 1f42e39c4..43cefe692 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/algorithmpermissionrequest_form.html +++ b/app/grandchallenge/algorithms/templates/algorithms/algorithmpermissionrequest_form.html @@ -4,7 +4,7 @@ {% load guardian_tags %} {% block title %} - Access Request - {{ algorithm.title }} - {{ block.super }} + {{ permission_request|yesno:"Access Request,Request Access" }} - {{ algorithm.title }} - {{ block.super }} {% endblock %} {% block breadcrumbs %} @@ -16,7 +16,7 @@ {% endblock %} From 1d27daab1b5759da2935581aa40d6f30c986d62d Mon Sep 17 00:00:00 2001 From: Ammar Ammar <43293485+ammar257ammar@users.noreply.github.com> Date: Tue, 15 Oct 2024 08:56:29 +0000 Subject: [PATCH 4/6] Update titles --- .../algorithms/templates/algorithms/algorithmimage_form.html | 2 +- .../templates/algorithms/algorithmpermissionrequest_list.html | 2 +- .../templates/algorithms/display_set_from_job_form.html | 2 +- .../algorithms/templates/algorithms/job_detail.html | 2 +- .../algorithms/templates/algorithms/job_form_update.html | 2 +- .../algorithms/templates/algorithms/job_progress_detail.html | 2 +- .../algorithms/templates/algorithms/model_version_control.html | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/grandchallenge/algorithms/templates/algorithms/algorithmimage_form.html b/app/grandchallenge/algorithms/templates/algorithms/algorithmimage_form.html index 2748a9a60..5343922a9 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/algorithmimage_form.html +++ b/app/grandchallenge/algorithms/templates/algorithms/algorithmimage_form.html @@ -14,7 +14,7 @@ href="{{ algorithm.get_absolute_url }}">{{ algorithm.title }} {% endblock %} diff --git a/app/grandchallenge/algorithms/templates/algorithms/algorithmpermissionrequest_list.html b/app/grandchallenge/algorithms/templates/algorithms/algorithmpermissionrequest_list.html index 4cd8ffcbb..438c09acd 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/algorithmpermissionrequest_list.html +++ b/app/grandchallenge/algorithms/templates/algorithms/algorithmpermissionrequest_list.html @@ -17,7 +17,7 @@ {% endblock %} diff --git a/app/grandchallenge/algorithms/templates/algorithms/display_set_from_job_form.html b/app/grandchallenge/algorithms/templates/algorithms/display_set_from_job_form.html index b4626ad50..0ad7a8180 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/display_set_from_job_form.html +++ b/app/grandchallenge/algorithms/templates/algorithms/display_set_from_job_form.html @@ -3,7 +3,7 @@ {% load url %} {% block title %} - Create a Display Set from Result {{ object.pk }} - {{ object.algorithm_image.algorithm.title }} - {{ block.super }} + Create a Display Set - {{ object.pk }} - {{ block.super }} {% endblock %} {% block breadcrumbs %} diff --git a/app/grandchallenge/algorithms/templates/algorithms/job_detail.html b/app/grandchallenge/algorithms/templates/algorithms/job_detail.html index 7d9770b5b..0632dd60a 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/job_detail.html +++ b/app/grandchallenge/algorithms/templates/algorithms/job_detail.html @@ -12,7 +12,7 @@ {% load civ %} {% block title %} - Result {{ object.pk }} - {{ object.algorithm_image.algorithm.title }} - {{ block.super }} + {{ object.pk }} - Results - {{ block.super }} {% endblock %} {% block breadcrumbs %} diff --git a/app/grandchallenge/algorithms/templates/algorithms/job_form_update.html b/app/grandchallenge/algorithms/templates/algorithms/job_form_update.html index 427ee07f9..e9ae4e07d 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/job_form_update.html +++ b/app/grandchallenge/algorithms/templates/algorithms/job_form_update.html @@ -3,7 +3,7 @@ {% load url %} {% block title %} - Update Result {{ object.pk }} - {{ object.algorithm_image.algorithm.title }} - {{ block.super }} + Update - {{ object.pk }} - {{ block.super }} {% endblock %} {% block breadcrumbs %} diff --git a/app/grandchallenge/algorithms/templates/algorithms/job_progress_detail.html b/app/grandchallenge/algorithms/templates/algorithms/job_progress_detail.html index 3902a9435..23fc318ac 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/job_progress_detail.html +++ b/app/grandchallenge/algorithms/templates/algorithms/job_progress_detail.html @@ -2,7 +2,7 @@ {% load static %} {% block title %} - Job Progress {{ object.pk }} - {{ object.algorithm_image.algorithm.title }} - {{ block.super }} + Job Progress - {{ object.pk }} - {{ block.super }} {% endblock %} {% block breadcrumbs %} diff --git a/app/grandchallenge/algorithms/templates/algorithms/model_version_control.html b/app/grandchallenge/algorithms/templates/algorithms/model_version_control.html index a1f3d800b..68281733e 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/model_version_control.html +++ b/app/grandchallenge/algorithms/templates/algorithms/model_version_control.html @@ -15,7 +15,7 @@ {% endblock %} From f2f8375ba58ba4565715771694e19e3878852274 Mon Sep 17 00:00:00 2001 From: Ammar Ammar <43293485+ammar257ammar@users.noreply.github.com> Date: Wed, 16 Oct 2024 07:22:24 +0000 Subject: [PATCH 5/6] Update titles --- .../templates/algorithms/display_set_from_job_form.html | 4 ++-- .../algorithms/templates/algorithms/job_progress_detail.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/grandchallenge/algorithms/templates/algorithms/display_set_from_job_form.html b/app/grandchallenge/algorithms/templates/algorithms/display_set_from_job_form.html index 0ad7a8180..39c549353 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/display_set_from_job_form.html +++ b/app/grandchallenge/algorithms/templates/algorithms/display_set_from_job_form.html @@ -3,7 +3,7 @@ {% load url %} {% block title %} - Create a Display Set - {{ object.pk }} - {{ block.super }} + Create a Display Set from Result - {{ object.pk }} - {{ block.super }} {% endblock %} {% block breadcrumbs %} @@ -17,7 +17,7 @@ - + {% endblock %} diff --git a/app/grandchallenge/algorithms/templates/algorithms/job_progress_detail.html b/app/grandchallenge/algorithms/templates/algorithms/job_progress_detail.html index 23fc318ac..2d8f2d8d2 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/job_progress_detail.html +++ b/app/grandchallenge/algorithms/templates/algorithms/job_progress_detail.html @@ -2,7 +2,7 @@ {% load static %} {% block title %} - Job Progress - {{ object.pk }} - {{ block.super }} + Progress - {{ object.pk }} - {{ block.super }} {% endblock %} {% block breadcrumbs %} @@ -17,7 +17,7 @@ href="{% url 'algorithms:job-list' slug=object.algorithm_image.algorithm.slug %}">Results {% endblock %} From bd5a16e58ef00b814096c56df592701bf52abf23 Mon Sep 17 00:00:00 2001 From: Ammar Ammar <43293485+ammar257ammar@users.noreply.github.com> Date: Wed, 16 Oct 2024 14:02:50 +0000 Subject: [PATCH 6/6] Update form templates titles --- .../algorithms/templates/algorithms/algorithm_form.html | 2 +- .../algorithms/templates/algorithms/algorithmmodel_form.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/grandchallenge/algorithms/templates/algorithms/algorithm_form.html b/app/grandchallenge/algorithms/templates/algorithms/algorithm_form.html index d96be6135..13fec064b 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/algorithm_form.html +++ b/app/grandchallenge/algorithms/templates/algorithms/algorithm_form.html @@ -3,7 +3,7 @@ {% load url %} {% block title %} - {{ object|yesno:"Update,Create Algorithm" }} {% if object %} {{ object }} {% endif %} - Algorithms - {{ block.super }} + {{ object|yesno:"Update,Create Algorithm" }} {% if object %} - {{ object }} {% else %} - Algorithms {% endif %} - {{ block.super }} {% endblock %} {% block breadcrumbs %} diff --git a/app/grandchallenge/algorithms/templates/algorithms/algorithmmodel_form.html b/app/grandchallenge/algorithms/templates/algorithms/algorithmmodel_form.html index 11853e234..2979ea8c0 100644 --- a/app/grandchallenge/algorithms/templates/algorithms/algorithmmodel_form.html +++ b/app/grandchallenge/algorithms/templates/algorithms/algorithmmodel_form.html @@ -3,7 +3,7 @@ {% load url %} {% block title %} - {{ object|yesno:"Update,Create Model" }} {% if object %} {{ object }} {% endif %} - {{ algorithm.title }} - {{ block.super }} + {{ object|yesno:"Update,Create Model" }} {% if object %} - {{ object }} {% else %} - {{ algorithm.title }} {% endif %} - {{ block.super }} {% endblock %} {% block breadcrumbs %}