Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
275b2f5c
Commit
275b2f5c
authored
Feb 08, 2016
by
Peter Fogg
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11460 from edx/peter-fogg/edx-header-profile-image
Correctly add profile image to edX header.
parents
1109404a
f3c20e73
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
lms/static/sass/shared/_header.scss
+3
-2
themes/edx.org/lms/templates/header.html
+8
-1
No files found.
lms/static/sass/shared/_header.scss
View file @
275b2f5c
...
...
@@ -450,6 +450,7 @@ header.global-new {
.user
{
@include
float
(
right
);
margin-top
:
0
;
>
.primary
{
display
:
block
;
...
...
@@ -487,7 +488,7 @@ header.global-new {
letter-spacing
:
0
;
.user-image-frame
{
max-width
:
(
$baseline
/
2
);
max-width
:
(
$baseline
*
2
);
border-radius
:
10%
;
}
...
...
@@ -507,7 +508,7 @@ header.global-new {
.dropdown
{
font-size
:
$body-font-size
;
padding
:
0
(
$baseline
/
2
);
padding
:
(
$baseline
/
5
)
(
$baseline
/
2
);
color
:
$base-font-color
;
border
:
none
;
background
:
$white
;
...
...
themes/edx.org/lms/templates/header.html
View file @
275b2f5c
...
...
@@ -9,6 +9,8 @@ from django.utils.translation import ugettext as _
import
branding
#
app
that
handles
site
status
messages
from
status
.
status
import
get_site_status_msg
from
openedx
.
core
.
djangoapps
.
user_api
.
accounts
.
image_helpers
import
get_profile_image_urls_for_user
%
>
## Provide a hook for themes to inject branding on top.
...
...
@@ -76,7 +78,12 @@ site_status_msg = get_site_status_msg(course_id)
<li
class=
"primary"
>
<a
href=
"${reverse('dashboard')}"
class=
"user-link"
>
<span
class=
"sr"
>
${_("Dashboard for:")}
</span>
<div>
${user.username}
</div>
<
%
username =
user.username
profile_image_url =
get_profile_image_urls_for_user(user)['medium']
%
>
<img
class=
"user-image-frame"
src=
"${profile_image_url}"
alt=
"${_('Profile image for {username}').format(username=username)}"
>
<div
class=
"label-username"
>
${username}
</div>
</a>
</li>
<li
class=
"primary"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment