Commit 46e249cfd720f280e08257956d03743a82550298

Authored by Sergio Oliveira
1 parent 754cc2b7

Workaround for gitlab javascript conflicts

src/proxy/templates/proxy/gitlab.html 0 → 100644
... ... @@ -0,0 +1,24 @@
  1 +{% extends 'base.html' %}
  2 +
  3 +
  4 +{% block head_js %}
  5 +<!-- XXX / FIXME: Evil -->
  6 +<script type="text/javascript">
  7 + if(window.location.href.match(/\/gitlab\//))
  8 + {
  9 + $('body').append('<script type="text/javascript" src="/static/third-party/bootstrap/js/bootstrap.min.js">');
  10 + $('body').append('<script type="text/javascript" src="/static/third-party/jquery.cookie.js">');
  11 + $(function(){
  12 + $('a').click(function(evt){
  13 + url = $(this).attr('href');
  14 + if(url != undefined && url.match(/\/redmine\//)){ window.location = url; } });
  15 + $('.navbar a').click(function(evt){
  16 + evt.preventDefault();
  17 + url = $(this).attr('href');
  18 + if(url != '#')
  19 + window.location = 'http://beta.softwarepublico.gov.br' + $(this).attr('href'); });
  20 + $('div.panel-body div.automerge_widget').removeClass('hide');
  21 + });
  22 + }
  23 +</script>
  24 +{% endblock %}
... ...
src/proxy/views.py
... ... @@ -59,7 +59,7 @@ class JenkinsProxyView(ProxyView):
59 59 class GitlabProxyView(ProxyView):
60 60 base_url = settings.COLAB_GITLAB_URL
61 61 add_remote_user = settings.REVPROXY_ADD_REMOTE_USER
62   - diazo_theme_template = 'base.html'
  62 + diazo_theme_template = 'proxy/gitlab.html'
63 63 diazo_rules = os.path.join(DIAZO_RULES_DIR, 'gitlab.xml')
64 64 html5 = True
65 65  
... ...