Commit f7fe1908c8bd2e991b00fe2739bd39996436ca66
1 parent
a91a35f3
Exists in
master
and in
39 other branches
Created dinamically jenkins menu
Signed-off-by: Lucas Kanashiro <kanashiro.duarte@gmail.com> Signed-off-by: Sergio Oliveira <seocam@gmail.com>
Showing
4 changed files
with
11 additions
and
10 deletions
Show diff stats
colab/proxy/jenkins/apps.py
| 1 | 1 | ||
| 2 | +from django.utils.translation import ugettext_lazy as _ | ||
| 3 | + | ||
| 2 | from ..utils.apps import ColabProxiedAppConfig | 4 | from ..utils.apps import ColabProxiedAppConfig |
| 3 | 5 | ||
| 4 | 6 | ||
| 5 | class ProxyJenkinsAppConfig(ColabProxiedAppConfig): | 7 | class ProxyJenkinsAppConfig(ColabProxiedAppConfig): |
| 6 | name = 'colab.proxy.jenkins' | 8 | name = 'colab.proxy.jenkins' |
| 7 | verbose_name = 'Jenkins Proxy' | 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,5 +6,5 @@ from .views import JenkinsProxyView | ||
| 6 | 6 | ||
| 7 | urlpatterns = patterns('', | 7 | urlpatterns = patterns('', |
| 8 | # Jenkins URLs | 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,15 +96,6 @@ | ||
| 96 | 96 | ||
| 97 | {% proxy_menu %} | 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 | <li><a href="/paste">{% trans "Paste" %}</a></li> | 99 | <li><a href="/paste">{% trans "Paste" %}</a></li> |
| 109 | 100 | ||
| 110 | <li class="hidden-lg hidden-md"> | 101 | <li class="hidden-lg hidden-md"> |
colab/urls.py
| @@ -40,6 +40,7 @@ urlpatterns = patterns('', | @@ -40,6 +40,7 @@ urlpatterns = patterns('', | ||
| 40 | url(r'^trac/', include('colab.proxy.trac.urls')), | 40 | url(r'^trac/', include('colab.proxy.trac.urls')), |
| 41 | url(r'^gitlab/', include('colab.proxy.gitlab.urls')), | 41 | url(r'^gitlab/', include('colab.proxy.gitlab.urls')), |
| 42 | url(r'^social/', include('colab.proxy.noosfero.urls')), | 42 | url(r'^social/', include('colab.proxy.noosfero.urls')), |
| 43 | + url(r'^ci/', include('colab.proxy.jenkins.urls')), | ||
| 43 | ) | 44 | ) |
| 44 | 45 | ||
| 45 | if settings.DEBUG: | 46 | if settings.DEBUG: |