From e211e9c7bdfba5671d98425f9d7789e903060ca4 Mon Sep 17 00:00:00 2001 From: Charles Oliveira <18oliveira.charles@gmail.com> Date: Thu, 27 Aug 2015 18:05:26 -0400 Subject: [PATCH] Removed some of workarounds --- colab/accounts/templates/accounts/user_update_form.html | 19 ++++++++----------- colab/accounts/views.py | 1 - colab/plugins/gitlab/templates/proxy/gitlab_profile.html | 3 +-- colab/plugins/gitlab/urls.py | 2 -- colab/plugins/gitlab/widgets.py | 16 +++++++++++++++- colab/plugins/templatetags/plugins.py | 20 -------------------- colab/plugins/utils/widget_manager.py | 27 ++++++++++++++++++--------- 7 files changed, 42 insertions(+), 46 deletions(-) diff --git a/colab/accounts/templates/accounts/user_update_form.html b/colab/accounts/templates/accounts/user_update_form.html index 57cb968..88d8711 100644 --- a/colab/accounts/templates/accounts/user_update_form.html +++ b/colab/accounts/templates/accounts/user_update_form.html @@ -121,7 +121,7 @@ $(function() {

{% gravatar user_.email 50 %} {{ user_.get_full_name }} ({{ user_.username }})

{% trans "Change your avatar at Gravatar.com" %} - {{ lala }} +

@@ -148,7 +148,7 @@ $(function() { }
-
+
{% csrf_token %} @@ -229,15 +229,12 @@ $(function() {
-
- {% content_xpto %} -
-
-

Some content in menu 2.

-
+ {% for widget in widgets %} +
+

{{ widget.name }}

+ {{ widget.get_body }} +
+ {% endfor %}
- - - {% endblock %} diff --git a/colab/accounts/views.py b/colab/accounts/views.py index 71fb6e8..874a3cb 100644 --- a/colab/accounts/views.py +++ b/colab/accounts/views.py @@ -46,7 +46,6 @@ class UserProfileUpdateView(UserProfileBaseMixin, UpdateView): def get_context_data(self, **kwargs): context = {} context['widgets'] = WidgetManager.get_widgets('profile', self.request) - context['lala'] = 'lala123' context.update(kwargs) return super(UserProfileUpdateView, self).get_context_data(**context) diff --git a/colab/plugins/gitlab/templates/proxy/gitlab_profile.html b/colab/plugins/gitlab/templates/proxy/gitlab_profile.html index d68d406..8f97797 100644 --- a/colab/plugins/gitlab/templates/proxy/gitlab_profile.html +++ b/colab/plugins/gitlab/templates/proxy/gitlab_profile.html @@ -31,8 +31,7 @@ {% block head_js %} {% endblock %} - - +