Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONCD-878 when there is nothing to work on, message should display #2444

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion concordia/templates/transcriptions/campaign_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ <h4 class="mb-3">Helpful Links</h4>
<div class="col-12 col-lg mt-4">
<h3>Filter pages:</h2>
</div>
{% if user.is_authenticated and user.is_staff and show_radio %}
{% if user.is_authenticated and user.is_staff %}
<div class="mt-4">
<input type="radio" {% if filter_assets %}onclick="window.location='?{{ sublevel_querystring }}'"{% else %}checked{% endif %}>
<label>Show all</label>
Expand Down Expand Up @@ -166,6 +166,8 @@ <h6 class="text-center primary-text m-0 concordia-object-card-title">
{% endif %}
</div>
</div>
{% empty %}
<div class="pt-3">There are no pages you can review. Click show all to see pages you can read or edit.</div>
{% endfor %}
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion concordia/templates/transcriptions/item_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h1>{{ item.title }}</h1>
<div class="col-12 col-lg mt-4">
<h3>Filter pages:</h2>
</div>
{% if user.is_authenticated and user.is_staff and show_radio %}
{% if user.is_authenticated and user.is_staff %}
<div class="mt-4">
<input type="radio" {% if filter_assets %}onclick="window.location='{% url 'transcriptions:item-detail' campaign.slug project.slug item.item_id %}'"{% else %}checked{% endif %}>
<label>Show all</label>
Expand Down Expand Up @@ -82,6 +82,8 @@ <h3>Filter pages:</h2>
</div>
</div>
</div>
{% empty %}
<div class="pt-3">There are no pages you can review. Click show all to see pages you can read or edit.</div>
{% endfor %}
</div>
<div class="row mt-4">
Expand Down
4 changes: 3 additions & 1 deletion concordia/templates/transcriptions/project_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h1>{{ project.title }}</h1>
<div class="col-12 col-lg mt-4">
<h3>Filter pages:</h2>
</div>
{% if user.is_authenticated and user.is_staff and show_radio %}
{% if user.is_authenticated and user.is_staff %}
<div class="mt-4">
<input type="radio" onclick="window.location='{% url 'transcriptions:project-detail' campaign.slug project.slug %}'" {% if not filter_assets %}checked{% endif %}>
<label>Show all</label>
Expand Down Expand Up @@ -82,6 +82,8 @@ <h6 class="text-center primary-text m-0 concordia-object-card-title">
{% endif %}
</div>
</div>
{% empty %}
<div class="pt-3">There are no pages you can review. Click show all to see pages you can read or edit.</div>
{% endfor %}
</div>
<div class="row mt-4">
Expand Down
3 changes: 0 additions & 3 deletions concordia/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,6 @@ def calculate_asset_stats(asset_qs, ctx):

ctx["transcription_status_counts"] = labeled_status_counts = []

ctx["show_radio"] = False
for status_key, status_label in TranscriptionStatus.CHOICES:
value = status_counts_by_key.get(status_key, 0)
if value:
Expand All @@ -867,8 +866,6 @@ def calculate_asset_stats(asset_qs, ctx):
ctx[f"{status_key}_percent"] = pct
ctx[f"{status_key}_count"] = value
labeled_status_counts.append((status_key, status_label, value))
if status_key == "submitted" and value > 0:
ctx["show_radio"] = True


def annotate_children_with_progress_stats(children):
Expand Down
Loading