minor extensions on layout views
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3280 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
8dfdf85403
commit
77950fbf0f
3 changed files with 23 additions and 1 deletions
|
@ -8,11 +8,15 @@ $Id$
|
||||||
|
|
||||||
New features
|
New features
|
||||||
|
|
||||||
|
- new action: ``create task``
|
||||||
|
- quick search field
|
||||||
|
- external file/media asset type: options for hiding or showing fields on editing
|
||||||
- tracking reports: period details
|
- tracking reports: period details
|
||||||
- loops sites: a query view (``loops_sites.html``); add an option
|
- loops sites: a query view (``loops_sites.html``); add an option
|
||||||
``system.sites:/...,...`` with the paths to the sites that should be
|
``system.sites:/...,...`` with the paths to the sites that should be
|
||||||
listed; only sites are listed to which the user has access
|
listed; only sites are listed to which the user has access
|
||||||
- work items (work in progress): activate by adding option
|
- TaskView with task work items listing
|
||||||
|
- work items: activate by adding option
|
||||||
``action.portlet:createWorkitem`` to type; work items listing is shown
|
``action.portlet:createWorkitem`` to type; work items listing is shown
|
||||||
automatically in standard concept view.
|
automatically in standard concept view.
|
||||||
- my work items: a query view (``userworkitems.html``); assign the query
|
- my work items: a query view (``userworkitems.html``); assign the query
|
||||||
|
@ -20,6 +24,7 @@ New features
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
|
|
||||||
|
- relations: store relation objects explicitly in relation registry
|
||||||
- external collection: now works correctly (without creating empty files
|
- external collection: now works correctly (without creating empty files
|
||||||
in the var directory); resource type of generated object controlled by
|
in the var directory); resource type of generated object controlled by
|
||||||
mime type; automatically executes transformation steps on media assets
|
mime type; automatically executes transformation steps on media assets
|
||||||
|
|
|
@ -24,6 +24,7 @@ $Id$
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from zope.app.security.interfaces import IUnauthenticatedPrincipal
|
||||||
from zope import component
|
from zope import component
|
||||||
from zope.cachedescriptors.property import Lazy
|
from zope.cachedescriptors.property import Lazy
|
||||||
from zope.proxy import removeAllProxies
|
from zope.proxy import removeAllProxies
|
||||||
|
@ -61,6 +62,10 @@ class BaseView(object):
|
||||||
return '%s/.%s-%s' % (absoluteURL(self.menu, self.request),
|
return '%s/.%s-%s' % (absoluteURL(self.menu, self.request),
|
||||||
self.context.uid, normalize(self.context.title))
|
self.context.uid, normalize(self.context.title))
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
def authenticated(self):
|
||||||
|
return not IUnauthenticatedPrincipal.providedBy(self.request.principal)
|
||||||
|
|
||||||
def requireDojo(self, *packages):
|
def requireDojo(self, *packages):
|
||||||
# TODO: make sure dojo and dojo_require are displayed in page.js
|
# TODO: make sure dojo and dojo_require are displayed in page.js
|
||||||
djInfo = self.request.annotations.setdefault('ajax.dojo', {})
|
djInfo = self.request.annotations.setdefault('ajax.dojo', {})
|
||||||
|
|
|
@ -22,6 +22,7 @@ Layout node views.
|
||||||
$Id$
|
$Id$
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from zope.app.security.interfaces import IUnauthenticatedPrincipal
|
||||||
from zope.cachedescriptors.property import Lazy
|
from zope.cachedescriptors.property import Lazy
|
||||||
|
|
||||||
from cybertools.composer.layout.browser.view import Page
|
from cybertools.composer.layout.browser.view import Page
|
||||||
|
@ -38,6 +39,14 @@ class LayoutNodeView(Page):
|
||||||
def defaultPredicate(self):
|
def defaultPredicate(self):
|
||||||
return self.loopsRoot.getConceptManager().getDefaultPredicate()
|
return self.loopsRoot.getConceptManager().getDefaultPredicate()
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
def conceptManager(self):
|
||||||
|
return self.loopsRoot.getConceptManager()
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
def defaultPredicate(self):
|
||||||
|
return self.conceptManager.getDefaultPredicate()
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def layoutName(self):
|
def layoutName(self):
|
||||||
return self.context.viewName or 'page'
|
return self.context.viewName or 'page'
|
||||||
|
@ -71,3 +80,6 @@ class LayoutNodeView(Page):
|
||||||
else:
|
else:
|
||||||
return self.context.title
|
return self.context.title
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
def authenticated(self):
|
||||||
|
return not IUnauthenticatedPrincipal.providedBy(self.request.principal)
|
||||||
|
|
Loading…
Add table
Reference in a new issue