diff --git a/app/models/post.rb b/app/models/post.rb index 87572b783..e5d68b9d4 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -18,6 +18,7 @@ class Post < ActiveRecord::Base t.add :public t.add :created_at t.add :comments_count + t.add :likes_count t.add :last_three_comments t.add :provider_display_name t.add :author diff --git a/app/views/shared/_stream_element.html.underscore b/app/views/shared/_stream_element.html.underscore index 040856cb5..4941e0040 100644 --- a/app/views/shared/_stream_element.html.underscore +++ b/app/views/shared/_stream_element.html.underscore @@ -2,8 +2,8 @@
<% if(author.id != current_user.id) { %> - - + + Ignoreuser <% } %> @@ -55,6 +55,18 @@
+
+
+ <% if(likes_count > 0){ %> + Heart + + <%= likes_count %> like + + + <% } %> +
+
+
@@ -71,6 +83,14 @@ <% _.each(last_three_comments, function(comment) { %>
  • + <% if(comment.author.id == current_user.id || author.id == current_user.id) { %> +
    + + Deletelabel + +
    + <% } %> + diff --git a/public/javascripts/views/stream-view.js b/public/javascripts/views/stream-view.js index 54f36dc37..c3f6acbc1 100644 --- a/public/javascripts/views/stream-view.js +++ b/public/javascripts/views/stream-view.js @@ -27,7 +27,7 @@ $(function() { }, collectionFetched: function() { - this.$(".details time").timeago(); + this.$("time").timeago(); this.$("label").inFieldLabels(); this.$("#paginate").remove();