Files
lms/community/www/courses/course.html
Anand Chitipothu bfc15cf1a4 Added preview and sections fields to LMS Topic
- The preview is used to show the details of the topic in the course page
- the sections are used to show the different part of the topic, each could be of a different type

Issue #8
2021-03-05 17:20:02 +00:00

42 lines
1.3 KiB
HTML

{% extends "templates/base.html" %}
{% block title %}{{ 'Courses' }}{% endblock %}
{% from "www/courses/macros/card.html" import course_card, topic_card %}
{% block head_include %}
<meta name="description" content="Courses" />
<meta name="keywords" content="Courses {{course.title}}" />
<style>
</style>
{% endblock %}
{% block content %}
<section class="top-section" style="padding: 1rem 0rem;">
<div class='container pb-5'>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item" aria-current="page"><a href="/courses">Courses</a></li>
</ol>
</nav>
<div class="badge badge-info enrollment-badge hide">Enrolled</div>
<div>
{% if not course_enrolled and frappe.session.user != "Guest" %}
<button class="btn btn-dark btn-enroll float-right" data-course={{course.name}}>Enroll</button>
{% endif %}
<h1>{{ course.title }}</h1>
</div>
<div>{{ frappe.utils.md_to_html(course.description) }}</div>
</div>
<div class='container'>
<div class="list-group">
{% for topic in course.topics %}
<div class="list-group-item">
<h5><a href="/courses/topic?course={{course.name}}&topic={{topic.name}}">{{topic.title}}</a></h5>
<div>{{topic.preview | markdown }}</div>
</div>
{% endfor %}
</div>
</div>
</section>
{% endblock %}