Rename @@discussion-settings to @@discussion-controlpanel

This commit is contained in:
maartenkling 2013-11-12 10:45:59 +01:00
parent 410b8c998a
commit c45650261e
8 changed files with 17 additions and 6 deletions

View File

@ -4,6 +4,9 @@ Changelog
2.3.0 (unreleased) 2.3.0 (unreleased)
------------------ ------------------
- Rename @@discussion-settings to @@discussion-controlpanel
[maartenkling]
- Remove bbb directory. bbb was never really implemented. - Remove bbb directory. bbb was never really implemented.
[timo] [timo]

View File

@ -133,6 +133,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"

View File

@ -79,7 +79,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):

View File

@ -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);

View File

@ -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>

View File

@ -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()

View File

@ -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')

View File

@ -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())