diff --git a/spa/api/v1/ActivityResource.py b/spa/api/v1/ActivityResource.py index 8a40aad..798569f 100644 --- a/spa/api/v1/ActivityResource.py +++ b/spa/api/v1/ActivityResource.py @@ -25,8 +25,8 @@ class ActivityResource(BackboneCompatibleResource): user_profile = bundle.obj.user.get_profile().get_profile_url() else: user_name = "Anonymous user" - user_image = "" - user_profile = UserProfile.get_default_avatar_image() + user_image = UserProfile.get_default_avatar_image() + user_profile = "" bundle.data["verb"] = bundle.obj.get_verb_passed(), bundle.data["object"] = bundle.obj.get_object_singular(), @@ -49,6 +49,6 @@ class ActivityResource(BackboneCompatibleResource): def alter_list_data_to_serialize(self, request, data): return [i for i in data['objects'] if i is not None and i.obj.user is not None and i.obj.get_object_name is not None and i.obj.get_object_url is not None] """ - + def dehydrate_date(self, bundle): return self.humanize_date(bundle.obj.date) diff --git a/spa/models/UserProfile.py b/spa/models/UserProfile.py index ed57c6d..97d6b87 100644 --- a/spa/models/UserProfile.py +++ b/spa/models/UserProfile.py @@ -134,7 +134,7 @@ class UserProfile(_BaseModel): if social_account: provider = social_account.get_provider_account() return provider.get_avatar_url() - except: + except Exception, ex: pass elif avatar_type == 'custom' or avatar_type: return self.avatar_image.name diff --git a/static/css/deepsouthsounds.css b/static/css/deepsouthsounds.css index 13ce065..43dba95 100644 --- a/static/css/deepsouthsounds.css +++ b/static/css/deepsouthsounds.css @@ -591,4 +591,5 @@ div.event-content td { .activity-list-item{ margin-bottom: 5px; margin-left: 5px; -} \ No newline at end of file +} + diff --git a/static/js/app/views/activity.js b/static/js/app/views/activity.js index ee7570b..649b4a2 100644 --- a/static/js/app/views/activity.js +++ b/static/js/app/views/activity.js @@ -1,33 +1,33 @@ -/** @license - - ---------------------------------------------- - - Copyright (c) 2012, Fergal Moran. All rights reserved. - Code provided under the BSD License: - - */ -window.ActivityListItemView = Backbone.View.extend({ - tagName:"li", - initialize:function () { - $(this.el).data("id", this.model.get("id")); - $(this.el).addClass("activity-entry"); - }, - render:function () { - $(this.el).html(this.template({"item":this.model.toJSON()})); - return this; - } -}); - -window.ActivityListView = Backbone.View.extend({ - initialize:function () { - //this.collection.bind('add', this.render); - this.render(); - }, - render:function () { - $(this.el).html(this.template()).append(''); - this.collection.each(function (item) { - $('.activity-listing', this.el).append(new ActivityListItemView({model:item}).render().el); - }, this); - return this; - } -}); +/** @license + + ---------------------------------------------- + + Copyright (c) 2012, Fergal Moran. All rights reserved. + Code provided under the BSD License: + + */ +window.ActivityListItemView = Backbone.View.extend({ + tagName:"li", + initialize:function () { + $(this.el).data("id", this.model.get("id")); + $(this.el).addClass("media"); + }, + render:function () { + $(this.el).html(this.template({"item":this.model.toJSON()})); + return this; + } +}); + +window.ActivityListView = Backbone.View.extend({ + initialize:function () { + //this.collection.bind('add', this.render); + this.render(); + }, + render:function () { + $(this.el).html(this.template()).append(''); + this.collection.each(function (item) { + $('.activity-listing', this.el).append(new ActivityListItemView({model:item}).render().el); + }, this); + return this; + } +}); diff --git a/templates/views/ActivityListItemView.html b/templates/views/ActivityListItemView.html index a246624..edf15ed 100644 --- a/templates/views/ActivityListItemView.html +++ b/templates/views/ActivityListItemView.html @@ -1,8 +1,9 @@ {% load account_tags %}
- + +
-