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
7f6d2d04
Commit
7f6d2d04
authored
Jan 08, 2016
by
Hasnain
Committed by
hasnain-naveed
Jan 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate the course listing from index.html template.
parent
9cf16cd2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
23 deletions
+32
-23
lms/templates/courses_list.html
+27
-0
lms/templates/index.html
+5
-23
No files found.
lms/templates/courses_list.html
0 → 100644
View file @
7f6d2d04
<
%
namespace
name=
'static'
file=
'static_content.html'
/>
<
%!
from
django
.
utils
.
translation
import
ugettext
as
_
%
>
<section
class=
"courses-container"
>
<section
class=
"highlighted-courses"
>
% if settings.FEATURES.get('COURSES_ARE_BROWSABLE'):
<section
class=
"courses"
>
<ul
class=
"courses-listing"
>
## limiting the course number by using HOMEPAGE_COURSE_MAX as the maximum number of courses
%for course in courses[:settings.HOMEPAGE_COURSE_MAX]:
<li
class=
"courses-listing-item"
>
<
%
include
file=
"course.html"
args=
"course=course"
/>
</li>
%endfor
</ul>
</section>
## in case there are courses that are not shown on the homepage, a 'View all Courses' link should appear
% if settings.HOMEPAGE_COURSE_MAX and len(courses) > settings.HOMEPAGE_COURSE_MAX:
<div
class=
"courses-more"
>
<a
class=
"courses-more-cta"
href=
"${marketing_link('COURSES')}"
>
${_("View all Courses")}
</a>
</div>
% endif
% endif
</section>
</section>
lms/templates/index.html
View file @
7f6d2d04
...
@@ -61,30 +61,12 @@ from microsite_configuration import microsite
...
@@ -61,30 +61,12 @@ from microsite_configuration import microsite
</div>
</div>
</header>
</header>
<section
class=
"courses-container"
>
<
%
<section
class=
"highlighted-courses"
>
#
allow
for
microsite
override
of
the
courses
list
courses_list =
microsite.get_template_path('courses_list.html')
%
>
<
%
include
file=
"${courses_list}"
/>
% if settings.FEATURES.get('COURSES_ARE_BROWSABLE'):
<section
class=
"courses"
>
<ul
class=
"courses-listing"
>
## limiting the course number by using HOMEPAGE_COURSE_MAX as the maximum number of courses
%for course in courses[:settings.HOMEPAGE_COURSE_MAX]:
<li
class=
"courses-listing-item"
>
<
%
include
file=
"course.html"
args=
"course=course"
/>
</li>
%endfor
</ul>
</section>
## in case there are courses that are not shown on the homepage, a 'View all Courses' link should appear
% if settings.HOMEPAGE_COURSE_MAX and len(courses) > settings.HOMEPAGE_COURSE_MAX:
<div
class=
"courses-more"
>
<a
class=
"courses-more-cta"
href=
"${marketing_link('COURSES')}"
>
${_("View all Courses")}
</a>
</div>
% endif
% endif
</section>
</section>
</section>
</section>
<section
id=
"video-modal"
class=
"modal home-page-video-modal video-modal"
>
<section
id=
"video-modal"
class=
"modal home-page-video-modal video-modal"
>
...
...
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