Changeset 6332 for main/waeup.sirp


Ignore:
Timestamp:
10 Jun 2011, 12:00:04 (13 years ago)
Author:
uli
Message:

Rename 'getApplicationState' to 'state'. Properties are always named like
attributes (lowe_case_with_underscores; they appear as attributes in the

interface) and not like methods (camelCase).

Location:
main/waeup.sirp/trunk/src/waeup/sirp/applicants
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/applicants.py

    r6331 r6332  
    5151
    5252    @property
    53     def getApplicationState(self):
     53    def state(self):
    5454        state = IWorkflowState(self).getState()
    5555        return state
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py

    r6327 r6332  
    507507        return 'not yet admitted'
    508508
    509     #@property
    510     #def getApplicationState(self):
    511     #    state = IWorkflowState(self.context).getState()
    512     #    return state
    513 
    514509class ApplicantsManageActionButton(ManageActionButton):
    515510    grok.context(IApplicant)
     
    556551            for transition_object in TRANSITION_OBJECTS
    557552            if transition_object.transition_id in allowed_transitions_ids]
    558         #import pdb; pdb.set_trace()
    559553        return transitions
    560 
    561     #@property
    562     #def getApplicationState(self):
    563     #    state = IWorkflowState(self.context).getState()
    564     #    return state
    565554
    566555    @grok.action('Save')
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantscontainermanagepage.pt

    r6324 r6332  
    9191            </td>
    9292            <td>
    93               <span tal:replace="appl/getApplicationState">state</span>
     93              <span tal:replace="appl/state">state</span>
    9494            </td>
    9595          </tr>
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/form_display.pt

    r6324 r6332  
    33    tal:content="view/label">Label</h2>
    44
    5 <h2> ... <span tal:replace="context/getApplicationState">Application State</span> ... </h2>
     5<h2> ... <span tal:replace="context/state">Application State</span> ... </h2>
    66
    7 <div class="workflow" tal:content="structure context/msgs">Application Workflow</div>
     7<div class="workflow" tal:content="structure context/msgs">
     8  Application Workflow
     9</div>
    810
    911<table class="zebra">
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/form_edit.pt

    r6324 r6332  
    66    tal:content="view/label">Label</h2>
    77
    8   <h2> ... <span tal:replace="context/getApplicationState">Application State</span> ... </h2>
     8  <h2> ... <span tal:replace="context/state">Application State</span> ... </h2>
    99
    1010  <div class="workflow" tal:content="structure context/msgs">Application Workflow</div>
    1111
    12  
     12
    1313  <div class="form-status"
    1414    tal:define="status view/status"
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py

    r6327 r6332  
    284284    """
    285285    msgs = Attribute('Workflow transitions with date of transition.')
    286     getApplicationState = Attribute('Returns the application state of an applicant')
     286    state = Attribute('Returns the application state of an applicant')
    287287
    288288    reg_no = schema.TextLine(
Note: See TracChangeset for help on using the changeset viewer.