Skip to content

Commit

Permalink
Display custom comment for out of range results (senaite#142)
Browse files Browse the repository at this point in the history
* Show range comment in results report

* Better styling

* Better text styling (2)

* Changelog
  • Loading branch information
xispa authored Sep 1, 2023
1 parent f428c74 commit 157d12a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
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

0 comments on commit 157d12a

Please sign in to comment.