feat: batch meta and raw details
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
{{ CourseList(courses) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ BatchDetailsRaw() }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -216,6 +217,15 @@
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
{% macro BatchDetailsRaw() %}
|
||||
{% if batch_info.batch_details_raw %}
|
||||
<div class="mt-10 pt-10">
|
||||
{{ batch_info.batch_details_raw }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{%- block script %}
|
||||
{{ super() }}
|
||||
{% if is_moderator %}
|
||||
|
||||
@@ -29,6 +29,8 @@ def get_context(context):
|
||||
"end_time",
|
||||
"seat_count",
|
||||
"published",
|
||||
"meta_image",
|
||||
"batch_details_raw",
|
||||
],
|
||||
as_dict=1,
|
||||
)
|
||||
@@ -67,3 +69,11 @@ def get_context(context):
|
||||
|
||||
context.student_count = frappe.db.count("Batch Student", {"parent": batch_name})
|
||||
context.seats_left = context.batch_info.seat_count - context.student_count
|
||||
|
||||
context.metatags = {
|
||||
"title": context.batch_info.title,
|
||||
"image": context.batch_info.meta_image,
|
||||
"description": context.batch_info.description,
|
||||
"keywords": context.batch_info.title,
|
||||
"og:type": "website",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user