move new 'view/requestUrl' to cybertools/browser
This commit is contained in:
parent
17eafd7895
commit
a8f70fd498
2 changed files with 1 additions and 12 deletions
|
@ -42,7 +42,6 @@ from zope.formlib.namedtemplate import NamedTemplate
|
|||
from zope.interface import Interface, implements
|
||||
from zope.proxy import removeAllProxies
|
||||
from zope.publisher.browser import applySkin
|
||||
from zope.publisher.http import URLGetter as BaseURLGetter
|
||||
from zope.publisher.interfaces.browser import IBrowserSkinType, IBrowserView
|
||||
from zope import schema
|
||||
from zope.schema.vocabulary import SimpleTerm
|
||||
|
@ -188,12 +187,6 @@ class SortableMixin(object):
|
|||
return '/@@/cybertools.icons/arrowup.gif'
|
||||
|
||||
|
||||
class URLGetter(BaseURLGetter):
|
||||
|
||||
def __str__(self):
|
||||
return self.__request.getURL().rstrip('/@@index.html')
|
||||
|
||||
|
||||
class BaseView(GenericView, I18NView, SortableMixin):
|
||||
|
||||
actions = {}
|
||||
|
@ -216,10 +209,6 @@ class BaseView(GenericView, I18NView, SortableMixin):
|
|||
pass
|
||||
saveRequest(request)
|
||||
|
||||
@property
|
||||
def requestUrl(self):
|
||||
return URLGetter(self.request)
|
||||
|
||||
def todayFormatted(self):
|
||||
return formatDate(date.today(), 'date', 'short',
|
||||
self.languageInfo.language)
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
<h1 tal:define="tabview item/tabview|nothing"
|
||||
tal:attributes="ondblclick item/openEditWindow">
|
||||
<a tal:omit-tag="python: level > 1"
|
||||
tal:attributes="href string:${request/URL}${item/urlParamString}"
|
||||
tal:attributes="href string:${view/requestUrl}${item/urlParamString}"
|
||||
tal:content="item/title">Title</a>
|
||||
<a title="Show tabular view"
|
||||
i18n:attributes="title"
|
||||
|
|
Loading…
Add table
Reference in a new issue