From aa8dff5e1e340da0a1fea191ce3c75f4bd82b3e9 Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Mon, 8 Dec 2014 13:22:41 -0200 Subject: [PATCH] Added CONVERSEJS_ENABLED variable to user update view --- colab/accounts/views.py | 6 ++++++ colab/proxy/gitlab/templates/proxy/gitlab.html | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/colab/accounts/views.py b/colab/accounts/views.py index cb27a96..7a6f653 100644 --- a/colab/accounts/views.py +++ b/colab/accounts/views.py @@ -3,6 +3,7 @@ from collections import OrderedDict +from django.conf import settings from django.contrib import messages from django.db import transaction from django.db.models import Count @@ -52,6 +53,11 @@ class UserProfileUpdateView(UserProfileBaseMixin, UpdateView): return obj + def get_context_data(self, **kwargs): + context = super(UserProfileUpdateView, self).get_context_data(**kwargs) + context['CONVERSEJS_ENABLED'] = getattr(settings, 'CONVERSEJS_ENABLED') + return context + class UserProfileDetailView(UserProfileBaseMixin, DetailView): template_name = 'accounts/user_detail.html' diff --git a/colab/proxy/gitlab/templates/proxy/gitlab.html b/colab/proxy/gitlab/templates/proxy/gitlab.html index df88942..ef0865d 100644 --- a/colab/proxy/gitlab/templates/proxy/gitlab.html +++ b/colab/proxy/gitlab/templates/proxy/gitlab.html @@ -41,7 +41,7 @@ $('.hide').removeClass('hide').css('display', 'none'); // Hit the SSH clone button to select it by default - jQuery$(".git-clone-holder .btn:contains('SSH')").click() + jQuery(".git-clone-holder .btn:contains('SSH')").click() }); -- libgit2 0.21.2