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
cac6a319
Commit
cac6a319
authored
Aug 05, 2013
by
Adam Palay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add university_profile/edge.html for edge landing page
parent
f85cfc11
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
2 deletions
+78
-2
lms/djangoapps/branding/views.py
+12
-2
lms/templates/university_profile/edge.html
+66
-0
No files found.
lms/djangoapps/branding/views.py
View file @
cac6a319
...
...
@@ -2,8 +2,10 @@ from django.conf import settings
from
django.core.urlresolvers
import
reverse
from
django.shortcuts
import
redirect
from
django_future.csrf
import
ensure_csrf_cookie
from
mitxmako.shortcuts
import
render_to_response
import
student.views
import
branding
import
courseware.views
from
mitxmako.shortcuts
import
marketing_link
from
util.cache
import
cache_if_anonymous
...
...
@@ -25,7 +27,11 @@ def index(request):
if
settings
.
MITX_FEATURES
.
get
(
'ENABLE_MKTG_SITE'
):
return
redirect
(
settings
.
MKTG_URLS
.
get
(
'ROOT'
))
return
student
.
views
.
index
(
request
,
user
=
request
.
user
)
university
=
branding
.
get_university
(
request
.
META
.
get
(
'HTTP_HOST'
))
if
university
is
None
:
return
student
.
views
.
index
(
request
,
user
=
request
.
user
)
return
render_to_response
(
'university_profile/edge.html'
,
{})
@ensure_csrf_cookie
...
...
@@ -39,4 +45,8 @@ def courses(request):
if
settings
.
MITX_FEATURES
.
get
(
'ENABLE_MKTG_SITE'
,
False
):
return
redirect
(
marketing_link
(
'COURSES'
),
permanent
=
True
)
return
courseware
.
views
.
courses
(
request
)
university
=
branding
.
get_university
(
request
.
META
.
get
(
'HTTP_HOST'
))
if
university
is
None
:
return
courseware
.
views
.
courses
(
request
)
return
render_to_response
(
'university_profile/edge.html'
,
{})
lms/templates/university_profile/edge.html
0 → 100644
View file @
cac6a319
<
%
inherit
file=
"../stripped-main.html"
/>
<
%!
from
django
.
core
.
urlresolvers
import
reverse
%
>
<
%
block
name=
"title"
><title>
edX edge
</title></
%
block>
<
%
block
name=
"bodyclass"
>
no-header edge-landing
</
%
block>
<
%
block
name=
"content"
>
<div
class=
"main-wrapper"
>
<div
class=
"edx-edge-logo-large"
>
edX edge
</div>
<div
class=
"content"
>
<div
class=
"log-in-form"
>
<h2>
Log in to your courses
</h2>
<form
id=
"login_form"
data-remote=
"true"
method=
"post"
action=
"/login"
>
<div
class=
"row"
>
<label>
Email
</label>
<input
name=
"email"
type=
"email"
class=
"email-field"
tabindex=
"1"
>
</div>
<div
class=
"row"
>
<label>
Password
</label>
<input
name=
"password"
type=
"password"
class=
"password-field"
tabindex=
"2"
>
</div>
<div
class=
"row submit"
>
<input
name=
"submit"
type=
"submit"
value=
"Log In"
class=
"log-in-submit-button"
tabindex=
"3"
>
<a
href=
"#forgot-password-modal"
rel=
"leanModal"
class=
"pwd-reset forgot-button"
>
Forgot password?
</a>
</div>
</form>
</div>
<div
class=
"sign-up"
>
<h3>
Register for classes
</h3>
<p>
Take free online courses from today's leading universities.
</p>
<p><a
href=
"#signup-modal"
id=
"signup"
rel=
"leanModal"
class=
"register-button"
>
Register
</a></p>
</div>
</div>
</div>
</
%
block>
<
%
block
name=
"js_extra"
>
<script
type=
"text/javascript"
>
(
function
()
{
$
(
document
).
ready
(
function
()
{
if
(
$
.
deparam
.
fragment
()[
'forgot-password-modal'
]
!==
undefined
)
{
$
(
'.pwd-reset'
).
click
();
}
})
$
(
document
).
delegate
(
'#login_form'
,
'ajax:success'
,
function
(
data
,
json
,
xhr
)
{
if
(
json
.
success
)
{
next
=
getParameterByName
(
'next'
);
if
(
next
)
{
location
.
href
=
next
;
}
else
{
location
.
href
=
"${reverse('dashboard')}"
;
}
}
else
{
if
(
$
(
'#login_error'
).
length
==
0
)
{
$
(
'#login_form'
).
prepend
(
'<div id="login_error" class="modal-form-error"></div>'
);
}
$
(
'#login_error'
).
html
(
json
.
value
).
stop
().
css
(
"display"
,
"block"
);
}
});
})(
this
)
</script>
</
%
block>
<
%
include
file=
"../signup_modal.html"
/>
<
%
include
file=
"../forgot_password_modal.html"
/>
\ No newline at end of file
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