From 0a670ccf8a0b53709b53b187152f6e26eed6c928 Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Sun, 22 Jan 2012 23:36:56 -0800 Subject: [PATCH] convert comment underscore template to a handlebars template. --- app/views/templates/comment.handlebars | 28 ++++++++++++++++++++ app/views/templates/comment.jst | 28 -------------------- public/javascripts/app/views/comment_view.js | 3 +-- public/javascripts/app/views/content_view.js | 3 ++- 4 files changed, 31 insertions(+), 31 deletions(-) create mode 100644 app/views/templates/comment.handlebars delete mode 100644 app/views/templates/comment.jst diff --git a/app/views/templates/comment.handlebars b/app/views/templates/comment.handlebars new file mode 100644 index 000000000..3ccaeb5dd --- /dev/null +++ b/app/views/templates/comment.handlebars @@ -0,0 +1,28 @@ +
+ + {{#if ownComment}} + + Deletelabel + + {{/if}} +
+ + + + + +
+ + + {{author.name}} + + + +
+ {{text}} +
+ +
+
+
diff --git a/app/views/templates/comment.jst b/app/views/templates/comment.jst deleted file mode 100644 index 97318fa04..000000000 --- a/app/views/templates/comment.jst +++ /dev/null @@ -1,28 +0,0 @@ -
- - <% if(ownComment) { %> - - Deletelabel - - <% } %> -
- - - - - -
- - - <%= author.name %> - - - -
- <%= text %> -
- -
-
-
diff --git a/public/javascripts/app/views/comment_view.js b/public/javascripts/app/views/comment_view.js index b551ab903..3c97f5190 100644 --- a/public/javascripts/app/views/comment_view.js +++ b/public/javascripts/app/views/comment_view.js @@ -1,7 +1,6 @@ app.views.Comment = app.views.Content.extend({ - legacyTemplate : true, - template_name: "#comment-template", + templateName: "comment", tagName : "li", diff --git a/public/javascripts/app/views/content_view.js b/public/javascripts/app/views/content_view.js index 57dde59ab..62188da47 100644 --- a/public/javascripts/app/views/content_view.js +++ b/public/javascripts/app/views/content_view.js @@ -1,5 +1,4 @@ app.views.Content = app.views.StreamObject.extend({ - legacyTemplate : true, presenter : function(){ var model = this.model return _.extend(this.defaultPresenter(), { @@ -15,10 +14,12 @@ app.views.Content = app.views.StreamObject.extend({ }) app.views.StatusMessage = app.views.Content.extend({ + legacyTemplate : true, template_name : "#status-message-template" }); app.views.Reshare = app.views.Content.extend({ + legacyTemplate : true, template_name : "#reshare-template" });