mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FEATURE: Add category to Group Post Listing
This commit is contained in:
parent
22fa46b1f2
commit
ce78cb1ee4
4 changed files with 11 additions and 3 deletions
|
@ -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}}
|
||||
|
|
|
@ -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%);
|
||||
|
|
|
@ -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%);
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue