FEATURE: Add category to Group Post Listing

This commit is contained in:
cpradio 2014-11-14 19:30:05 -05:00
parent 22fa46b1f2
commit ce78cb1ee4
4 changed files with 11 additions and 3 deletions

View file

@ -7,6 +7,7 @@
<span class="title">
<a href="{{unbound url}}">{{unbound title}}</a>
</span>
<span class="category">{{category-link category}}</span>
{{#if byName}}
<span class="name">
{{unbound byName}}

View file

@ -452,12 +452,13 @@
text-overflow: ellipsis;
}
.name {
display: block;
display: inline-block;
font-size: 14px;
max-width: 400px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: middle;
}
.edit-reason {
background-color: scale-color($highlight, $lightness: 25%);

View file

@ -459,12 +459,13 @@
text-overflow: ellipsis;
}
.name {
display: block;
display: inline-block;
font-size: 14px;
max-width: 400px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: middle;
}
.edit-reason {
background-color: scale-color($highlight, $lightness: 25%);

View file

@ -5,7 +5,8 @@ class GroupPostSerializer < ApplicationSerializer
:title,
:url,
:user_title,
:user_long_name
:user_long_name,
:category
has_one :user, serializer: BasicUserSerializer, embed: :objects
@ -24,5 +25,9 @@ class GroupPostSerializer < ApplicationSerializer
def include_user_long_name?
SiteSetting.enable_names?
end
def category
object.topic.category
end
end