-
-
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
Display the Unit in Profile Analyses Listing #659
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 a small change re categories sorting
items[x]['allow_edit'] = ['Hidden', ] | ||
items[x]['Hidden'] = ser.get('hidden', obj.getHidden()) | ||
|
||
self.allow_edit = "LabManager" in roles or "Manager" in roles | ||
self.categories.sort() |
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.
I think this self.categories.sort()
does nothing here in before_render
. Since we don't have an after_render
function (that would be nice), the best option would be to add the folderitems
function, call super and sort the categories thereafter. Is not elegant, I know, but at least the Analysis Categories will appear sorted alphabetically when "Categorize Analysis Services" is enabled. With this code, the categories will appear in the order the analyses are retrieved (by sortable_title
) which is not bad, but is not consistent with the rest.
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.
good catch, thanks, I'll change that
Description of the issue/feature this PR addresses
Linked issue: #656
Also refactored and PEP8'ified AnalysisProfileAnalysesView
Current behavior before PR
Unit is not displayed in Analyses Listing of Profiles
Desired behavior after PR is merged
Unit is displayed in Analyses Listing of Profiles
--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.