Changeset 2031

Show
Ignore:
Timestamp:
02/23/07 15:53:23 (2 years ago)
Author:
mgood
Message:

AccountManagerPlugin:

admin module also needs to be a template provider

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • accountmanagerplugin/0.10/acct_mgr/admin.py

    r1549 r2031  
    1717from trac.util import sorted 
    1818from trac.util.datefmt import format_datetime 
     19from trac.web.chrome import ITemplateProvider 
    1920from webadmin.web_ui import IAdminPageProvider 
    2021 
     
    131132        return 'admin_users.cs', None 
    132133 
     134    # ITemplateProvider 
     135     
     136    def get_htdocs_dirs(self): 
     137        """Return the absolute path of a directory containing additional 
     138        static resources (such as images, style sheets, etc). 
     139        """ 
     140        return [] 
     141 
     142    def get_templates_dirs(self): 
     143        """Return the absolute path of the directory containing the provided 
     144        ClearSilver templates. 
     145        """ 
     146        from pkg_resources import resource_filename 
     147        return [resource_filename(__name__, 'templates')] 
     148 
  • accountmanagerplugin/trunk/acct_mgr/admin.py

    r1534 r2031  
    1717from trac.util import sorted 
    1818from trac.util.datefmt import format_datetime 
     19from trac.web.chrome import ITemplateProvider 
    1920from trac.admin import IAdminPanelProvider 
    2021 
     
    133134 
    134135        return 'admin_users.html', data 
     136 
     137    # ITemplateProvider 
     138      
     139    def get_htdocs_dirs(self): 
     140        """Return the absolute path of a directory containing additional 
     141        static resources (such as images, style sheets, etc). 
     142        """ 
     143        return [] 
     144  
     145    def get_templates_dirs(self): 
     146        """Return the absolute path of the directory containing the provided 
     147        ClearSilver templates. 
     148        """ 
     149        from pkg_resources import resource_filename 
     150        return [resource_filename(__name__, 'templates')]