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

Display custom comment for out of range results #142

Merged
merged 4 commits into from
Sep 1, 2023
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
1 change: 1 addition & 0 deletions docs/Changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
2.5.0 (unreleased)
------------------

- #142 Display custom comment for out of range results
- #141 Display reportable interim fields as result variables in results report
- #140 Refactor report sections into separate components

Expand Down
24 changes: 18 additions & 6 deletions src/senaite/impress/analysisrequest/templates/results.pt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<span i18n:translate="">Range</span>
</th>
<th class="outofrange">
<span i18n:translate=""></span>
<span/>
</th>
</tr>
</thead>
Expand Down Expand Up @@ -93,14 +93,26 @@
<span tal:content="python:'(RT)' if model.is_retest(analysis) else ''"></span>
<span tal:content="python:model.get_formatted_specs(analysis)">50 - 60</span>
</td>
<td class="text-center align-middle">
<span tal:condition="python:model.is_out_of_range(analysis)"
class="font-weight-light">
<span class="outofrange text-danger"

<!-- Out of range column -->
<td class="text-center align-middle"
tal:define="out_of_range python: model.is_out_of_range(analysis);
results_range python: analysis.getResultsRange();
comment python: results_range.get('rangecomment');">
<tal:out_of_range condition="out_of_range">

<!-- Out of range symbol -->
<span class="font-weight-light outofrange text-danger"
style="font-family:Lucida Console, Courier, monospace;"
tal:content="outofrange_symbol">
</span>
</span>

<!-- Out-of-range comment -->
<span class="text-danger small"
tal:condition="comment" tal:content="comment"/>

</tal:out_of_range>

</td>
</tr>
</tal:analyses>
Expand Down