Merge pull request #3454 from fantasticfears/group-page

FIX: show user card on group page and fix styles
This commit is contained in:
Régis Hanol 2015-05-18 14:28:43 +02:00
commit 3f7d693786
6 changed files with 9 additions and 36 deletions

View File

@ -3,6 +3,7 @@ import ObjectController from 'discourse/controllers/object';
// The basic controller for a group // The basic controller for a group
export default ObjectController.extend({ export default ObjectController.extend({
counts: null, counts: null,
showing: null,
// It would be nice if bootstrap marked action lists as selected when their links // It would be nice if bootstrap marked action lists as selected when their links
// were 'active' not the `li` tags. // were 'active' not the `li` tags.

View File

@ -1,21 +0,0 @@
export default Em.ObjectController.extend({
byName: function() {
var result = "",
longName = this.get('user_long_name'),
title = this.get('user_title');
if (!Em.isEmpty(longName)) {
result += longName;
}
if (!Em.isEmpty(title)) {
if (result.length > 0) {
result += ", ";
}
result += title;
}
return result;
}.property()
});

View File

@ -19,7 +19,7 @@
<section class='user-right groups'> <section class='user-right groups'>
<section class='about group'> <section class='about group'>
<div class='details'> <div class='details'>
<h1>{{name}}</h1> <h1>{{model.name}}</h1>
</div> </div>
</section> </section>
{{outlet}} {{outlet}}

View File

@ -1,18 +1,18 @@
<div class='user-stream'> <div class='user-stream'>
{{#each p in model itemController="group/post"}} {{#each p in controller}}
<div class='item'> <div class='item'>
<div class='clearfix info'> <div class='clearfix info'>
{{#link-to 'user' p.user class="avatar-link"}}<div class='avatar-wrapper'>{{avatar p.user imageSize="large" extraClasses="actor" ignoreTitle="true"}}</div>{{/link-to}} <a href="{{unbound p.user.userUrl}}" data-user-card="{{unbound p.user.username}}" class='avatar-link'><div class='avatar-wrapper'>{{avatar p.user imageSize="large" extraClasses="actor" ignoreTitle="true"}}</div></a>
<span class='time'>{{format-date p.created_at leaveAgo="true"}}</span> <span class='time'>{{format-date p.created_at leaveAgo="true"}}</span>
<span class="title"> <span class="title">
<a href="{{unbound p.url}}">{{unbound p.title}}</a> <a href="{{unbound p.url}}">{{unbound p.title}}</a>
</span> </span>
<span class="category">{{category-link p.category}}</span> <span class="category">{{category-link p.category}}</span>
{{#if p.byName}} <div class="user-info">
<span class="name"> {{#if p.user_long_name}}
{{unbound p.byName}} {{p.user_long_name}}{{#if p.user_title}}, {{p.user_title}}{{/if}}
</span> {{/if}}
{{/if}} </div>
</div> </div>
<p class='excerpt'> <p class='excerpt'>
{{{unbound p.cooked}}} {{{unbound p.cooked}}}

View File

@ -448,21 +448,17 @@
margin-right: 4px; margin-right: 4px;
} }
.title { .title {
display: block;
font-size: 1em; font-size: 1em;
max-width: 80%;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.name { .name {
display: inline-block;
font-size: 1em; font-size: 1em;
max-width: 400px; max-width: 400px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
vertical-align: middle;
} }
.edit-reason { .edit-reason {
background-color: scale-color($highlight, $lightness: 25%); background-color: scale-color($highlight, $lightness: 25%);

View File

@ -442,15 +442,12 @@
margin-right: 4px; margin-right: 4px;
} }
.title { .title {
display: block;
font-size: 1em; font-size: 1em;
max-width: 80%;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.name { .name {
display: inline-block;
font-size: 1em; font-size: 1em;
max-width: 400px; max-width: 400px;
white-space: nowrap; white-space: nowrap;