Merge branch 'plip10359-z3cform'

This commit is contained in:
Timo Stollenwerk 2015-01-29 21:32:06 +01:00
commit c933d261e2
8 changed files with 19 additions and 7 deletions

View File

@ -4,6 +4,9 @@ Changelog
2.4.0 (unreleased)
------------------
- Rename @@discussion-settings to @@discussion-controlpanel
[maartenkling]
- Add permission to allow comment authors to delete their own comments if
there are no replies yet.
[gaudenz]
@ -104,6 +107,7 @@ Changelog
- Put defaultUser.png instead of old defaultUser.gif
[bsuttor]
>>>>>>> master
- Remove bbb directory. bbb was never really implemented.
[timo]

View File

@ -152,6 +152,13 @@
/>
<!-- Control panel -->
<browser:page
name="discussion-controlpanel"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
class=".controlpanel.DiscussionSettingsControlPanel"
permission="cmf.ManagePortal"
/>
<!-- Deprecated controlpanel url -->
<browser:page
name="discussion-settings"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"

View File

@ -88,7 +88,7 @@ class DiscussionSettingsEditForm(controlpanel.RegistryEditForm):
self.applyChanges(data)
IStatusMessage(self.request).addStatusMessage(_(u"Changes saved"),
"info")
self.context.REQUEST.RESPONSE.redirect("@@discussion-settings")
self.context.REQUEST.RESPONSE.redirect("@@discussion-controlpanel")
@button.buttonAndHandler(_('Cancel'), name='cancel')
def handleCancel(self, action):

View File

@ -178,6 +178,7 @@
/* Discussion Control Panel
-------------------------------------------------------------------------- */
.template-discussion-controlpanel .unclickable,
.template-discussion-settings .unclickable {
opacity: 0.6;
filter: alpha(opacity = 50);
@ -228,4 +229,4 @@
.overlay-edit-comment textarea {
height: 10em;
}
}

View File

@ -12,10 +12,10 @@
category="Plone"
condition_expr=""
icon_expr="string:${portal_url}/discussionitem_icon.png"
url_expr="string:${portal_url}/@@discussion-settings"
url_expr="string:${portal_url}/@@discussion-controlpanel"
visible="True"
i18n:attributes="title">
<permission>Manage portal</permission>
</configlet>
</object>
</object>

View File

@ -61,7 +61,7 @@ We need to commit the transaction, otherwise setting the workflow will not work.
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.buttons.save').click()

View File

@ -182,7 +182,7 @@ Enable anonymous comment
>>> browser.getControl(name='__ac_name').value = 'admin'
>>> browser.getControl(name='__ac_password').value = 'secret'
>>> 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.buttons.save').click()
>>> browser.open(portal_url + '/logout')

View File

@ -33,7 +33,7 @@ class RegistryTest(unittest.TestCase):
def test_discussion_controlpanel_view(self):
view = getMultiAdapter(
(self.portal, self.portal.REQUEST),
name="discussion-settings"
name="discussion-controlpanel"
)
view = view.__of__(self.portal)
self.assertTrue(view())