Changeset 3819

Show
Ignore:
Timestamp:
06/10/08 15:53:50 (5 months ago)
Author:
k0s
Message:

include skeleton for the webadmin panel; not yet used

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ticketsubmitpolicyplugin/0.11/ticketsubmitpolicy/ticketsubmitpolicy.py

    r3818 r3819  
    77 
    88from trac.core import * 
    9 from trac.web import IRequestHandler 
     9from trac.admin.api import IAdminPanelProvider 
    1010from trac.web import ITemplateStreamFilter 
     11from trac.web.chrome import ITemplateProvider 
     12 
    1113 
    1214def camelCase(string): 
     
    8082        requires = "requires('%s', %s, %s, '%s');" % (field, comparitor, value, requiredfield) 
    8183        return requires 
     84 
     85###  
    8286 
    8387class TicketExcludes(Component): 
     
    358362        return string 
    359363 
     364    ### methods for IAdminPanelProvider 
     365 
     366    def get_admin_panels(self, req): 
     367        """Return a list of available admin panels. 
     368         
     369        The items returned by this function must be tuples of the form 
     370        `(category, category_label, page, page_label)`. 
     371        """ 
     372        return [] 
     373 
     374    def render_admin_panel(self, req, category, page, path_info): 
     375        """Process a request for an admin panel. 
     376         
     377        This function should return a tuple of the form `(template, data)`, 
     378        where `template` is the name of the template to use and `data` is the 
     379        data to be passed to the template. 
     380        """ 
     381         
     382    ### methods for ITemplateProvider 
     383 
     384    def get_htdocs_dirs(): 
     385        """Return a list of directories with static resources (such as style 
     386        sheets, images, etc.) 
     387 
     388        Each item in the list must be a `(prefix, abspath)` tuple. The 
     389        `prefix` part defines the path in the URL that requests to these 
     390        resources are prefixed with. 
     391         
     392        The `abspath` is the absolute path to the directory containing the 
     393        resources on the local file system. 
     394        """ 
     395 
     396    def get_templates_dirs(): 
     397        """Return a list of directories containing the provided template 
     398        files. 
     399        """