-
Notifications
You must be signed in to change notification settings - Fork 8.2k
/
bookmark-list.hbs
75 lines (75 loc) · 3.41 KB
/
bookmark-list.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{{#conditional-loading-spinner condition=loading}}
{{#load-more selector=".bookmark-list .bookmark-list-item" action=loadMore}}
<table class="topic-list bookmark-list">
<thead>
{{#unless site.mobileView}}
<th>{{i18n "topic.title"}}</th>
<th> </th>
<th class="post-metadata">{{i18n "post.bookmarks.updated"}}</th>
<th class="post-metadata">{{i18n "activity"}}</th>
<th> </th>
{{/unless}}
</thead>
<tbody>
{{#each content as |bookmark|}}
<tr class="topic-list-item bookmark-list-item">
<td class="main-link" role="rowheader">
<span class="link-top-line">
<div class="bookmark-metadata">
{{#if bookmark.reminder_at}}
<span class="bookmark-metadata-item">
{{d-icon "far-clock"}}{{bookmark.formattedReminder}}
</span>
{{/if}}
{{#if bookmark.name}}
<span class="bookmark-metadata-item">
{{d-icon "info-circle"}}<span>{{bookmark.name}}</span>
</span>
{{/if}}
</div>
<div class="bookmark-status-with-link">
{{#if bookmark.pinned}}
{{d-icon "thumbtack" class="bookmark-pinned"}}
{{/if}}
{{~topic-status topic=bookmark.topicStatus~}}
{{topic-link bookmark.topicLink}}
</div>
</span>
<div class="link-bottom-line">
{{category-link bookmark.category}}
{{discourse-tags bookmark mode="list" tagsForUser=tagsForUser}}
</div>
{{#if (and site.mobileView bookmark.excerpt bookmark.post_user_avatar_template)}}
<a href={{bookmark.postUser.path}} data-user-card={{bookmark.post_user_username}} class="avatar">
{{avatar bookmark.postUser avatarTemplatePath="avatar_template" usernamePath="username" namePath="name" imageSize="small"}}
</a>
{{!-- template-lint-disable --}}
<p class="post-excerpt" {{on "click" this.screenExcerptForExternalLink}}>{{html-safe bookmark.excerpt}}</p>
{{/if}}
</td>
{{#unless site.mobileView}}
<td>
{{#if bookmark.post_user_avatar_template}}
<a href={{bookmark.postUser.path}} data-user-card={{bookmark.post_user_username}} class="avatar">
{{avatar bookmark.postUser avatarTemplatePath="avatar_template" usernamePath="username" namePath="name" imageSize="small"}}
</a>
{{/if}}
</td>
<td class="post-metadata">{{format-date bookmark.updated_at format="tiny"}}</td>
{{raw "list/activity-column" topic=bookmark class="num post-metadata" tagName="td"}}
{{/unless}}
<td>
{{bookmark-actions-dropdown
bookmark=bookmark
removeBookmark=(action "removeBookmark")
editBookmark=(action "editBookmark")
togglePinBookmark=(action "togglePinBookmark")
}}
</td>
</tr>
{{/each}}
</tbody>
</table>
{{conditional-loading-spinner condition=loadingMore}}
{{/load-more}}
{{/conditional-loading-spinner}}