--- a/web/views/bookmark.py Mon May 04 12:53:42 2009 +0200
+++ b/web/views/bookmark.py Mon May 04 12:53:59 2009 +0200
@@ -12,7 +12,7 @@
from cubicweb.selectors import implements
from cubicweb.web.htmlwidgets import BoxWidget, BoxMenu, RawBoxItem
from cubicweb.web import uicfg, action, box, formwidgets
-from cubicweb.web.views.baseviews import PrimaryView
+from cubicweb.web.views import primary
uicfg.rcategories.tag_relation('primary', ('Bookmark', 'path', '*'), 'subject')
uicfg.rwidgets.tag_relation(formwidgets.TextInput, ('Bookmark', 'path', '*'), 'subject')
@@ -29,7 +29,7 @@
return self.rset.get_entity(self.row or 0, self.col or 0).actual_url()
-class BookmarkPrimaryView(PrimaryView):
+class BookmarkPrimaryView(primary.PrimaryView):
__select__ = implements('Bookmark')
def cell_call(self, row, col):
--- a/web/views/cwuser.py Mon May 04 12:53:42 2009 +0200
+++ b/web/views/cwuser.py Mon May 04 12:53:59 2009 +0200
@@ -11,7 +11,7 @@
from cubicweb.selectors import one_line_rset, implements, match_user_groups
from cubicweb.view import EntityView
from cubicweb.web import uicfg, action
-from cubicweb.web.views.baseviews import PrimaryView
+from cubicweb.web.views import primary
uicfg.rcategories.tag_relation('secondary', ('CWUser', 'firstname', '*'), 'subject')
@@ -42,7 +42,7 @@
return self.build_url('cwuser/%s'%login, vid='epropertiesform')
-class CWUserPrimaryView(PrimaryView):
+class CWUserPrimaryView(primary.PrimaryView):
__select__ = implements('CWUser')
def content_title(self, entity):
--- a/web/views/emailaddress.py Mon May 04 12:53:42 2009 +0200
+++ b/web/views/emailaddress.py Mon May 04 12:53:59 2009 +0200
@@ -10,9 +10,9 @@
from cubicweb.selectors import implements
from cubicweb.common import Unauthorized
-from cubicweb.web.views import baseviews
+from cubicweb.web.views import baseviews, primary
-class EmailAddressPrimaryView(baseviews.PrimaryView):
+class EmailAddressPrimaryView(primary.PrimaryView):
__select__ = implements('EmailAddress')
def cell_call(self, row, col, skipeids=None):
@@ -63,7 +63,7 @@
__select__ = implements('EmailAddress')
id = 'shortprimary'
title = None # hidden view
-
+
def render_entity_attributes(self, entity):
self.w(u'<h5>')
entity.view('oneline', w=self.w)
--- a/web/views/idownloadable.py Mon May 04 12:53:42 2009 +0200
+++ b/web/views/idownloadable.py Mon May 04 12:53:59 2009 +0200
@@ -5,17 +5,18 @@
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
"""
__docformat__ = "restructuredtext en"
+_ = unicode
from logilab.mtconverter import BINARY_ENCODINGS, TransformError, html_escape
+from cubicweb.view import EntityView
from cubicweb.selectors import (one_line_rset, score_entity,
implements, match_context_prop)
from cubicweb.interfaces import IDownloadable
from cubicweb.common.mttransforms import ENGINE
from cubicweb.web.box import EntityBoxTemplate
-from cubicweb.web.views import baseviews
+from cubicweb.web.views import primary, baseviews
-_ = unicode
def is_image(entity):
mt = entity.download_content_type()
@@ -52,7 +53,7 @@
download_box(self.w, entity, title, label)
-class DownloadView(baseviews.EntityView):
+class DownloadView(EntityView):
"""this view is replacing the deprecated 'download' controller and allow
downloading of entities providing the necessary interface
"""
@@ -81,7 +82,7 @@
self.w(self.complete_entity(0).download_data())
-class DownloadLinkView(baseviews.EntityView):
+class DownloadLinkView(EntityView):
"""view displaying a link to download the file"""
id = 'downloadlink'
__select__ = implements(IDownloadable)
@@ -94,7 +95,7 @@
self.w(u'<a href="%s">%s</a>' % (url, html_escape(title or entity.dc_title())))
-class IDownloadablePrimaryView(baseviews.PrimaryView):
+class IDownloadablePrimaryView(primary.PrimaryView):
__select__ = implements(IDownloadable)
def render_entity_attributes(self, entity):
@@ -129,7 +130,7 @@
(url, name, durl, self.req._('download')))
-class ImageView(baseviews.EntityView):
+class ImageView(EntityView):
id = 'image'
__select__ = implements(IDownloadable) & score_entity(is_image)