Commit aa8dff5e1e340da0a1fea191ce3c75f4bd82b3e9
1 parent
cd1013bb
Exists in
master
and in
39 other branches
Added CONVERSEJS_ENABLED variable to user update view
Showing
2 changed files
with
7 additions
and
1 deletions
Show diff stats
colab/accounts/views.py
@@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
3 | 3 | ||
4 | from collections import OrderedDict | 4 | from collections import OrderedDict |
5 | 5 | ||
6 | +from django.conf import settings | ||
6 | from django.contrib import messages | 7 | from django.contrib import messages |
7 | from django.db import transaction | 8 | from django.db import transaction |
8 | from django.db.models import Count | 9 | from django.db.models import Count |
@@ -52,6 +53,11 @@ class UserProfileUpdateView(UserProfileBaseMixin, UpdateView): | @@ -52,6 +53,11 @@ class UserProfileUpdateView(UserProfileBaseMixin, UpdateView): | ||
52 | 53 | ||
53 | return obj | 54 | return obj |
54 | 55 | ||
56 | + def get_context_data(self, **kwargs): | ||
57 | + context = super(UserProfileUpdateView, self).get_context_data(**kwargs) | ||
58 | + context['CONVERSEJS_ENABLED'] = getattr(settings, 'CONVERSEJS_ENABLED') | ||
59 | + return context | ||
60 | + | ||
55 | 61 | ||
56 | class UserProfileDetailView(UserProfileBaseMixin, DetailView): | 62 | class UserProfileDetailView(UserProfileBaseMixin, DetailView): |
57 | template_name = 'accounts/user_detail.html' | 63 | template_name = 'accounts/user_detail.html' |
colab/proxy/gitlab/templates/proxy/gitlab.html
@@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
41 | $('.hide').removeClass('hide').css('display', 'none'); | 41 | $('.hide').removeClass('hide').css('display', 'none'); |
42 | 42 | ||
43 | // Hit the SSH clone button to select it by default | 43 | // Hit the SSH clone button to select it by default |
44 | - jQuery$(".git-clone-holder .btn:contains('SSH')").click() | 44 | + jQuery(".git-clone-holder .btn:contains('SSH')").click() |
45 | 45 | ||
46 | }); | 46 | }); |
47 | </script> | 47 | </script> |