diff --git a/app/views/templates/comment_stream.handlebars b/app/views/templates/comment_stream.handlebars
new file mode 100644
index 000000000..0b0c5445f
--- /dev/null
+++ b/app/views/templates/comment_stream.handlebars
@@ -0,0 +1,30 @@
+{{#unless all_comments_loaded}}
+
+{{/unless}}
+
+
+
+{{#if current_user}}
+
+{{/if}}
\ No newline at end of file
diff --git a/app/views/templates/comment_stream.jst b/app/views/templates/comment_stream.jst
deleted file mode 100644
index 8ba619497..000000000
--- a/app/views/templates/comment_stream.jst
+++ /dev/null
@@ -1,28 +0,0 @@
-<% if(typeof(all_comments_loaded) == 'undefined' || !all_comments_loaded) { %>
-
-<% } %>
-
-
-
-<% if(current_user) { %>
-
-<% } %>
diff --git a/public/javascripts/app/app.js b/public/javascripts/app/app.js
index 3919de7b1..bdcb43e7f 100644
--- a/public/javascripts/app/app.js
+++ b/public/javascripts/app/app.js
@@ -37,9 +37,8 @@ var app = {
};
$(function() {
-
- Handlebars.registerHelper('t', function(){
- return Diaspora.I18n.t(arguments[0], jQuery.parseJSON(arguments[1]))
+ Handlebars.registerHelper('t', function(scope, values) {
+ return Diaspora.I18n.t(scope, values.hash)
})
Handlebars.registerHelper('imageUrl', function(path){
diff --git a/public/javascripts/app/views/commment_stream_view.js b/public/javascripts/app/views/commment_stream_view.js
index ddf43994f..c42f3d585 100644
--- a/public/javascripts/app/views/commment_stream_view.js
+++ b/public/javascripts/app/views/commment_stream_view.js
@@ -1,7 +1,6 @@
app.views.CommentStream = app.views.Base.extend({
- legacyTemplate : true,
- template_name: "#comment-stream-template",
+ templateName: "comment-stream",
className : "comment_stream",
@@ -23,6 +22,13 @@ app.views.CommentStream = app.views.Base.extend({
this.$("textarea").autoResize({'extraSpace' : 10});
},
+ presenter: function(){
+ return _.extend(this.defaultPresenter(), {
+ moreCommentsCount : (this.model.get("comments_count") - 3),
+ showExpandCommentsLink : (this.model.get("comments_count") > 3)
+ })
+ },
+
createComment: function(evt) {
if(evt){ evt.preventDefault(); }