Skip to content

Commit

Permalink
Merge pull request #89 from plone/fix_sitesetup_link
Browse files Browse the repository at this point in the history
Update Site Setup link in all control panels
  • Loading branch information
vangheem committed Nov 23, 2015
2 parents 90dc973 + 616a108 commit b8f2ad2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ New:

Fixes:

- *add item here*
- Update Site Setup link in all control panels (fixes https://github.com/plone/Products.CMFPlone/issues/1255)
[davilima6]


1.2.15 (2015-10-28)
Expand Down
7 changes: 2 additions & 5 deletions src/plone/app/theming/browser/controlpanel.pt
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@
<h1 class="documentFirstHeading"
i18n:translate="heading_theme_settings">Theme settings</h1>

<a href=""
class="link-parent"
tal:attributes="href string:${context/portal_url}/plone_control_panel"
<a id="setup-link" class="link-parent"
tal:attributes="href string:${context/portal_url}/@@overview-controlpanel"
i18n:translate="label_up_to_plone_setup">
Up to Site Setup
</a>
Expand Down Expand Up @@ -113,8 +112,6 @@
loadLinksWithinModal: true;
content: .content"
i18n:translate="">Help</a>


</div>

<div id="themesList">
Expand Down
12 changes: 6 additions & 6 deletions src/plone/app/theming/browser/controlpanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def update(self):
IStatusMessage(self.request).add(_(u"Changes cancelled"))

portalUrl = getToolByName(self.context, 'portal_url')()
self.redirect("{0:s}/plone_control_panel".format(portalUrl))
self.redirect("{0:s}/@@overview-controlpanel".format(portalUrl))

return False

Expand Down Expand Up @@ -173,7 +173,7 @@ def update(self):
'error_invalid_parameter_expressions',
default=u"Please ensure you enter one expression per "
u"line, in the format <name> = <expression>."
)
)
self.errors['parameterExpressions'] = message

themeBase = form.get('themeBase', None)
Expand Down Expand Up @@ -416,15 +416,15 @@ def themeList(self):
if theme.__name__ == TEMPLATE_THEME:
continue

#We've overwritten this theme, skip it
# We've overwritten this theme, skip it
if complete.__contains__(theme.__name__):
continue

override = False

#Is there more than one theme with the same name?
if len( filter(lambda x: x.__name__ == theme.__name__, self.availableThemes) ) > 1:
#Then we make sure we're using the TTW version, not the filesystem version.
# Is there more than one theme with the same name?
if len(filter(lambda x: x.__name__ == theme.__name__, self.availableThemes)) > 1:
# Then we make sure we're using the TTW version, not the filesystem version.
theme = filter(lambda x: x.__name__ == theme.__name__, self.zodbThemes)[0]
override = True

Expand Down

0 comments on commit b8f2ad2

Please sign in to comment.