provide property 'renderedDescription' for simplifying handling of formatted descriptions
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3195 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
		
							parent
							
								
									0612728d9b
								
							
						
					
					
						commit
						3eba4b94fb
					
				
					 3 changed files with 9 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -346,6 +346,10 @@ class BaseView(GenericView, I18NView):
 | 
			
		|||
        view = component.getMultiAdapter((removeAllProxies(source), self.request))
 | 
			
		||||
        return view.render()
 | 
			
		||||
 | 
			
		||||
    @Lazy
 | 
			
		||||
    def renderedDescription(self):
 | 
			
		||||
        return self.renderText(self.description, 'text/restructured')
 | 
			
		||||
 | 
			
		||||
    # type listings
 | 
			
		||||
 | 
			
		||||
    def listTypes(self, include=None, exclude=None, sortOn='title'):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -107,11 +107,9 @@ class NodeView(BaseView):
 | 
			
		|||
        cm.register('portlet_left', 'navigation', title='Navigation',
 | 
			
		||||
                    subMacro=node_macros.macros['menu'])
 | 
			
		||||
        if canWrite(self.context, 'title') or (
 | 
			
		||||
                # TODO: is this useful in any case?
 | 
			
		||||
                self.virtualTargetObject is not None and
 | 
			
		||||
                    canWrite(self.virtualTargetObject, 'title')):
 | 
			
		||||
            #cm.register('portlet_right', 'clipboard', title='Clipboard',
 | 
			
		||||
            #            subMacro=self.template.macros['clipboard'])
 | 
			
		||||
            # this belongs to loops.organize
 | 
			
		||||
            cm.register('portlet_right', 'actions', title=_(u'Actions'),
 | 
			
		||||
                        subMacro=node_macros.macros['actions'],
 | 
			
		||||
                        priority=100)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -113,7 +113,10 @@ class AdapterBase(object):
 | 
			
		|||
            try:
 | 
			
		||||
                object.__setattr__(self, attr, value)
 | 
			
		||||
            except AttributeError:
 | 
			
		||||
                print '***', self.context.__name__, attr, value
 | 
			
		||||
                from logging import getLogger
 | 
			
		||||
                getLogger('loops.common.AdapterBase').warn(
 | 
			
		||||
                            'AttributeError: %r, %r, %r.' %
 | 
			
		||||
                                (self.context.__name__, attr, value))
 | 
			
		||||
                raise
 | 
			
		||||
        else:
 | 
			
		||||
            self.checkAttr(attr)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue