Skip to content
Extraits de code Groupes Projets
Valider b2be1b2c rédigé par danielgrippi's avatar danielgrippi
Parcourir les fichiers

a little less broken. formatting is broken on reshares, but the cukes should now pass.

parent bb95bf55
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
app.views.Content = app.views.StreamObject.extend({
presenter : function(model){
var model = model || this.model
console.log(model.get("author"))
return _.extend(this.defaultPresenter(), {
text : app.helpers.textFormatter(model),
o_embed_html : embedHTML(model),
largePhoto : this.largePhoto(model),
smallPhotos : this.smallPhotos(model),
root : this.rootPresenter(model)
smallPhotos : this.smallPhotos(model)
})
function embedHTML(model){
......
......@@ -33,10 +33,13 @@ app.views.Feedback = app.views.StreamObject.extend({
},
userCanReshare : function() {
var isReshare = this.model.get("post_type") == "Reshare"
var rootExists = (isReshare ? this.model.get("root") : true)
var publicPost = this.model.get("public");
var userIsNotAuthor = this.model.get("author").id != app.user().id;
var rootExists = (this.model.get("post_type") == "Reshare" ? this.model.get("root") : true);
return publicPost && userIsNotAuthor && rootExists;
var userIsNotAuthor = this.model.get("author").diaspora_id != app.user().diaspora_id;
var userIsNotRootAuthor = rootExists && (isReshare ? this.model.get("root").author.diaspora_id != app.user().diaspora_id : true)
return publicPost && userIsNotAuthor && userIsNotRootAuthor;
}
})
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter