-
Notifications
You must be signed in to change notification settings - Fork 6
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
Plone 5 (tests OK) #20
base: master
Are you sure you want to change the base?
Conversation
This reverts commit b23ac41.
The new control panel uses javascript, which zope.testbrowser ignores.
Would you add Travis setup to confirm it works both under Plone 4.3 and 5 ? |
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.
Can you check my comments ?
if 'summary' in self.context.Schema()['description'].widget.label: | ||
key = 'summary' | ||
else: | ||
key = 'description' |
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.
We should keep the distinction between description and summary. The description field is still named summary in the "Page" content type.
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.
It is not the only place where keeping the distinction is needed.
<td tal:condition="python: field != 'Title' and field not in ['ModificationDate', | ||
'CreationDate', 'EffectiveDate', | ||
'ExpirationDate', ]" | ||
tal:content="value" |
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 prefer logic to be kept in view classes. Would it be possible to move this tal:condition
test to a method on a view class ?
tal:attributes="href obj_url; | ||
title obj_description;"> | ||
<img class="thumb-icon" | ||
tal:define="getIcon python:obj.getURL() +'/@@images/image/icon'" |
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.
python:
in the template is often a smell. I would compute the image URL in the view class.
Hello,
This is the same PR as #19, with working tests.
At first, I tried to fix the functional tests for the control panel, but the new select widget requires javascript, so I wrote robot tests instead.
zope.testbrowser documentation mentions this, but "zope.testbrowser.real" doesn't seem to exist: