Skip to content
This repository was archived by the owner on Apr 3, 2021. It is now read-only.

Commit 7da01e2

Browse files
committed
Changes to user expansion
1 parent 7eac730 commit 7da01e2

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

app/assets/javascripts/discourse/controllers/poster_expansion_controller.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Discourse.PosterExpansionController = Discourse.ObjectController.extend({
1111
visible: false,
1212
user: null,
1313

14+
showFilter: Em.computed.alias('controllers.topic.postStream.hasNoFilters'),
15+
1416
show: function(post) {
1517

1618
var currentUsername = this.get('username');

app/assets/javascripts/discourse/templates/poster_expansion.handlebars

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{{#if model}}
22
{{boundAvatar model imageSize="huge"}}
33

4-
<h1>{{username}}</h1>
4+
<h1><a {{bindAttr href="usernameUrl"}}>{{username}}</a></h1>
55
<h2>{{name}}</h2>
66

77
{{#if user}}
8-
<h3>{{i18n last_post}}: {{date path="user.last_posted_at" leaveAgo="true"}}</h3>
8+
<h3>{{i18n last_post}} {{date path="user.last_posted_at" leaveAgo="true"}}</h3>
99

1010
<div class='bottom'>
1111
{{#if user.bio_cooked}}<div class='bio'>{{{user.bio_cooked}}}</div>{{/if}}
@@ -14,9 +14,12 @@
1414
<button class='btn' {{action composePrivateMessage user}}><i class='icon icon-envelope'></i>{{i18n user.private_message}}</button>
1515
{{/if}}
1616

17-
{{#link-to 'user' user class="btn"}}<i class='icon icon-user'></i>{{i18n user.profile}}{{/link-to}}
17+
{{#link-to 'user' user class="btn"}}<i class='icon icon-user'></i>{{i18n user.show_profile}}{{/link-to}}
18+
19+
{{#if showFilter}}
20+
<button class='btn' {{action togglePosts user}}><i class='icon icon-filter'></i>{{i18n topic.filter_to username="username"}}</button>
21+
{{/if}}
1822

19-
<button class='btn' {{action togglePosts user}}><i class='icon icon-filter'></i>{{i18n topic.filter_to username="username"}}</button>
2023
</div>
2124
{{else}}
2225
<p class='loading'>{{i18n loading}}</p>

app/assets/stylesheets/desktop/poster_expansion.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
font-size: 30px;
1818
line-height: 33px;
1919
margin-bottom: 8px;
20+
21+
a {
22+
color: #333;
23+
}
2024
}
2125

2226
h2 {

config/locales/client.en.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ en:
185185
user:
186186
said: "{{username}} said:"
187187
profile: "Profile"
188+
show_profile: "Show Profile"
188189
mute: "Mute"
189190
edit: "Edit Preferences"
190191
download_archive: "download archive of my posts"
@@ -581,7 +582,7 @@ en:
581582
title: Topic Rank Details
582583

583584
topic:
584-
filter_to: "Toggle only posts by {{username}} in this topic"
585+
filter_to: "Show only posts by {{username}} in this topic"
585586
create_in: 'Create {{categoryName}} Topic'
586587
create: 'Create Topic'
587588
create_long: 'Create a new Topic'

0 commit comments

Comments
 (0)