courses_list.html 1.06 KB
Newer Older
1
<%page expression_filter="h"/>
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
<%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>