Changeset 1186
- Timestamp:
- 07/28/08 10:11:00
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
qPloneTabs/branches/quintagroup.plonetabs/trunk/quintagroup/plonetabs/browser/plonetabs.py
r1185 r1186 201 201 return True 202 202 203 def redirect(self, url="", search="", hash=""):203 def redirect(self, url="", search="", url_hash=""): 204 204 """ Redirect to @@plonetabs-controlpanel configlet """ 205 206 if url == "": 207 portal_url = getMultiAdapter((self.context, self.request), name=u"plone_portal_state").portal_url() 208 url = "%s/%s" % (portal_url, "@@plonetabs-controlpanel") 209 210 if search != "": 211 search = "?%s" % search 212 213 if hash != "": 214 hash = "#%s" % hash 215 216 self.request.response.redirect("%s%s%s" % (url, search, hash)) 205 portal_url = getMultiAdapter((self.context, self.request), name=u"plone_portal_state").portal_url() 206 url = (url == "") and "%s/%s" % (portal_url, "@@plonetabs-controlpanel") or url 207 search = (search != "") and "?%s" % search or search 208 url_hash = (url_hash != "") and "#%s" % url_hash or url_hash 209 self.request.response.redirect("%s%s%s" % (url, search, url_hash)) 217 210 218 211 ################################### … … 289 282 result = [] 290 283 291 # check whether we only want actions284 # check whether tabs autogeneration is turned on 292 285 if not self.isGeneratedTabs(): 293 286 return result 294 287 295 288 query = {} 296 297 289 rootPath = getNavigationRoot(context) 298 290 query['path'] = {'query' : rootPath, 'depth' : 1} … … 620 612 return self.getActionCategory(name) 621 613 614 def setSiteProperties(self, **kw): 615 """ Change site_properties """ 616 site_properties = getToolByName(self.context, "portal_properties").site_properties 617 site_properties.manage_changeProperties(**kw) 618 return True 619 620 # 621 # Basic API to work with portal actions tool in a more pleasent way 622 # 623 622 624 def addAction(self, cat_name, data): 623 625 """ Create and add new action to category with given name """ … … 664 666 return False 665 667 666 def setSiteProperties(self, **kw):667 """ Change site_properties """668 site_properties = getToolByName(self.context, "portal_properties").site_properties669 site_properties.manage_changeProperties(**kw)670 return True671 672 668 # 673 669 # KSS Methods that are used to update different parts of the page 674 # according to category670 # accordingly to category 675 671 # 676 672
