Skip to content

Commit

Permalink
Correct html titles for algorithms app (#3619)
Browse files Browse the repository at this point in the history
This is part of Task 2 under issue
#3556 aiming to make
sure the titles are clear and correct.

Each app will have a PR to make sure titles are clear and correct for
all pages that have breadcrumbs as described in issue
#3556
  • Loading branch information
ammar257ammar authored Oct 21, 2024
1 parent ca5cc83 commit 1fbfe03
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }} {% else %} - Algorithms {% endif %} - {{ block.super }}
{% endblock %}

{% block breadcrumbs %}
Expand All @@ -14,7 +14,7 @@
href="{{ object.get_absolute_url }}">{{ object }}</a></li>
{% endif %}
<li class="breadcrumb-item active"
aria-current="page">{{ object|yesno:"Update,Create"}}</li>
aria-current="page">{{ object|yesno:"Update,Create Algorithm" }}</li>
</ol>
{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
href="{{ algorithm.get_absolute_url }}">{{ algorithm.title }}
</a></li>
<li class="breadcrumb-item active"
aria-current="page">Create image
aria-current="page">Create Image
</li>
</ol>
{% endblock %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load url %}

{% block title %}
Create Model - {{ algorithm.title }} - {{ block.super }}
{{ object|yesno:"Update,Create Model" }} {% if object %} - {{ object }} {% else %} - {{ algorithm.title }} {% endif %} - {{ block.super }}
{% endblock %}

{% block breadcrumbs %}
Expand All @@ -13,8 +13,12 @@
<li class="breadcrumb-item"><a
href="{{ algorithm.get_absolute_url }}">{{ algorithm.title }}
</a></li>
{% if object %}
<li class="breadcrumb-item"><a
href="{{ object.get_absolute_url }}">{{ object }}</a></li>
{% endif %}
<li class="breadcrumb-item active"
aria-current="page">Create model
aria-current="page">{{ object|yesno:"Update,Create Model" }}
</li>
</ol>
{% endblock %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
{{ permission_request|yesno:"Access Request,Request Access" }} - {{ algorithm.title }} - {{ block.super }}
{% endblock %}

{% block breadcrumbs %}
{% get_obj_perms request.user for algorithm as "algorithm_perms" %}
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'algorithms:list' %}">Algorithms</a>
</li>
Expand All @@ -18,11 +16,7 @@
</a></li>
<li class="breadcrumb-item active"
aria-current="page">
{% if "change_algorithm" in algorithm_perms %}
Review access request
{% else %}
Request access
{% endif %}
{{ permission_request|yesno:"Access Request,Request Access" }}
</li>
</ol>
{% endblock %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<li class="breadcrumb-item"><a
href="{{ algorithm.get_absolute_url }}">{{ algorithm.title }}</a></li>
<li class="breadcrumb-item active"
aria-current="page">Permission requests
aria-current="page">Permission Requests
</li>
</ol>
{% endblock %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand All @@ -17,7 +17,7 @@
<li class="breadcrumb-item"><a
href="{% url 'algorithms:job-list' slug=object.algorithm_image.algorithm.slug %}">Results</a></li>
<li class="breadcrumb-item"><a href="{{ object.get_absolute_url }}">{{ object.pk }}</a></li>
<li class="breadcrumb-item active" aria-current="page">Create a Display Set</li>
<li class="breadcrumb-item active" aria-current="page">Create a Display Set from Result</li>
</ol>
{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</a>
</li>
<li class="breadcrumb-item active"
aria-current="page">Algorithm model version management
aria-current="page">Algorithm Model Version Management
</li>
</ol>
{% endblock %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'algorithms:list' %}">Algorithms</a></li>
<li class="breadcrumb-item"><a href="{{ object.get_absolute_url }}">{% firstof object.title object %}</a></li>
<li class="breadcrumb-item active" aria-current="page">Add user</li>
<li class="breadcrumb-item active" aria-current="page">Add User</li>
</ol>
{% endblock %}

0 comments on commit 1fbfe03

Please sign in to comment.