fix: discussion, batch home page, new fields for batches

This commit is contained in:
pateljannat
2021-05-26 12:13:04 +05:30
31 changed files with 371 additions and 225 deletions

View File

@@ -1,6 +1,4 @@
{% extends "templates/base.html" %}
{% from "www/macros/common_macro.html" import InstructorsSection, MentorsSection %}
{% block title %}About{% endblock %}
{% block head_include %}
<meta name="description" content="Courses" />
@@ -14,8 +12,13 @@
{{ widgets.BatchTabs(course=course, batch=batch) }}
<div class="tab-content" id="about">
{{ CourseBasicDetail(course)}}
{{ InstructorsSection(course.get_instructor()) }}
{{ BatchDetails(batch)}}
<div class="d-flex align-items-center">
<div class="col-lg-4 col-md-12">
<div class="sidebar">
{{ widgets.InstructorSection(instructor=course.get_instructor()) }}
</div>
</div>
</div>
</div>
</div>
{% endblock %}
@@ -35,25 +38,3 @@
<h2>About the Course</h2>
<div>{{frappe.utils.md_to_html(course.description)}}</div>
{% endmacro %}
{% macro BatchDetails(batch) %}
<h2>About the Batch</h2>
<div class="batch">
<div class="batch-details">
<div>Session every {{batch.sessions_on}}</div>
<div>{{frappe.utils.format_time(batch.start_time, "short")}} -
{{frappe.utils.format_time(batch.end_time, "short")}}
</div>
<div>Starting {{frappe.utils.format_date(batch.start_date, "medium")}}</div>
<div class="course-type" style="color: #888; padding: 10px 0px;">mentors</div>
{% for m in batch.get_mentors() %}
<div>
{{ widgets.Avatar(member=m, avatar_class="avatar-medium" ) }}
<span class="instructor-title">{{m.full_name}}</span>
</div>
{% endfor %}
</div>
</div>
{% endmacro %}