Package qm :: Package test :: Package web :: Module web :: Class ShowItemPage
[hide private]
[frames] | no frames]

Class ShowItemPage

source code

web.DtmlPage --+        
               |        
 DefaultDtmlPage --+    
                   |    
          QMTestPage --+
                       |
                      ShowItemPage

DTML page for showing and editing tests and resources.

Nested Classes [hide private]

Inherited from web.DtmlPage: default_class

Instance Methods [hide private]
 
__init__(self, server, item, edit, new, type, field_errors={})
Construct a new DTML context.
source code
 
GetTitle(self)
Return the page title for this page.
source code
 
FormatFieldValue(self, field)
Return an HTML rendering of the value for 'field'.
source code
 
GetClassDescription(self)
Return a full description of the test or resource class.
source code
 
GetBriefClassDescription(self)
Return a brief description of the test or resource class.
source code
 
MakeEditUrl(self)
Return the URL for editing this item.
source code
 
MakeRunUrl(self)
Return the URL for running this item.
source code
 
MakeShowUrl(self)
Return the URL for showing this item.
source code
 
MakeSubmitUrl(self)
Return the URL for submitting edits.
source code
 
MakeDeleteScript(self)
Make a script to confirm deletion of the test or resource.
source code

Inherited from QMTestPage: GenerateHtmlHeader, GenerateStartBody, GetExpectationUrl, GetRefreshDelay, IsFinished

Inherited from DefaultDtmlPage: FormatId, GetDatabase, GetMainPageUrl, GetName, GetOutcomePercentages, GetResultsByOutcome, HasModifiableExpectations, IsLabelInDirectory, MakeListingUrl

Inherited from web.DtmlPage: GenerateEndBody, GenerateEndScript, GenerateStartScript, GenerateXMLHeader, GetProgramName, MakeButton, MakeImageUrl, MakeLoginForm, MakeRule, MakeSpacer, UserIsInGroup, WebRequest, __call__

Class Variables [hide private]

Inherited from DefaultDtmlPage: EXPECTATION_KINDS, EXPECTED, NEGATIVE_UNEXPECTED, POSITIVE_UNEXPECTED, html_generator, outcomes

Inherited from web.DtmlPage: common_javascript, html_stylesheet, qm_bug_system_url, web

Method Details [hide private]

__init__(self, server, item, edit, new, type, field_errors={})
(Constructor)

source code 

Construct a new DTML context.

These parameters are also available in DTML under the same name:

'server' -- The 'QMTestServer' creating this page.

'item' -- The 'TestDescriptor' or 'ResourceDescriptor' for the test being shown.

'edit' -- True for editing the item; false for displaying it only.

'new' -- True for editing a newly-created item ('edit' is then also true).

'type' -- Either "test" or "resource".

'field_errors' -- A map from field names to corresponding error messages.

Overrides: web.DtmlPage.__init__

GetClassDescription(self)

source code 

Return a full description of the test or resource class.

returns -- The description, formatted as HTML.

GetBriefClassDescription(self)

source code 

Return a brief description of the test or resource class.

returns -- The brief description, formatted as HTML.

MakeDeleteScript(self)

source code 

Make a script to confirm deletion of the test or resource.

returns -- JavaScript source to handle deletion of the test or resource.