web/views/baseviews.py
changeset 4494 ccb7fce7297b
parent 4482 1f4f33535d9a
child 4507 57927ad07e63
--- a/web/views/baseviews.py	Mon Feb 08 12:03:03 2010 +0100
+++ b/web/views/baseviews.py	Mon Feb 08 12:05:56 2010 +0100
@@ -297,11 +297,13 @@
     redirect_vid = 'incontext'
 
 
-class AdaptedListView(EntityView):
-    """list of entities of the same type"""
-    __regid__ = 'adaptedlist'
+class SameETypeListView(EntityView):
+    """list of entities of the same type, when asked explicitly for adapted list
+    view (for instance, display gallery if only images)
+    """
+    __regid__ = 'sameetypelist'
     __select__ = EntityView.__select__ & one_etype_rset()
-    item_vid = 'adaptedlistitem'
+    item_vid = 'sameetypelistitem'
 
     @property
     def title(self):
@@ -312,18 +314,19 @@
         """display a list of entities by calling their <item_vid> view"""
         if not 'vtitle' in self._cw.form:
             self.w(u'<h1>%s</h1>' % self.title)
-        super(AdaptedListView, self).call(**kwargs)
+        super(SameETypeListView, self).call(**kwargs)
 
     def cell_call(self, row, col=0, vid=None, **kwargs):
         self.wview(self.item_vid, self.cw_rset, row=row, col=col, vid=vid, **kwargs)
 
 
-class AdaptedListItemView(EntityView):
-    __regid__ = 'adaptedlistitem'
+class SameETypeListItemView(EntityView):
+    __regid__ = 'sameetypelistitem'
 
     def cell_call(self, row, col, **kwargs):
         self.wview('listitem', self.cw_rset, row=row, col=col, **kwargs)
 
+
 class CSVView(SimpleListView):
     __regid__ = 'csv'
     redirect_vid = 'incontext'