Merge pull request #3453 from techAPJ/patch-1
UX: show lock icon in user stream if topic is closed/archived
This commit is contained in:
commit
7a6aab24f1
|
@ -3,6 +3,7 @@
|
||||||
<div class='clearfix info'>
|
<div class='clearfix info'>
|
||||||
<a href="{{unbound item.userUrl}}" data-user-card="{{unbound item.username}}" class='avatar-link'><div class='avatar-wrapper'>{{avatar item imageSize="large" extraClasses="actor" ignoreTitle="true"}}</div></a>
|
<a href="{{unbound item.userUrl}}" data-user-card="{{unbound 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>
|
<span class='time'>{{format-date item.created_at}}</span>
|
||||||
|
{{topic-status topic=item disableActions=true}}
|
||||||
<span class="title">
|
<span class="title">
|
||||||
<a href="{{unbound item.postUrl}}">{{unbound item.title}}</a>
|
<a href="{{unbound item.postUrl}}">{{unbound item.title}}</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -142,6 +142,7 @@ SQL
|
||||||
SELECT
|
SELECT
|
||||||
a.id,
|
a.id,
|
||||||
t.title, a.action_type, a.created_at, t.id topic_id,
|
t.title, a.action_type, a.created_at, t.id topic_id,
|
||||||
|
t.closed AS topic_closed, t.archived AS topic_archived,
|
||||||
a.user_id AS target_user_id, au.name AS target_name, au.username AS target_username,
|
a.user_id AS target_user_id, au.name AS target_name, au.username AS target_username,
|
||||||
coalesce(p.post_number, 1) post_number, p.id as post_id,
|
coalesce(p.post_number, 1) post_number, p.id as post_id,
|
||||||
p.reply_to_post_number,
|
p.reply_to_post_number,
|
||||||
|
|
|
@ -26,6 +26,8 @@ class UserActionSerializer < ApplicationSerializer
|
||||||
:edit_reason,
|
:edit_reason,
|
||||||
:category_id,
|
:category_id,
|
||||||
:uploaded_avatar_id,
|
:uploaded_avatar_id,
|
||||||
|
:closed,
|
||||||
|
:archived,
|
||||||
:acting_uploaded_avatar_id
|
:acting_uploaded_avatar_id
|
||||||
|
|
||||||
def excerpt
|
def excerpt
|
||||||
|
@ -77,4 +79,12 @@ class UserActionSerializer < ApplicationSerializer
|
||||||
object.action_type == UserAction::EDIT
|
object.action_type == UserAction::EDIT
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def closed
|
||||||
|
object.topic_closed
|
||||||
|
end
|
||||||
|
|
||||||
|
def archived
|
||||||
|
object.topic_archived
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue