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

Added Accredited symbol in Analyses listings #1483

Merged
merged 1 commit into from
Nov 28, 2019
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 CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Changelog

**Added**

- #1483 Added Accredited symbol in Analyses listings
- #1466 Support for "readonly" and "hidden" visibility modes in ReferenceWidget


Expand Down
10 changes: 10 additions & 0 deletions bika/lims/browser/analyses/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,8 @@ def folderitem(self, obj, item, index):
self._folder_item_verify_icons(obj, item)
# Fill worksheet anchor/icon
self._folder_item_assigned_worksheet(obj, item)
# Fill accredited icon
self._folder_item_accredited_icon(obj, item)
# Fill reflex analysis icons
self._folder_item_reflex_icons(obj, item)
# Fill hidden field (report visibility)
Expand Down Expand Up @@ -1162,6 +1164,14 @@ def _folder_item_reflex_icons(self, analysis_brain, item):
title=t(_('It comes form a reflex rule')))
self._append_html_element(item, 'Service', img)

def _folder_item_accredited_icon(self, analysis_brain, item):
"""Adds an icon to the item dictionary if it is an accredited analysis
"""
full_obj = self.get_object(analysis_brain)
if full_obj.getAccredited():
img = get_image("accredited.png", title=t(_("Accredited")))
self._append_html_element(item, "Service", img)

def _folder_item_report_visibility(self, analysis_brain, item):
"""Set if the hidden field can be edited (enabled/disabled)

Expand Down