Skip to content

Commit 3012a8c

Browse files
committed
Submission check symbols should only be shown when the check returned a result, not otherwise.
- Legacy-Id: 10995
1 parent be2a228 commit 3012a8c

3 files changed

Lines changed: 14 additions & 11 deletions

File tree

ietf/submit/admin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def draft_link(self, instance):
2828
class SubmissionCheckAdmin(admin.ModelAdmin):
2929
list_display = ['submission', 'time', 'checker', 'passed', 'errors', 'warnings', 'items']
3030
raw_id_fields = ['submission']
31+
search_fields = ['submission__name']
3132
admin.site.register(SubmissionCheck, SubmissionCheckAdmin)
3233

3334
class PreapprovalAdmin(admin.ModelAdmin):

ietf/templates/doc/document_draft.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,13 @@
7777
(latest revision {{ latest_revision.time|date:"Y-m-d" }})
7878
{% endif %}
7979
{% for check in doc.submission.checks.all %}
80-
{% if check.errors or check.warnings %}
81-
<span class="checker-warning" title="Submission {{check.checker|title}} returned warnings or errors.">{{ check.symbol|safe }}</span>
82-
{% else %}
83-
<span class="checker-success" title="Submission {{check.checker|title}} passed">{{ check.symbol|safe }}</span>
84-
{% endif %}
80+
{% if check.passed != None and check.symbol.strip %}
81+
{% if check.errors or check.warnings %}
82+
<span class="checker-warning" title="Submission {{check.checker|title}} returned warnings or errors.">{{ check.symbol|safe }}</span>
83+
{% else %}
84+
<span class="checker-success" title="Submission {{check.checker|title}} passed">{{ check.symbol|safe }}</span>
85+
{% endif %}
86+
{% endif %}
8587
{% endfor %}
8688
</td>
8789
</tr>

ietf/templates/doc/search/search_result_row.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@
6060
</span>
6161

6262
{% for check in doc.submission.checks.all %}
63-
{% if check.symbol.strip %}
64-
{% if check.errors or check.warnings %}
65-
<span class="checker-warning pull-right" title="{{check.checker|title}} returned warnings or errors.">{{ check.symbol|safe }}</span>
66-
{% else %}
67-
<span class="checker-success pull-right" title="{{check.checker|title}} passed">{{ check.symbol|safe }}</span>
68-
{% endif %}
63+
{% if check.passed != None and check.symbol.strip %}
64+
{% if check.errors or check.warnings %}
65+
<span class="checker-warning pull-right" title="{{check.checker|title}} returned warnings or errors.">{{ check.symbol|safe }}</span>
66+
{% else %}
67+
<span class="checker-success pull-right" title="{{check.checker|title}} passed">{{ check.symbol|safe }}</span>
68+
{% endif %}
6969
{% endif %}
7070
{% endfor %}
7171

0 commit comments

Comments
 (0)