Commit f7fe1908c8bd2e991b00fe2739bd39996436ca66

Authored by Sergio Oliveira
1 parent a91a35f3

Created dinamically jenkins menu

Signed-off-by: Lucas Kanashiro <kanashiro.duarte@gmail.com>
Signed-off-by: Sergio Oliveira <seocam@gmail.com>
colab/proxy/jenkins/apps.py
1 1  
  2 +from django.utils.translation import ugettext_lazy as _
  3 +
2 4 from ..utils.apps import ColabProxiedAppConfig
3 5  
4 6  
5 7 class ProxyJenkinsAppConfig(ColabProxiedAppConfig):
6 8 name = 'colab.proxy.jenkins'
7 9 verbose_name = 'Jenkins Proxy'
  10 +
  11 + menu = {
  12 + 'title': _('Code'),
  13 + 'links': (
  14 + (_('Continuos Integration'), ''),
  15 + ),
  16 + }
... ...
colab/proxy/jenkins/urls.py
... ... @@ -6,5 +6,5 @@ from .views import JenkinsProxyView
6 6  
7 7 urlpatterns = patterns('',
8 8 # Jenkins URLs
9   - url(r'^ci/(?P<path>.*)$', JenkinsProxyView.as_view()),
  9 + url(r'^(?P<path>.*)$', JenkinsProxyView.as_view(), name='jenkins'),
10 10 )
... ...
colab/templates/base.html
... ... @@ -96,15 +96,6 @@
96 96  
97 97 {% proxy_menu %}
98 98  
99   - {% if proxy.trac %}
100   - <li class="dropdown">
101   - <a href="#" class="dropdown-toggle" data-toggle="dropdown">{% trans "Contribute" %} <b class="caret"></b></a>
102   - <ul class="dropdown-menu">
103   - <li><a href="/ci">{% trans "Continuous Integration" %}</a></li>
104   - </ul>
105   - </li>
106   - {% endif %}
107   -
108 99 <li><a href="/paste">{% trans "Paste" %}</a></li>
109 100  
110 101 <li class="hidden-lg hidden-md">
... ...
colab/urls.py
... ... @@ -40,6 +40,7 @@ urlpatterns = patterns(&#39;&#39;,
40 40 url(r'^trac/', include('colab.proxy.trac.urls')),
41 41 url(r'^gitlab/', include('colab.proxy.gitlab.urls')),
42 42 url(r'^social/', include('colab.proxy.noosfero.urls')),
  43 + url(r'^ci/', include('colab.proxy.jenkins.urls')),
43 44 )
44 45  
45 46 if settings.DEBUG:
... ...