diff --git a/app/views/templates/comment.handlebars b/app/views/templates/comment.handlebars new file mode 100644 index 0000000000000000000000000000000000000000..3ccaeb5dd5c18c2e0475b14e6ccec906b663bc7b --- /dev/null +++ b/app/views/templates/comment.handlebars @@ -0,0 +1,28 @@ +<div class="right controls"> + <!-- need access to post --> + {{#if ownComment}} + <a href="#" class="delete comment_delete" title="{{t "delete"}}"> + <img alt="Deletelabel" src="/images/deletelabel.png" /> + <a/> + {{/if}} +</div> + +<a href="/people/{{author.id}}"> + <img src="{{author.avatar.small}}" class="avatar" /> +</a> + +<div class="content"> + <span class="from"> + <a href="/people/<%= author.id %>"> + {{author.name}} + </a> + </span> + + <div class="collapsible"> + {{text}} + </div> + + <div class="comment_info"> + <time class="timeago" datetime="{{created_at}}"/> + </div> +</div> diff --git a/app/views/templates/comment.jst b/app/views/templates/comment.jst deleted file mode 100644 index 97318fa041d28ee9edd14bdf3d6c4cd935661705..0000000000000000000000000000000000000000 --- a/app/views/templates/comment.jst +++ /dev/null @@ -1,28 +0,0 @@ -<div class="right controls"> - <!-- need access to post --> - <% if(ownComment) { %> - <a href="#" class="delete comment_delete" title="<%= Diaspora.I18n.t('delete') %>"> - <img alt="Deletelabel" src="/images/deletelabel.png" /> - <a/> - <% } %> -</div> - -<a href="/people/<%= author.id %>"> - <img src="<%= author.avatar.small %>" class="avatar" data-person-id="<%= author.id %>"/> -</a> - -<div class="content"> - <span class="from"> - <a href="/people/<%= author.id %>"> - <%= author.name %> - </a> - </span> - - <div class="collapsible"> - <%= text %> - </div> - - <div class="comment_info"> - <time class="timeago" datetime="<%= created_at %>"/> - </div> -</div> diff --git a/public/javascripts/app/views/comment_view.js b/public/javascripts/app/views/comment_view.js index b551ab9032e8635d9fb4655b48f564c93b0bcdbd..3c97f5190144ff9f555e740f9a8d64ed2d555469 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 57dde59ab96bda317bfe0dc2f3c1dbda529edc3b..62188da4787d8fb82dd6ada94c297031f4d9e4ca 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" });