Remove unused view, use preferred dash format for filenames, add

warnings when templates are missing
This commit is contained in:
Robin Ward 2014-10-29 10:39:06 -04:00
parent daf7239d87
commit 44ff357e1c
10 changed files with 16 additions and 16 deletions

View File

@ -1,11 +1,17 @@
Handlebars.registerHelper('raw', function(property, options) {
var template = Discourse.__container__.lookup('template:' + property + ".raw"),
var templateName = property + ".raw",
template = Discourse.__container__.lookup('template:' + templateName),
params = options.hash;
if (!template) {
Ember.warn('Could not find raw template: ' + templateName);
return;
}
if (params) {
for (var prop in params) {
if (options.hashTypes[prop] === "ID") {
params[prop] = Em.Handlebars.get(this, params[prop], options);
params[prop] = Ember.Handlebars.get(this, params[prop], options);
}
}
}

View File

@ -28,7 +28,7 @@
url=topic.lastUnreadUrl}}
</td>
{{raw "list/category_column" hideCategory=controller.hideCategory category=topic.category}}
{{raw "list/category-column" hideCategory=controller.hideCategory category=topic.category}}
{{posts-count-column topic=topic class="num" action="clickedPosts"}}
@ -44,7 +44,7 @@
{{number topic.views numberKey="views_long"}}
</td>
{{raw "list/activity_column" topic=topic class="num" tagName="td"}}
{{raw "list/activity-column" topic=topic class="num" tagName="td"}}
</tr>
{{/grouped-each}}
</tbody>

View File

@ -17,13 +17,13 @@
{{topic-post-badges unread=unread newPosts=displayNewPosts unseen=unseen url=lastUnreadUrl}}
{{/if}}
{{raw "list/topic_excerpt" topic=model}}
{{raw "list/topic-excerpt" topic=model}}
</td>
{{raw "list/category_column" hideCategory=hideCategory category=category}}
{{raw "list/posters_column" posters=posters}}
{{raw "list/category-column" hideCategory=hideCategory category=category}}
{{raw "list/posters-column" posters=posters}}
{{posts-count-column topic=model class="num" action="showTopicEntrance"}}
<td class="num views {{unbound viewsHeat}}">{{number views numberKey="views_long"}}</td>
{{raw "list/activity_column" topic=model class="num" tagName="td"}}
{{raw "list/activity-column" topic=model class="num" tagName="td"}}

View File

@ -27,7 +27,7 @@
<div class="topic-item-stats clearfix">
<div class="pull-right">
{{posts-count-column topic=topic tagName="div" class="num posts" action="clickedPosts"}}
{{raw "list/activity_column" topic=topic tagName="div" class="num activity last"}}
{{raw "list/activity-column" topic=topic tagName="div" class="num activity last"}}
</div>
{{#unless controller.hideCategory}}
<div class='category'>

View File

@ -31,7 +31,7 @@
{{posts-count-column topic=this tagName="div" class="num posts" action="showTopicEntrance"}}
<div class='num activity last'>
<a href="{{lastPostUrl}}" title='{{i18n last_post}}: {{{raw-date bumped_at}}}'>{{last_poster_username}}</a>
{{raw "list/activity_column" topic=this tagName="span" class="age"}}
{{raw "list/activity-column" topic=this tagName="span" class="age"}}
</div>
</div>
<div class="clearfix"></div>

View File

@ -1,6 +0,0 @@
export default Ember.CollectionView.extend({
classNames: ['posters'],
tagName: 'td',
content: Em.computed.alias('posters'),
itemViewClass: 'topic-list-poster'
});