Child: [44233e] (diff)

Download this file

opensourceprojects_main.py    55 lines (45 with data), 1.7 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from allura.lib.plugin import ThemeProvider as AlluraThemeProvider
import pkg_resources
import os
import logging
from ming.utils import LazyProperty
logging.info('Opensource projects theme plugin is loading')
class ThemeProvider(AlluraThemeProvider):
"""
The OpenSourceProjects theme
"""
master_template = 'opensourceprojects:templates/jinja_master/master.html'
jinja_macros = 'opensourceprojects:templates/jinja_master/theme_macros.html'
nav_menu = 'opensourceprojects:templates/jinja_master/nav_menu.html'
top_nav = 'opensourceprojects:templates/jinja_master/top_nav.html'
sidebar_menu = 'opensourceprojects:templates/jinja_master/sidebar_menu.html'
@classmethod
def register_ew_resources(cls, manager, name):
# FIXME: we are still pulling from the original allura theme
manager.register_directory( 'theme/%s' % name,
pkg_resources.resource_filename('opensourceprojects', os.path.join('nf', name)))
# The original allura theme
# manager.register_directory('theme/%s' % name,
# pkg_resources.resource_filename('allura', os.path.join('nf', 'allura')))
# The following are currently not supported
@LazyProperty
def upload_key_form(self):
return None
@LazyProperty
def add_user_skill(self):
return None
@LazyProperty
def remove_user_skill(self):
return None
@LazyProperty
def add_timeslot_form(self):
return None
@LazyProperty
def remove_timeslot_form(self):
return None
@LazyProperty
def add_inactive_period_form(self):
return None
@LazyProperty
def remove_inactive_period_form(self):
return None