Skip to content

Instantly share code, notes, and snippets.

@plcosta
Created July 31, 2018 04:06
Show Gist options
  • Select an option

  • Save plcosta/38497d2b1585655e69cfe4e1eea72426 to your computer and use it in GitHub Desktop.

Select an option

Save plcosta/38497d2b1585655e69cfe4e1eea72426 to your computer and use it in GitHub Desktop.

Revisions

  1. plcosta created this gist Jul 31, 2018.
    36 changes: 36 additions & 0 deletions script.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    <script type='text/x-handlebars' data-template-name='components/latest-topic-list-item'>
    <table>
    <tbody>
    <tr data-topic-id={{topic.id}} class="{{if topic.archived 'archived'}}">

    <td class="main-link">
    <tr>
    {{raw "topic-status" topic=topic}}
    {{topic-link topic}}
    {{#if topic.featured_link}}
    {{topic-featured-link topic}}
    {{/if}}
    posters
    </tr>
    <tr>
    {{category-link topic.category}}
    {{#if topic.tags}}
    <div class="discourse-tags">
    {{#each topic.visibleListTags as |tag|}}
    {{discourse-tag tag}}
    {{/each}}
    </div>
    {{/if}}
    </tr>
    </td>
    {{raw "list/posters-column" posters=topic.posters}}
    <td class="topic-stats">
    {{raw "list/posts-count-column" topic=topic tagName="div"}}
    <div class="topic-last-activity">
    <a href="{{topic.lastPostUrl}}" title="{{topic.bumpedAtTitle}}">{{format-date topic.bumpedAt format="tiny" noTitle="true"}}</a>
    </div>
    </td>
    </tr>
    </tbody>
    </table>
    </script>