- Renamed 'stream-item' component to 'user-stream-item' - Replaced generic 'item' class with clearer 'user-stream-item' class - Retained 'item' class for backward compatibility, marked as 'DEPRECATED' - Extracted CSS pertaining 'user-stream-item' component to component CSS files - Removed unnecessary duplication from 'user-stream-item' CSS - Removed unnecessary nesting from 'user-stream-item' CSS
43 lines
1.9 KiB
Handlebars
43 lines
1.9 KiB
Handlebars
<div class='clearfix info'>
|
|
<a href={{item.userUrl}} data-user-card={{item.username}} class='avatar-link'><div class='avatar-wrapper'>{{avatar item imageSize="large" extraClasses="actor" ignoreTitle="true"}}</div></a>
|
|
<span class='time'>{{format-date item.created_at}}</span>
|
|
{{expand-post item=item}}
|
|
{{topic-status topic=item disableActions=true}}
|
|
<span class="title">
|
|
<a href={{item.postUrl}}>{{{item.title}}}</a>
|
|
</span>
|
|
<div class="category">{{category-link item.category}}</div>
|
|
|
|
{{#if item.deleted_by}}
|
|
<span class="delete-info">
|
|
{{d-icon "trash-o"}}
|
|
{{avatar item.deleted_by imageSize="tiny" extraClasses="actor" ignoreTitle="true"}}
|
|
{{format-date item.deleted_at leaveAgo="true"}}
|
|
</span>
|
|
{{/if}}
|
|
|
|
{{plugin-outlet name="user-stream-item-header" args=(hash item=item)}}
|
|
</div>
|
|
|
|
{{#if actionDescription}}
|
|
<p class='excerpt'>{{actionDescription}}</p>
|
|
{{/if}}
|
|
|
|
<p class='excerpt' data-topic-id="{{item.topic_id}}" data-post-id="{{item.post_id}}" data-user-id="{{item.user_id}}">{{{item.excerpt}}}</p>
|
|
|
|
{{#each item.children as |child|}}
|
|
<div class='user-stream-item-actions child-actions'>{{!-- DEPRECATED: 'child-actions' class --}}
|
|
{{d-icon child.icon class="icon"}}
|
|
{{#each child.items as |grandChild|}}
|
|
{{#if grandChild.removableBookmark}}
|
|
<button class="btn btn-default remove-bookmark" {{action removeBookmark grandChild}}>
|
|
{{d-icon 'times'}} {{i18n "bookmarks.remove"}}
|
|
</button>
|
|
{{else}}
|
|
<a href={{grandChild.userUrl}} data-user-card={{grandChild.username}} class='avatar-link'><div class='avatar-wrapper'>{{avatar grandChild imageSize="tiny" extraClasses="actor" ignoreTitle="true" avatarTemplatePath="acting_avatar_template"}}</div></a>
|
|
{{#if grandChild.edit_reason}} — <span class="edit-reason">{{grandChild.edit_reason}}</span>{{/if}}
|
|
{{/if}}
|
|
{{/each}}
|
|
</div>
|
|
{{/each}}
|