Ignore:
Timestamp:
17/05/07 11:38:17 (12 years ago)
Author:
lawrence
Message:

Modifications to support cut-down stub-b xquery.
Slight rearrangement of page positioning in discovery. (Needs CSS
support)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI07-MOLES/trunk/PythonCode/wsgi/renderDiscoverySet.py

    r2392 r2487  
    3232    current state class (which provides a method for the fundamental URL, 
    3333    return a previous next piece of html ''' 
    34     html='<p>Results %s to %s of %s'%(state.offset,state.offset+state.stride-1,state.hits) 
     34    html='Results %s to %s of %s'%(state.offset,state.offset+state.stride-1,state.hits) 
    3535    r=CalculateStride(state.offset,state.stride,state.hits) 
    3636    if r[0]<>[]: 
     
    4242        lasturl=state.geturl(offset=r[1][0],stride=r[1][1]) 
    4343        html+=', %s'%hyperlink(l1,lasturl) 
    44     html+='.</p>' 
     44    html+='.' 
     45    stml='Search for <span class="searchString">%s</span>.'%state.searchString 
     46    html='''<div class="stridePosition"><table width="100%%"><tbody> 
     47            <tr><td align="left">%s</td><td align="right">%s</td></tr></tbody></table></div>'''%(stml,html) 
    4548    return html 
    4649     
     
    114117        <td align="center">Start</td><td align="center"> End</td></tr></tbody></table>''' 
    115118        columns.append((header,2)) 
    116     html='<div class="ListOfResults"><table><tbody>'+row(columns,bgcolor="rbgBeige") 
     119    html='<table><tbody>'+row(columns,bgcolor="rbgBeige") 
    117120     
    118121    # ok, now let's cycle through the hits 
     
    150153 
    151154    html+='</tbody></table>' 
    152     html+=htmlStride(state)+'</div>' 
     155    html='<div class="ListOfResults">%s\n%s</div>'%(htmlStride(state),html) 
    153156    return html 
    154157 
     
    170173        DummyEnviron={'QUERY_STRING':'start=10&howmany=10','HTTP_HOST':'example.ndg', 
    171174                      'PATH_INFO':'/discovery','wsgi.url_scheme':'http','SERVER_PORT':'80'} 
    172         d=DiscoveryState('123',DummyEnviron,12) 
     175        d=DiscoveryState('123','blah',DummyEnviron,12) 
    173176        html=htmlStride(d) 
    174177        print html 
Note: See TracChangeset for help on using the changeset viewer.