Changeset 1680
- Timestamp:
- 12/13/06 05:40:23 (2 years ago)
- Files:
-
- themeengineplugin/0.10/setup.py (modified) (2 diffs)
- themeengineplugin/0.10/themeengine/admin.py (added)
- themeengineplugin/0.10/themeengine/api.py (modified) (1 diff)
- themeengineplugin/0.10/themeengine/filter.py (modified) (2 diffs)
- themeengineplugin/0.10/themeengine/htdocs/default.png (added)
- themeengineplugin/0.10/themeengine/htdocs/img (added)
- themeengineplugin/0.10/themeengine/htdocs/img/credits.txt (added)
- themeengineplugin/0.10/themeengine/htdocs/img/next.gif (added)
- themeengineplugin/0.10/themeengine/htdocs/img/prev.gif (added)
- themeengineplugin/0.10/themeengine/htdocs/jcarousel.js (added)
- themeengineplugin/0.10/themeengine/htdocs/jquery.js (added)
- themeengineplugin/0.10/themeengine/templates/admin_themeengine.cs (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
themeengineplugin/0.10/setup.py
r1678 r1680 8 8 version = '1.0', 9 9 packages = ['themeengine'], 10 package_data = { 'themeengine': [ 'templates/*.cs', 'templates/header/*.cs', 'templates/footer/*.cs', 'htdocs/*.css' ] }, 10 package_data = { 'themeengine': [ 'templates/*.cs', 'templates/header/*.cs', 'templates/footer/*.cs', 11 'htdocs/*.*', 'htdocs/img/*.*' ] }, 11 12 12 13 author = "Noah Kantrowitz", … … 24 25 entry_points = { 25 26 'trac.plugins': [ 26 'themeengine.api = themeengine.api',27 27 'themeengine.filter = themeengine.filter', 28 'themeengine.admin = themeengine.admin', 28 29 ] 29 30 } themeengineplugin/0.10/themeengine/api.py
r1679 r1680 72 72 73 73 74 class NullTheme(ThemeBase):75 """A default theme that does nothing."""76 passthemeengineplugin/0.10/themeengine/filter.py
r1679 r1680 13 13 14 14 15 from api import IThemeProvider , NullTheme15 from api import IThemeProvider 16 16 17 17 __all__ = ['ThemeFilterModule'] … … 83 83 # IRequestHandler methods 84 84 def match_request(self, req): 85 return req.path_info == '/themeengine/theme.css'85 return req.path_info.startswith('/themeengine') 86 86 87 87 def process_request(self, req): 88 self._alter_loadpaths(req.hdf, self.theme['folders']) 89 return self.theme['css'], 'text/css' 88 path_info = req.path_info[12:] 89 90 if path_info == '/theme.css': 91 self._alter_loadpaths(req.hdf, self.theme['folders']) 92 return self.theme['css'], 'text/css' 93 elif path_info.startswith('/screenshot'): 94 name = path_info[12:] 95 if name in self.info and 'screenshot' in self.info[name]: 96 req.send_file(resource_filename(self.info[name]['module'], self.info[name]['screenshot'])) 97 else: 98 req.send_file(resource_filename(__name__, 'htdocs/default.png')) 90 99 91 100 # ITemplateProvider methods 92 101 def get_templates_dirs(self): 93 102 #from pkg_resources import resource_filename 94 #return [resource_filename(__name__, 'templates')]95 return []103 return [resource_filename(__name__, 'templates')] 104 #return [] 96 105 97 106 def get_htdocs_dirs(self):
