convert comment underscore template to a handlebars template.

This commit is contained in:
danielgrippi 2012-01-22 23:36:56 -08:00
parent 3a76490640
commit 0a670ccf8a
4 changed files with 31 additions and 31 deletions

View file

@ -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>

View file

@ -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>

View file

@ -1,7 +1,6 @@
app.views.Comment = app.views.Content.extend({
legacyTemplate : true,
template_name: "#comment-template",
templateName: "comment",
tagName : "li",

View file

@ -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"
});