Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# encoding: utf-8 

2from . import * 

3 

4def td( 

5 content=False, 

6 color=False, 

7 span=False): 

8 """ 

9 *Generate a table data cell - TBS style* 

10 

11 **Key Arguments** 

12 

13 - ``content`` -- the content 

14 - ``color`` -- [ sucess | error | warning | info ] 

15  

16 

17 **Return** 

18 

19 - ``td`` -- the table data cell 

20  

21 """ 

22 if color is False: 

23 color = "" 

24 if content is False: 

25 content = "" 

26 if span is False: 

27 span = "" 

28 else: 

29 span = "span%(span)s" % locals() 

30 

31 td = """<td class="%(color)s %(span)s">%(content)s</td>""" % locals() 

32 

33 return td