noosfero.py.erb
1.21 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
from django.utils.translation import ugettext_lazy as _
from colab.plugins.utils.menu import colab_url_factory
# Noosfero plugin - Put this in plugins.d/noosfero.py to actiate ##
# from django.utils.translation import ugettext_lazy as _
# from colab.plugins.utils.menu import colab_url_factory
name = 'colab_noosfero'
verbose_name = 'Noosfero Plugin'
upstream = 'http://<%= node['peers']['social'] %>:80/social/'
private_token = '<%= @get_private_token.call %>'
urls = {
'include': 'colab_noosfero.urls',
'namespace': 'noosfero', # TODO: do not allow to change namespace
'prefix': '^social/',
}
menu_title = _('Social')
url = colab_url_factory('noosfero')
menu_urls = (
url(display=_('Users'), viewname='noosfero',
kwargs={'path': 'search/people'}, auth=False),
url(display=_('Communities'), viewname='noosfero',
kwargs={'path': 'search/communities'}, auth=False),
url(display=_('Institutions'), viewname='noosfero',
kwargs={'path': 'search/institutions'}, auth=False),
url(display=_('Profile'), viewname='noosfero',
kwargs={'path': 'profile/~/'}, auth=True),
url(display=_('Control Panel'), viewname='noosfero',
kwargs={'path': 'myprofile/~/'}, auth=True),
)