common/uilib.py
branchtls-sprint
changeset 1132 96752791c2b6
parent 1016 26387b836099
child 1263 01152fffd593
equal deleted inserted replaced
1131:544609e83317 1132:96752791c2b6
    13 import decimal
    13 import decimal
    14 import re
    14 import re
    15 from datetime import datetime, date, timedelta
    15 from datetime import datetime, date, timedelta
    16 from urllib import quote as urlquote
    16 from urllib import quote as urlquote
    17 from cStringIO import StringIO
    17 from cStringIO import StringIO
    18 from copy import deepcopy
    18 
    19 
       
    20 from logilab.common.textutils import unormalize
       
    21 from logilab.mtconverter import html_escape, html_unescape
    19 from logilab.mtconverter import html_escape, html_unescape
    22 
    20 
    23 from cubicweb.utils import ustrftime
    21 from cubicweb.utils import ustrftime
    24 
    22 
    25 def rql_for_eid(eid):
    23 def rql_for_eid(eid):
   338         for j in range(tree_depth-1):
   336         for j in range(tree_depth-1):
   339             cell_11 = line[j] is not None
   337             cell_11 = line[j] is not None
   340             cell_12 = line[j+1] is not None
   338             cell_12 = line[j+1] is not None
   341             cell_21 = line[j+1] is not None and line[j+1].next_sibling() is not None
   339             cell_21 = line[j+1] is not None and line[j+1].next_sibling() is not None
   342             link_type = link_types.get((cell_11, cell_12, cell_21), 0)
   340             link_type = link_types.get((cell_11, cell_12, cell_21), 0)
   343             if link_type == 0 and i > 0 and links[i-1][j] in (1,2,3):
   341             if link_type == 0 and i > 0 and links[i-1][j] in (1, 2, 3):
   344                 link_type = 2
   342                 link_type = 2
   345             links[-1].append(link_type)
   343             links[-1].append(link_type)
   346     
   344     
   347 
   345 
   348     # We can now generate the HTML code for the <table> 
   346     # We can now generate the HTML code for the <table>