-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
Refactored and improved client folder listing view #690
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small comment re self.icon
'Fax', ] | ||
}, | ||
self.icon = "{}/{}".format( | ||
self.portal_url, "++resource++bika.lims.images/client_big.png") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use this function https://github.com/senaite/senaite.core/blob/master/bika/lims/utils/__init__.py#L797-L808
self.icon = get_image("client_big.png")
("MemberDiscountApplies", { | ||
"toggle": False, | ||
"title": _("Member Discount")}), | ||
)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for toggling to False
those geographical things ;)
item["replace"]["EmailAddress"] = get_email_link(item["EmailAddress"]) | ||
# translate True/FALSE values | ||
item["replace"]["BulkDiscount"] = obj.getBulkDiscount() and _("Yes") or _("No") | ||
item["replace"]["MemberDiscountApplies"] = obj.getMemberDiscountApplies() and _("Yes") or _("No") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!. An "iconic" alternative could be:
img_url = get_image('ok.png')
item["replace"]["BulkDiscount"] = obj.getBulkDiscount() and img_icon or " "
...
Description of the issue/feature this PR addresses
Improves the client folder listing view (Mainly PEP8 and folder-item improvement)
Current behavior before PR
Not all columns were selectable and correctly rendered
Desired behavior after PR is merged
All available columns are selectable and correctly rendered
--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.