Merge branch 'plip10359-z3cform'
This commit is contained in:
commit
c933d261e2
@ -4,6 +4,9 @@ Changelog
|
|||||||
2.4.0 (unreleased)
|
2.4.0 (unreleased)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
- Rename @@discussion-settings to @@discussion-controlpanel
|
||||||
|
[maartenkling]
|
||||||
|
|
||||||
- Add permission to allow comment authors to delete their own comments if
|
- Add permission to allow comment authors to delete their own comments if
|
||||||
there are no replies yet.
|
there are no replies yet.
|
||||||
[gaudenz]
|
[gaudenz]
|
||||||
@ -104,6 +107,7 @@ Changelog
|
|||||||
- Put defaultUser.png instead of old defaultUser.gif
|
- Put defaultUser.png instead of old defaultUser.gif
|
||||||
[bsuttor]
|
[bsuttor]
|
||||||
|
|
||||||
|
>>>>>>> master
|
||||||
- Remove bbb directory. bbb was never really implemented.
|
- Remove bbb directory. bbb was never really implemented.
|
||||||
[timo]
|
[timo]
|
||||||
|
|
||||||
|
@ -152,6 +152,13 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- Control panel -->
|
<!-- Control panel -->
|
||||||
|
<browser:page
|
||||||
|
name="discussion-controlpanel"
|
||||||
|
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
|
||||||
|
class=".controlpanel.DiscussionSettingsControlPanel"
|
||||||
|
permission="cmf.ManagePortal"
|
||||||
|
/>
|
||||||
|
<!-- Deprecated controlpanel url -->
|
||||||
<browser:page
|
<browser:page
|
||||||
name="discussion-settings"
|
name="discussion-settings"
|
||||||
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
|
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
|
||||||
|
@ -88,7 +88,7 @@ class DiscussionSettingsEditForm(controlpanel.RegistryEditForm):
|
|||||||
self.applyChanges(data)
|
self.applyChanges(data)
|
||||||
IStatusMessage(self.request).addStatusMessage(_(u"Changes saved"),
|
IStatusMessage(self.request).addStatusMessage(_(u"Changes saved"),
|
||||||
"info")
|
"info")
|
||||||
self.context.REQUEST.RESPONSE.redirect("@@discussion-settings")
|
self.context.REQUEST.RESPONSE.redirect("@@discussion-controlpanel")
|
||||||
|
|
||||||
@button.buttonAndHandler(_('Cancel'), name='cancel')
|
@button.buttonAndHandler(_('Cancel'), name='cancel')
|
||||||
def handleCancel(self, action):
|
def handleCancel(self, action):
|
||||||
|
@ -178,6 +178,7 @@
|
|||||||
/* Discussion Control Panel
|
/* Discussion Control Panel
|
||||||
-------------------------------------------------------------------------- */
|
-------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
.template-discussion-controlpanel .unclickable,
|
||||||
.template-discussion-settings .unclickable {
|
.template-discussion-settings .unclickable {
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
filter: alpha(opacity = 50);
|
filter: alpha(opacity = 50);
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
category="Plone"
|
category="Plone"
|
||||||
condition_expr=""
|
condition_expr=""
|
||||||
icon_expr="string:${portal_url}/discussionitem_icon.png"
|
icon_expr="string:${portal_url}/discussionitem_icon.png"
|
||||||
url_expr="string:${portal_url}/@@discussion-settings"
|
url_expr="string:${portal_url}/@@discussion-controlpanel"
|
||||||
visible="True"
|
visible="True"
|
||||||
i18n:attributes="title">
|
i18n:attributes="title">
|
||||||
<permission>Manage portal</permission>
|
<permission>Manage portal</permission>
|
||||||
|
@ -61,7 +61,7 @@ We need to commit the transaction, otherwise setting the workflow will not work.
|
|||||||
|
|
||||||
Enable anonymous comments
|
Enable anonymous comments
|
||||||
|
|
||||||
>>> browser.open(portal_url+'/@@discussion-settings')
|
>>> browser.open(portal_url+'/@@discussion-controlpanel')
|
||||||
>>> browser.getControl(name='form.widgets.anonymous_comments:list').value = True
|
>>> browser.getControl(name='form.widgets.anonymous_comments:list').value = True
|
||||||
>>> browser.getControl(name='form.buttons.save').click()
|
>>> browser.getControl(name='form.buttons.save').click()
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ Enable anonymous comment
|
|||||||
>>> browser.getControl(name='__ac_name').value = 'admin'
|
>>> browser.getControl(name='__ac_name').value = 'admin'
|
||||||
>>> browser.getControl(name='__ac_password').value = 'secret'
|
>>> browser.getControl(name='__ac_password').value = 'secret'
|
||||||
>>> browser.getControl(name='submit').click()
|
>>> browser.getControl(name='submit').click()
|
||||||
>>> browser.open(portal_url+'/@@discussion-settings')
|
>>> browser.open(portal_url+'/@@discussion-controlpanel')
|
||||||
>>> browser.getControl(name='form.widgets.anonymous_comments:list').value = [True]
|
>>> browser.getControl(name='form.widgets.anonymous_comments:list').value = [True]
|
||||||
>>> browser.getControl(name='form.buttons.save').click()
|
>>> browser.getControl(name='form.buttons.save').click()
|
||||||
>>> browser.open(portal_url + '/logout')
|
>>> browser.open(portal_url + '/logout')
|
||||||
|
@ -33,7 +33,7 @@ class RegistryTest(unittest.TestCase):
|
|||||||
def test_discussion_controlpanel_view(self):
|
def test_discussion_controlpanel_view(self):
|
||||||
view = getMultiAdapter(
|
view = getMultiAdapter(
|
||||||
(self.portal, self.portal.REQUEST),
|
(self.portal, self.portal.REQUEST),
|
||||||
name="discussion-settings"
|
name="discussion-controlpanel"
|
||||||
)
|
)
|
||||||
view = view.__of__(self.portal)
|
view = view.__of__(self.portal)
|
||||||
self.assertTrue(view())
|
self.assertTrue(view())
|
||||||
|
Loading…
Reference in New Issue
Block a user