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
682d3d0e
Commit
682d3d0e
authored
Dec 19, 2014
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Organize logic on Find Courses view.
parent
b7a1de1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
24 deletions
+26
-24
lms/templates/courseware/courses.html
+26
-24
No files found.
lms/templates/courseware/courses.html
View file @
682d3d0e
<
%!
from
django
.
utils
.
translation
import
ugettext
as
_
%
>
<
%!
from
django
.
utils
.
translation
import
ugettext
as
_
from
microsite_configuration
import
microsite
%
>
<
%
inherit
file=
"../main.html"
/>
<
%
namespace
name=
'static'
file=
'../static_content.html'
/>
<
%
block
name=
"pagetitle"
>
${_("Courses")}
</
%
block>
<
%!
from
microsite_configuration
import
microsite
%
>
<section
class=
"find-courses"
>
<
%
course_index_overlay_text =
microsite.get_value('course_index_overlay_text',
_
("
Explore
free
courses
from
leading
universities
."))
#
not
sure
why
this
is
,
but
if
I
use
static
.
url
('
images
/
edx-logo-bw
.
png
')
then
the
HTML
rendering
#
of
this
template
goes
wonky
logo_file =
microsite.get_value(
'
course_index_overlay_logo_file
',
settings
.
STATIC_URL
+
'
images
/
edx-logo-bw
.
png
'
)
platform_name =
microsite.get_value('platform_name',
settings
.
PLATFORM_NAME
)
if
self
.
stanford_theme_enabled
()
:
course_index_overlay_text =
_("Explore
free
courses
from
{
university_name
}.").
format
(
university_name=
"Stanford University"
)
logo_file =
static.url('themes/stanford/images/seal.png')
logo_alt_text =
"Stanford Seal Logo"
else:
course_index_overlay_text =
microsite.get_value('course_index_overlay_text',
_
("
Explore
courses
from
{
platform_name
}.").
format
(
platform_name=
platform_name))
#
not
sure
why
this
is
,
but
if
I
use
static
.
url
('
images
/
edx-logo-bw
.
png
')
then
the
HTML
rendering
#
of
this
template
goes
wonky
logo_file =
microsite.get_value(
'
course_index_overlay_logo_file
',
settings
.
STATIC_URL
+
'
images
/
edx-logo-bw
.
png
'
)
logo_alt_text =
_("{platform_name}
Logo
").
format
(
platform_name=
platform_name)
%
>
<section
class=
"find-courses"
>
<header
class=
"search"
>
<div
class=
"inner-wrapper main-search"
>
<hgroup>
<div
class=
"logo"
>
% if self.stanford_theme_enabled():
<img
src=
"${static.url('themes/stanford/images/seal.png')}"
alt=
"Stanford Seal Logo"
/>
% else:
<img
src=
'${logo_file}'
alt=
"${microsite.get_value('platform_name', settings.PLATFORM_NAME)} Logo"
/>
% endif
<img
src=
"${logo_file}"
alt=
"${logo_alt_text}"
/>
</div>
% if self.stanford_theme_enabled():
<h2>
${_("Explore free courses from {university_name}.").format(university_name="Stanford University")}
</h2>
% else:
<h2>
${course_index_overlay_text}
</h2>
% endif
<h2>
${course_index_overlay_text}
</h2>
</hgroup>
</div>
</header>
...
...
@@ -41,7 +42,7 @@
<section
class=
"container"
>
<section
class=
"courses"
>
<ul
class=
"courses-listing"
>
%for course in courses:
%for course in courses:
<li
class=
"courses-listing-item"
>
<
%
include
file=
"../course.html"
args=
"course=course"
/>
</li>
...
...
@@ -49,4 +50,5 @@
</ul>
</section>
</section>
</section>
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