web/views/boxes.py
branchstable
changeset 5839 53cbdc5e0426
parent 5517 4b5577515722
child 6140 65a619eb31c4
child 6407 595e6807dda5
equal deleted inserted replaced
5838:68187d50968e 5839:53cbdc5e0426
    13 # FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
    13 # FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
    14 # details.
    14 # details.
    15 #
    15 #
    16 # You should have received a copy of the GNU Lesser General Public License along
    16 # You should have received a copy of the GNU Lesser General Public License along
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    18 """
    18 """Generic boxes for CubicWeb web client:
    19 generic boxes for CubicWeb web client:
       
    20 
    19 
    21 * actions box
    20 * actions box
    22 * possible views box
    21 * possible views box
    23 
    22 
    24 additional (disabled by default) boxes
    23 additional (disabled by default) boxes
    25 * schema box
    24 * schema box
    26 * startup views box
    25 * startup views box
    27 
       
    28 """
    26 """
       
    27 
    29 __docformat__ = "restructuredtext en"
    28 __docformat__ = "restructuredtext en"
    30 _ = unicode
    29 _ = unicode
    31 
    30 
    32 from warnings import warn
    31 from warnings import warn
    33 
    32 
   183     def call(self, **kwargs):
   182     def call(self, **kwargs):
   184         box = BoxWidget(self._cw._(self.title), self.__regid__)
   183         box = BoxWidget(self._cw._(self.title), self.__regid__)
   185         for view in self._cw.vreg['views'].possible_views(self._cw, None):
   184         for view in self._cw.vreg['views'].possible_views(self._cw, None):
   186             if view.category == 'startupview':
   185             if view.category == 'startupview':
   187                 box.append(self.box_action(view))
   186                 box.append(self.box_action(view))
   188 
       
   189         if not box.is_empty():
   187         if not box.is_empty():
   190             box.render(self.w)
   188             box.render(self.w)
   191 
   189 
   192 
   190 
   193 # helper classes ##############################################################
   191 # helper classes ##############################################################