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
2e7da198
Commit
2e7da198
authored
Jul 14, 2015
by
frances botsford
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8321 from edx/frances/lms/user-menu-cleanup
LMS User menu cleanup
parents
49320073
b604d647
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
35 deletions
+28
-35
common/test/acceptance/pages/lms/dashboard.py
+6
-6
common/test/acceptance/tests/lms/test_account_settings.py
+3
-3
common/test/acceptance/tests/lms/test_learner_profile.py
+9
-9
lms/static/sass/shared/_header.scss
+4
-11
lms/templates/navigation-edx.html
+3
-3
lms/templates/navigation.html
+3
-3
No files found.
common/test/acceptance/pages/lms/dashboard.py
View file @
2e7da198
...
@@ -173,14 +173,14 @@ class DashboardPage(PageObject):
...
@@ -173,14 +173,14 @@ class DashboardPage(PageObject):
"""
"""
return
self
.
q
(
css
=
'.dropdown-menu li a'
)
.
text
return
self
.
q
(
css
=
'.dropdown-menu li a'
)
.
text
def
click_
account_settings
_link
(
self
):
def
click_
my_profile
_link
(
self
):
"""
"""
Click on `
Account Settings
` link.
Click on `
Profile
` link.
"""
"""
self
.
q
(
css
=
'.dropdown-menu li a'
)
.
first
.
click
()
self
.
q
(
css
=
'.dropdown-menu li a'
)
.
nth
(
1
)
.
click
()
def
click_
my_profile
_link
(
self
):
def
click_
account_settings
_link
(
self
):
"""
"""
Click on `
My Profile
` link.
Click on `
Account
` link.
"""
"""
self
.
q
(
css
=
'.dropdown-menu li a'
)
.
nth
(
1
)
.
click
()
self
.
q
(
css
=
'.dropdown-menu li a'
)
.
nth
(
2
)
.
click
()
common/test/acceptance/tests/lms/test_account_settings.py
View file @
2e7da198
...
@@ -85,19 +85,19 @@ class DashboardMenuTest(AccountSettingsTestMixin, WebAppTest):
...
@@ -85,19 +85,19 @@ class DashboardMenuTest(AccountSettingsTestMixin, WebAppTest):
"""
"""
def
test_link_on_dashboard_works
(
self
):
def
test_link_on_dashboard_works
(
self
):
"""
"""
Scenario: Verify that the "Account
Settings
" link works from the dashboard.
Scenario: Verify that the "Account" link works from the dashboard.
Given that I am a registered user
Given that I am a registered user
And I visit my dashboard
And I visit my dashboard
And I click on "Account
Settings
" in the top drop down
And I click on "Account" in the top drop down
Then I should see my account settings page
Then I should see my account settings page
"""
"""
self
.
log_in_as_unique_user
()
self
.
log_in_as_unique_user
()
dashboard_page
=
DashboardPage
(
self
.
browser
)
dashboard_page
=
DashboardPage
(
self
.
browser
)
dashboard_page
.
visit
()
dashboard_page
.
visit
()
dashboard_page
.
click_username_dropdown
()
dashboard_page
.
click_username_dropdown
()
self
.
assertIn
(
'Account
Settings
'
,
dashboard_page
.
username_dropdown_link_text
)
self
.
assertIn
(
'Account'
,
dashboard_page
.
username_dropdown_link_text
)
dashboard_page
.
click_account_settings_link
()
dashboard_page
.
click_account_settings_link
()
...
...
common/test/acceptance/tests/lms/test_learner_profile.py
View file @
2e7da198
...
@@ -237,15 +237,15 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
...
@@ -237,15 +237,15 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
Given that I am a registered user.
Given that I am a registered user.
When I go to Dashboard page.
When I go to Dashboard page.
And I click on username dropdown.
And I click on username dropdown.
Then I see
My
Profile link in the dropdown menu.
Then I see Profile link in the dropdown menu.
When I click on
My
Profile link.
When I click on Profile link.
Then I will be navigated to
My
Profile page.
Then I will be navigated to Profile page.
"""
"""
username
,
user_id
=
self
.
log_in_as_unique_user
()
username
,
user_id
=
self
.
log_in_as_unique_user
()
dashboard_page
=
DashboardPage
(
self
.
browser
)
dashboard_page
=
DashboardPage
(
self
.
browser
)
dashboard_page
.
visit
()
dashboard_page
.
visit
()
dashboard_page
.
click_username_dropdown
()
dashboard_page
.
click_username_dropdown
()
self
.
assertTrue
(
'
My
Profile'
in
dashboard_page
.
username_dropdown_link_text
)
self
.
assertTrue
(
'Profile'
in
dashboard_page
.
username_dropdown_link_text
)
dashboard_page
.
click_my_profile_link
()
dashboard_page
.
click_my_profile_link
()
my_profile_page
=
LearnerProfilePage
(
self
.
browser
,
username
)
my_profile_page
=
LearnerProfilePage
(
self
.
browser
,
username
)
my_profile_page
.
wait_for_page
()
my_profile_page
.
wait_for_page
()
...
@@ -255,7 +255,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
...
@@ -255,7 +255,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
Scenario: Verify that desired fields are shown when looking at her own private profile.
Scenario: Verify that desired fields are shown when looking at her own private profile.
Given that I am a registered user.
Given that I am a registered user.
And I visit
M
y Profile page.
And I visit
m
y Profile page.
And I set the profile visibility to private.
And I set the profile visibility to private.
And I reload the page.
And I reload the page.
Then I should see the profile visibility selector dropdown.
Then I should see the profile visibility selector dropdown.
...
@@ -271,7 +271,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
...
@@ -271,7 +271,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
Scenario: Verify that desired fields are shown when looking at her own public profile.
Scenario: Verify that desired fields are shown when looking at her own public profile.
Given that I am a registered user.
Given that I am a registered user.
And I visit
M
y Profile page.
And I visit
m
y Profile page.
And I set the profile visibility to public.
And I set the profile visibility to public.
And I reload the page.
And I reload the page.
Then I should see the profile visibility selector dropdown.
Then I should see the profile visibility selector dropdown.
...
@@ -316,7 +316,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
...
@@ -316,7 +316,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
Test behaviour of `Country` field.
Test behaviour of `Country` field.
Given that I am a registered user.
Given that I am a registered user.
And I visit
M
y Profile page.
And I visit
m
y Profile page.
And I set the profile visibility to public and set default values for public fields.
And I set the profile visibility to public and set default values for public fields.
Then I set country value to `Pakistan`.
Then I set country value to `Pakistan`.
Then displayed country should be `Pakistan` and country field mode should be `display`
Then displayed country should be `Pakistan` and country field mode should be `display`
...
@@ -340,7 +340,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
...
@@ -340,7 +340,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
Test behaviour of `Language` field.
Test behaviour of `Language` field.
Given that I am a registered user.
Given that I am a registered user.
And I visit
M
y Profile page.
And I visit
m
y Profile page.
And I set the profile visibility to public and set default values for public fields.
And I set the profile visibility to public and set default values for public fields.
Then I set language value to `Urdu`.
Then I set language value to `Urdu`.
Then displayed language should be `Urdu` and language field mode should be `display`
Then displayed language should be `Urdu` and language field mode should be `display`
...
@@ -369,7 +369,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
...
@@ -369,7 +369,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
Test behaviour of `About Me` field.
Test behaviour of `About Me` field.
Given that I am a registered user.
Given that I am a registered user.
And I visit
M
y Profile page.
And I visit
m
y Profile page.
And I set the profile visibility to public and set default values for public fields.
And I set the profile visibility to public and set default values for public fields.
Then I set about me value to `Eat Sleep Code`.
Then I set about me value to `Eat Sleep Code`.
Then displayed about me should be `Eat Sleep Code` and about me field mode should be `display`
Then displayed about me should be `Eat Sleep Code` and about me field mode should be `display`
...
...
lms/static/sass/shared/_header.scss
View file @
2e7da198
...
@@ -88,8 +88,6 @@ header.global {
...
@@ -88,8 +88,6 @@ header.global {
>
a
{
>
a
{
@include
background-image
(
$button-bg-image
);
@include
background-image
(
$button-bg-image
);
background-color
:
$button-bg-color
;
background-color
:
$button-bg-color
;
border
:
1px
solid
$border-color-2
;
border-radius
:
3px
;
@include
box-sizing
(
border-box
);
@include
box-sizing
(
border-box
);
box-shadow
:
0
1px
0
0
rgba
(
255
,
255
,
255
,
0
.6
);
box-shadow
:
0
1px
0
0
rgba
(
255
,
255
,
255
,
0
.6
);
color
:
$base-font-color
;
color
:
$base-font-color
;
...
@@ -128,15 +126,12 @@ header.global {
...
@@ -128,15 +126,12 @@ header.global {
>
a
{
>
a
{
margin
:
0
;
margin
:
0
;
@include
border-right-radius
(
0px
);
background-image
:
none
;
background-image
:
none
;
}
}
&
:last-child
{
&
:last-child
{
>
a
{
>
a
{
@include
border-radius
(
0
,
4px
,
4px
,
0
);
padding
:
(
$baseline
/
5
)
(
$baseline
/
2
);
@include
border-left
(
none
);
padding
:
(
$baseline
/
4
)
8px
11px
(
$baseline
/
2
);
&
.shopping-cart
{
&
.shopping-cart
{
border-radius
:
4px
;
border-radius
:
4px
;
...
@@ -149,7 +144,7 @@ header.global {
...
@@ -149,7 +144,7 @@ header.global {
}
}
a
.user-link
{
a
.user-link
{
@include
padding
(
5px
,
1
2px
,
10px
,
10px
);
@include
padding
(
5px
,
2px
,
10px
,
10px
);
position
:
relative
;
position
:
relative
;
text-transform
:
none
;
text-transform
:
none
;
font-size
:
14px
;
font-size
:
14px
;
...
@@ -437,8 +432,6 @@ header.global-new {
...
@@ -437,8 +432,6 @@ header.global-new {
>
a
{
>
a
{
@include
background-image
(
$button-bg-image
);
@include
background-image
(
$button-bg-image
);
background-color
:
$button-bg-color
;
background-color
:
$button-bg-color
;
border
:
1px
solid
$border-color-2
;
border-radius
:
3px
;
@include
box-sizing
(
border-box
);
@include
box-sizing
(
border-box
);
box-shadow
:
0
1px
0
0
rgba
(
255
,
255
,
255
,
0
.6
);
box-shadow
:
0
1px
0
0
rgba
(
255
,
255
,
255
,
0
.6
);
color
:
$base-font-color
;
color
:
$base-font-color
;
...
@@ -482,7 +475,7 @@ header.global-new {
...
@@ -482,7 +475,7 @@ header.global-new {
>
a
{
>
a
{
@include
border-radius
(
0
,
4px
,
4px
,
0
);
@include
border-radius
(
0
,
4px
,
4px
,
0
);
@include
border-left
(
none
);
@include
border-left
(
none
);
padding
:
5px
8px
7px
8px
;
padding
:
(
$baseline
/
5
)
(
$baseline
/
2
)
;
&
.shopping-cart
{
&
.shopping-cart
{
border-radius
:
4px
;
border-radius
:
4px
;
...
@@ -494,7 +487,7 @@ header.global-new {
...
@@ -494,7 +487,7 @@ header.global-new {
}
}
}
}
a
.user-link
{
a
.user-link
{
@include
padding
(
3px
,
12px
,
8px
,
8
px
);
@include
padding
(
5px
,
2px
,
10px
,
10
px
);
position
:
relative
;
position
:
relative
;
text-transform
:
none
;
text-transform
:
none
;
font-size
:
14px
;
font-size
:
14px
;
...
...
lms/templates/navigation-edx.html
View file @
2e7da198
...
@@ -73,7 +73,6 @@ site_status_msg = get_site_status_msg(course_id)
...
@@ -73,7 +73,6 @@ site_status_msg = get_site_status_msg(course_id)
<ul
class=
"user"
>
<ul
class=
"user"
>
<li
class=
"primary"
>
<li
class=
"primary"
>
<a
href=
"${reverse('dashboard')}"
class=
"user-link"
>
<a
href=
"${reverse('dashboard')}"
class=
"user-link"
>
<i
class=
"icon fa fa-home"
aria-hidden=
"true"
></i>
<span
class=
"sr"
>
${_("Dashboard for:")}
</span>
<span
class=
"sr"
>
${_("Dashboard for:")}
</span>
<div>
${user.username}
</div>
<div>
${user.username}
</div>
</a>
</a>
...
@@ -82,8 +81,9 @@ site_status_msg = get_site_status_msg(course_id)
...
@@ -82,8 +81,9 @@ site_status_msg = get_site_status_msg(course_id)
<a
href=
"#"
class=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
><span
class=
"sr"
>
${_("More options dropdown")}
</span>
▾
</a>
<a
href=
"#"
class=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
><span
class=
"sr"
>
${_("More options dropdown")}
</span>
▾
</a>
<ul
class=
"dropdown-menu"
aria-label=
"More Options"
role=
"menu"
>
<ul
class=
"dropdown-menu"
aria-label=
"More Options"
role=
"menu"
>
<
%
block
name=
"navigation_dropdown_menu_links"
>
<
%
block
name=
"navigation_dropdown_menu_links"
>
<li><a
href=
"${reverse('account_settings')}"
>
${_("Account Settings")}
</a></li>
<li><a
href=
"${reverse('dashboard')}"
>
${_("Dashboard")}
</a></li>
<li><a
href=
"${reverse('learner_profile', kwargs={'username': user.username})}"
>
${_("My Profile")}
</a></li>
<li><a
href=
"${reverse('learner_profile', kwargs={'username': user.username})}"
>
${_("Profile")}
</a></li>
<li><a
href=
"${reverse('account_settings')}"
>
${_("Account")}
</a></li>
</
%
block>
</
%
block>
<li><a
href=
"${reverse('logout')}"
role=
"menuitem"
>
${_("Sign Out")}
</a></li>
<li><a
href=
"${reverse('logout')}"
role=
"menuitem"
>
${_("Sign Out")}
</a></li>
</ul>
</ul>
...
...
lms/templates/navigation.html
View file @
2e7da198
...
@@ -79,7 +79,6 @@ site_status_msg = get_site_status_msg(course_id)
...
@@ -79,7 +79,6 @@ site_status_msg = get_site_status_msg(course_id)
<ol
class=
"user"
>
<ol
class=
"user"
>
<li
class=
"primary"
>
<li
class=
"primary"
>
<a
href=
"${reverse('dashboard')}"
class=
"user-link"
>
<a
href=
"${reverse('dashboard')}"
class=
"user-link"
>
<i
class=
"icon fa fa-home"
aria-hidden=
"true"
></i>
<span
class=
"sr"
>
${_("Dashboard for:")}
</span>
<span
class=
"sr"
>
${_("Dashboard for:")}
</span>
<div>
<div>
${user.username}
${user.username}
...
@@ -90,8 +89,9 @@ site_status_msg = get_site_status_msg(course_id)
...
@@ -90,8 +89,9 @@ site_status_msg = get_site_status_msg(course_id)
<a
href=
"#"
class=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
><span
class=
"sr"
>
${_("More options dropdown")}
</span><i
class=
"fa fa-sort-desc"
aria-hidden=
"true"
></i></a>
<a
href=
"#"
class=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
><span
class=
"sr"
>
${_("More options dropdown")}
</span><i
class=
"fa fa-sort-desc"
aria-hidden=
"true"
></i></a>
<ul
class=
"dropdown-menu"
aria-label=
"More Options"
role=
"menu"
>
<ul
class=
"dropdown-menu"
aria-label=
"More Options"
role=
"menu"
>
<
%
block
name=
"navigation_dropdown_menu_links"
>
<
%
block
name=
"navigation_dropdown_menu_links"
>
<li><a
href=
"${reverse('account_settings')}"
>
${_("Account Settings")}
</a></li>
<li><a
href=
"${reverse('dashboard')}"
>
${_("Dashboard")}
</a></li>
<li><a
href=
"${reverse('learner_profile', kwargs={'username': user.username})}"
>
${_("My Profile")}
</a></li>
<li><a
href=
"${reverse('learner_profile', kwargs={'username': user.username})}"
>
${_("Profile")}
</a></li>
<li><a
href=
"${reverse('account_settings')}"
>
${_("Account")}
</a></li>
</
%
block>
</
%
block>
<li><a
href=
"${reverse('logout')}"
role=
"menuitem"
>
${_("Sign Out")}
</a></li>
<li><a
href=
"${reverse('logout')}"
role=
"menuitem"
>
${_("Sign Out")}
</a></li>
</ul>
</ul>
...
...
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