feat: description in class card
This commit is contained in:
@@ -378,12 +378,14 @@ input[type=checkbox] {
|
||||
}
|
||||
|
||||
.short-introduction {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 1.25rem;
|
||||
|
||||
}
|
||||
|
||||
.card-divider {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "lms/templates/lms_base.html" %}
|
||||
{% block title %}
|
||||
{{ _("All Classes") }}
|
||||
{{ _("All Classes") }}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_content %}
|
||||
@@ -93,13 +93,19 @@
|
||||
{% set course_count = frappe.db.count("Class Course", {"parent": class.name}) %}
|
||||
{% set student_count = frappe.db.count("Class Student", {"parent": class.name}) %}
|
||||
|
||||
<div class="common-card-style column-card">
|
||||
<div class="common-card-style column-card" style="min-height: 150px;">
|
||||
|
||||
<div class="bold-heading mb-2">
|
||||
<div class="bold-heading">
|
||||
{{ class.title }}
|
||||
</div>
|
||||
|
||||
<div class="mb-1">
|
||||
{% if class.description %}
|
||||
<div class="short-introduction">
|
||||
{{ class.description }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="mt-auto mb-1">
|
||||
<svg class="icon icon-sm">
|
||||
<use href="#icon-calendar"></use>
|
||||
</svg>
|
||||
|
||||
@@ -8,7 +8,15 @@ def get_context(context):
|
||||
context.is_moderator = has_course_moderator_role()
|
||||
classes = frappe.get_all(
|
||||
"LMS Class",
|
||||
fields=["name", "title", "start_date", "end_date", "paid_class", "seat_count"],
|
||||
fields=[
|
||||
"name",
|
||||
"title",
|
||||
"description",
|
||||
"start_date",
|
||||
"end_date",
|
||||
"paid_class",
|
||||
"seat_count",
|
||||
],
|
||||
)
|
||||
|
||||
past_classes, upcoming_classes = [], []
|
||||
|
||||
Reference in New Issue
Block a user