Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UX: Slightly improved reviewable user display, plus link to admin if …
…possible
- Loading branch information
Showing
5 changed files
with
44 additions
and
5 deletions.
There are no files selected for viewing
24 changes: 21 additions & 3 deletions
24
app/assets/javascripts/discourse/templates/components/reviewable-user.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
class ReviewableUserSerializer < ReviewableSerializer | ||
|
||
attributes :link_admin | ||
|
||
payload_attributes( | ||
:username, | ||
:email, | ||
:name | ||
) | ||
|
||
def link_admin | ||
scope.is_staff? && object.target.present? | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a4ff593
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit has been mentioned on Discourse Meta. There might be relevant details there:
https://meta.discourse.org/t/link-to-user-profile-from-the-need-review-page-2-3-0-beta6/112917/8