Changeset 2922

Show
Ignore:
Timestamp:
02/20/07 18:52:42 (2 years ago)
Author:
mscott
Message:

Show list of queries for each extent also

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/controllers/extents.py

    r2921 r2922  
    6969            tx_label = label(tx_method) 
    7070            transactions.append((tx_label, tx_url)) 
     71        c.queries = queries = [] 
     72        for q_name in list(extent.q): 
     73            q_url = '#'         # XXX: make real 
     74            q_method = extent.q[q_name] 
     75            q_label = label(q_method) 
     76            queries.append((q_label, q_url)) 
    7177        return render_response('extents.show') 
    7278     
  • sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/templates/extents/show.html

    r2921 r2922  
    2525                </dl> 
    2626                 
     27                <h2>Query Methods</h2> 
     28                 
     29                <ul> 
     30                        <li py:for="q_label, q_url in c.queries"> 
     31                                <a href="${q_url}">${q_label}</a> 
     32                        </li> 
     33                </ul> 
     34                 
    2735                <h2>Transaction Methods</h2> 
    2836                 
  • sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/tests/functional/test_extents.py

    r2921 r2922  
    1414        assert 'Foos' in response       # plural label 
    1515        assert '0' in response          # length 
     16        assert 'Query Methods' in response 
     17        assert 'By Example' in response 
     18        assert 'Exact Matches' in response 
    1619        assert 'Transaction Methods' in response 
    1720        assert 'Create' in response 
    18         # XXX: test transaction URL 
     21        # XXX: test transaction and query URLs