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)) |         view = component.getMultiAdapter((removeAllProxies(source), self.request)) | ||||||
|         return view.render() |         return view.render() | ||||||
| 
 | 
 | ||||||
|  |     @Lazy | ||||||
|  |     def renderedDescription(self): | ||||||
|  |         return self.renderText(self.description, 'text/restructured') | ||||||
|  | 
 | ||||||
|     # type listings |     # type listings | ||||||
| 
 | 
 | ||||||
|     def listTypes(self, include=None, exclude=None, sortOn='title'): |     def listTypes(self, include=None, exclude=None, sortOn='title'): | ||||||
|  |  | ||||||
|  | @ -107,11 +107,9 @@ class NodeView(BaseView): | ||||||
|         cm.register('portlet_left', 'navigation', title='Navigation', |         cm.register('portlet_left', 'navigation', title='Navigation', | ||||||
|                     subMacro=node_macros.macros['menu']) |                     subMacro=node_macros.macros['menu']) | ||||||
|         if canWrite(self.context, 'title') or ( |         if canWrite(self.context, 'title') or ( | ||||||
|  |                 # TODO: is this useful in any case? | ||||||
|                 self.virtualTargetObject is not None and |                 self.virtualTargetObject is not None and | ||||||
|                     canWrite(self.virtualTargetObject, 'title')): |                     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'), |             cm.register('portlet_right', 'actions', title=_(u'Actions'), | ||||||
|                         subMacro=node_macros.macros['actions'], |                         subMacro=node_macros.macros['actions'], | ||||||
|                         priority=100) |                         priority=100) | ||||||
|  |  | ||||||
|  | @ -113,7 +113,10 @@ class AdapterBase(object): | ||||||
|             try: |             try: | ||||||
|                 object.__setattr__(self, attr, value) |                 object.__setattr__(self, attr, value) | ||||||
|             except AttributeError: |             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 |                 raise | ||||||
|         else: |         else: | ||||||
|             self.checkAttr(attr) |             self.checkAttr(attr) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 helmutm
						helmutm