Changeset 2950

Show
Ignore:
Timestamp:
02/22/07 16:39:08 (2 years ago)
Author:
mscott
Message:

place actions that can be performed under a separate heading

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/public/css/master.css

    r2944 r2950  
    11div.properties,  
    22div.fields,  
     3div.actions, 
    34div.children,  
    45div.relationships,  
  • sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/templates/base.html

    r2944 r2950  
    2121            <h1>Fields</h1> 
    2222            ${self.fields()} 
     23        </div> 
     24         
     25        <div class="actions"> 
     26            <h1>Actions</h1> 
     27            ${self.actions()} 
    2328        </div> 
    2429         
     
    4954</%def> 
    5055 
     56<%def name="actions()"> 
     57</%def> 
     58 
    5159<%def name="children()"> 
    5260</%def> 
  • sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/templates/extent_queries/show.html

    r2944 r2950  
    2929</%def> 
    3030 
    31 <form method="POST" action="${h.url_for('extent_call_query', db_id=c.db_id, extent_id=c.extent.name, id=c.method_id)}"> 
    32     <input type="submit" value="Call" /> 
    33 </form> 
     31<%def name="actions()"> 
     32    <form method="POST" action="${h.url_for('extent_call_query', db_id=c.db_id, extent_id=c.extent.name, id=c.method_id)}"> 
     33        <input type="submit" value="Call" /> 
     34    </form> 
     35</%def> 
  • sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/templates/extent_transactions/show.html

    r2944 r2950  
    2929</%def> 
    3030 
    31 <form method="POST" action="${h.url_for('extent_call_transaction', db_id=c.db_id, extent_id=c.extent.name, id=c.method_id)}"> 
    32     <input type="submit" value="Call" /> 
    33 </form> 
     31<%def name="actions()"> 
     32    <form method="POST" action="${h.url_for('extent_call_transaction', db_id=c.db_id, extent_id=c.extent.name, id=c.method_id)}"> 
     33        <input type="submit" value="Call" /> 
     34    </form> 
     35</%def> 
     36 
  • sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/templates/transactions/show.html

    r2944 r2950  
    2828    </ul> 
    2929</%def> 
     30 
     31<%def name="actions()"> 
     32    <form method="get" action="${h.url_for('edit_transaction', id=c.tx_id)}"> 
     33        <input type="submit" value="Edit" /> 
     34    </form> 
     35</%def> 
  • sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/tests/functional/test_transactions.py

    r2936 r2950  
    11from schevopylonsnav.tests import * 
     2 
    23 
    34class TestTransactionsController(TestController): 
    45 
    5     def test_index(self): 
    6         pass 
    7         #response = self.app.get(url_for(controller='transactions')) 
    8         # Test response... 
     6    def test_show(self): 
     7        # First get the 'create' method. 
     8        response = self.app.post( 
     9            url_for('extent_call_transaction', db_id='db', extent_id='Foo', 
     10            id='create')) 
     11        # Call it to get the transaction. 
     12        response = response.follow() 
     13        # Bar field is shown. 
     14        assert 'Bar' in response 
     15 
     16    def test_edit(self): 
     17        # Get the transaction. 
     18        response = self.app.post( 
     19            url_for('extent_call_transaction', db_id='db', extent_id='Foo', 
     20            id='create')) 
     21        # Call it to get the transaction. 
     22        response = response.follow() 
     23        # Find the edit link. 
     24        assert 'Edit' in response 
     25