Add icons and and archived style to categories list

This commit is contained in:
Robin Ward 2013-02-21 11:38:38 -05:00
parent c3b03e3cb6
commit c5393d93f3
2 changed files with 22 additions and 15 deletions
app
assets/javascripts/discourse/templates
serializers

View file

@ -13,20 +13,23 @@
<th class='num'>{{i18n age}}</th> <th class='num'>{{i18n age}}</th>
</tr> </tr>
{{#each topics itemTagName="tr"}} {{#each topics}}
<td class='main-link'> <tr {{bindAttr class="archived"}}>
<div class='topic-inset'> <td class='main-link'>
<a class='title excerptable' href="{{unbound lastReadUrl}}">{{unbound title}}</a> <div class='topic-inset'>
{{#if unread}} {{view Discourse.TopicStatusView topicBinding="this"}}
<a href="{{unbound lastReadUrl}}" class='badge unread badge-notification' title='{{i18n topic.unread_posts unread="unread"}}'>{{unbound unread}}</a> {{{topicLink this}}
{{/if}} {{#if unread}}
{{#if new_posts}} <a href="{{unbound lastReadUrl}}" class='badge unread badge-notification' title='{{i18n topic.unread_posts unread="unread"}}'>{{unbound unread}}</a>
<a href="{{unbound lastReadUrl}}" class='badge new-posts badge-notification' title='{{i18n topic.new_posts new_posts="new_posts"}}'>{{unbound new_posts}}</a> {{/if}}
{{/if}} {{#if new_posts}}
</div> <a href="{{unbound lastReadUrl}}" class='badge new-posts badge-notification' title='{{i18n topic.new_posts new_posts="new_posts"}}'>{{unbound new_posts}}</a>
</td> {{/if}}
<td class='num'><span class='badge-posts'>{{number posts_count}}</span></td> </div>
<td class='num'><span {{bindAttr class=":age ageCold"}} title='{{unboundDate created_at}}'>{{{unbound age}}}</a></td> </td>
<td class='num'><span class='badge-posts'>{{number posts_count}}</span></td>
<td class='num'><span {{bindAttr class=":age ageCold"}} title='{{unboundDate created_at}}'>{{{unbound age}}}</a></td>
</tr>
{{/each}} {{/each}}
</table> </table>

View file

@ -1,6 +1,10 @@
class CategoryTopicSerializer < BasicTopicSerializer class CategoryTopicSerializer < BasicTopicSerializer
attributes :slug attributes :slug,
:visible,
:pinned,
:closed,
:archived
has_one :category has_one :category