# HG changeset patch # User Todd Larsen # Date 1222223807 0 # Node ID 086282e1999593491d0b5ef4289ceed6bf896474 # Parent 8bdb1d2d0c36fae6691ab0addcf5feeb9786c5d2 Classes that wrap soc.logic.menu.Menu and soc.logic.menu.MenuItem to produce HTML renderings of such lists. diff -r 8bdb1d2d0c36 -r 086282e19995 app/soc/views/helpers/html_menu.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/soc/views/helpers/html_menu.py Wed Sep 24 02:36:47 2008 +0000 @@ -0,0 +1,143 @@ +#!/usr/bin/python2.5 +# +# Copyright 2008 the Melange authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Helpers for displaying arbitrarily nested menus as HTML lists. +""" + +__authors__ = [ + '"Todd Larsen" ', + ] + + +from soc.logic import menu + + +class UlMenu(menu.Menu): + """Ordered collection of MenuItem objects as a