Fixed incorrect object_url in ActivityFollow

This commit is contained in:
Fergal Moran
2013-07-18 21:43:24 +01:00
parent 8d11b3e7b3
commit 3689e304f0
6 changed files with 15 additions and 7 deletions

View File

@@ -80,7 +80,7 @@ class ActivityFollow(Activity):
return self.to_user.get_nice_name()
def get_object_url(self):
return self.user.get_profile_url()
return self.to_user.get_profile_url()
def get_object_singular(self):
return "user"

View File

@@ -66,7 +66,7 @@ define ['app', 'marionette', 'vent',
showUserDetail: (slug) ->
console.log("Controller: showUserDetail")
@_showMixList()
vent.trigger("mix:showlist", {order_by: 'latest', user: slug})
vent.trigger("user:showdetail", {order_by: 'latest', user: slug})
showUserFavourites: (slug) ->
console.log("Controller: showUserFavourites")

View File

@@ -102,7 +102,7 @@
DssController.prototype.showUserDetail = function(slug) {
console.log("Controller: showUserDetail");
this._showMixList();
return vent.trigger("mix:showlist", {
return vent.trigger("user:showdetail", {
order_by: 'latest',
user: slug
});

View File

@@ -10,12 +10,16 @@ define ['marionette', 'vent', 'views/widgets/mixTabHeaderView', 'views/mix/mixLi
initialize: ->
@listenTo(vent, "mix:showlist", @showMixList)
@listenTo(vent, "user:showdetail", @showUserView)
onShow: ->
@headerRegion.show(new MixTabHeaderView())
showMixList: (options)->
console.log("Layout: showoing mixlist")
@bodyRegion.show(new MixListView(options))
showUserView: (options) ->
@headerRegion.close()
@bodyRegion.show(new MixListView(options))
MixListRegionView

View File

@@ -21,7 +21,8 @@
};
MixListRegionView.prototype.initialize = function() {
return this.listenTo(vent, "mix:showlist", this.showMixList);
this.listenTo(vent, "mix:showlist", this.showMixList);
return this.listenTo(vent, "user:showdetail", this.showUserView);
};
MixListRegionView.prototype.onShow = function() {
@@ -29,7 +30,11 @@
};
MixListRegionView.prototype.showMixList = function(options) {
console.log("Layout: showoing mixlist");
return this.bodyRegion.show(new MixListView(options));
};
MixListRegionView.prototype.showUserView = function(options) {
this.headerRegion.close();
return this.bodyRegion.show(new MixListView(options));
};

View File

@@ -11,5 +11,4 @@ define ['marionette', 'underscore', 'vent', 'text!/tpl/MixTabHeaderView'],
$('#mix-tab li[id=li-' + options.order_by + ']', @el).addClass('active')
true
MixTabHeaderView