UX: show topic title in email logs

This commit is contained in:
Sam 2016-04-15 10:38:02 +10:00
parent e30c8239a2
commit a1d65ae8f6
3 changed files with 19 additions and 4 deletions

View File

@ -31,11 +31,12 @@
</td>
<td><a href='mailto:{{unbound l.to_address}}'>{{l.to_address}}</a></td>
<td>{{l.email_type}}</td>
<td>
<td class='post-link'>
{{#if l.post_url}}
<a href="{{l.post_url}}">{{l.reply_key}}</a>
<a href="{{l.post_url}}">{{l.post_description}}</a>
<span class='reply-key'>{{l.reply_key}}</span>
{{else}}
{{l.reply_key}}
<span class='reply-key'>{{l.reply_key}}</span>
{{/if}}
</td>
</tr>

View File

@ -1783,6 +1783,11 @@ table#user-badges {
.time {
width: 50px;
}
.reply-key {
display: block;
font-size: 12px;
color: dark-light-choose(scale-color($primary, $lightness: 40%), scale-color($secondary, $lightness: 40%));
}
.username div {
max-width: 180px;
white-space: nowrap;

View File

@ -8,7 +8,8 @@ class EmailLogSerializer < ApplicationSerializer
:created_at,
:skipped,
:skipped_reason,
:post_url
:post_url,
:post_description
has_one :user, serializer: BasicUserSerializer, embed: :objects
@ -24,4 +25,12 @@ class EmailLogSerializer < ApplicationSerializer
object.post.present?
end
def include_post_description?
object.post.present? && object.post.topic.present?
end
def post_description
"#{object.post.topic.title} ##{object.post.post_number}"
end
end