{% extends "lms/templates/lms_base.html" %} {% block title %} {{ _(batch_info.title) }} {% endblock %} {% block page_content %}
{{ BatchHeader(batch_info) }}
{{ BatchOverlay(batch_info, courses, students) }}
{{ BatchDetails(batch_info) }} {{ CourseList(courses) }}
{{ BatchDetailsRaw() }}
{% endblock %} {% macro BatchHeader(batch_info) %}
{{ BreadCrumb(batch_info) }} {{ BatchHeaderDetails(batch_info, courses, students) }}
{% endmacro %} {% macro BreadCrumb(batch_info) %}
{{ _("All Batches") }} {{ _("Batch Details") }}
{% endmacro %} {% macro BatchHeaderDetails(batch_info, courses, students) %}
{{ batch_info.title }}
{{ batch_info.description }}
{{ frappe.utils.format_date(batch_info.start_date, "long") }} - {{ frappe.utils.format_date(batch_info.end_date, "long") }}
{% if batch_info.start_time and batch_info.end_time %}
{{ frappe.utils.format_time(batch_info.start_time, "hh:mm a") }} - {{ frappe.utils.format_time(batch_info.end_time, "hh:mm a") }}
{% endif %}
{% endmacro %} {% macro BatchOverlay(batch_info, courses, students) %}
{% if batch_info.seat_count %} {% if seats_left %}
{{ _("Seats Available") }}: {{ seats_left }}
{% else %}
{{ _("No seats left") }}
{% endif %} {% endif %} {% if batch_info.paid_batch %}
{{ frappe.utils.fmt_money(batch_info.amount, 0, batch_info.currency) }}
{% endif %}
{{ courses | length }} {{ _("Courses") }}
{{ frappe.utils.format_date(batch_info.start_date, "long") }} - {{ frappe.utils.format_date(batch_info.end_date, "long") }}
{% if batch_info.start_time and batch_info.end_time %}
{{ frappe.utils.format_time(batch_info.start_time, "hh:mm a") }} - {{ frappe.utils.format_time(batch_info.end_time, "hh:mm a") }}
{% endif %}
{% if is_moderator or is_evaluator %} {{ _("Manage Batch") }} {% elif batch_info.paid_batch %} {{ _("Register Now") }} {% else %}
{{ _("To join this batch, please contact the Administrator.") }}
{% endif %}
{% if is_moderator %}
{{ _("Edit") }}
{% endif %}
{% endmacro %} {% macro BatchDetails(batch_info) %}
{{ batch_info.batch_details }}
{% endmacro %} {% macro CourseList(courses) %} {% if courses | length or is_moderator %}
{{ _("Courses") }}
{% if is_moderator %} {% endif %}
{% if courses | length %}
{% for course in courses %}
{% if is_moderator %}
{% endif %} {{ widgets.CourseCard(course=course, read_only=False) }}
{% endfor %}
{% else %}
{{ _("No courses") }}
{% endif %}
{% endif %} {% endmacro %} {% macro BatchDetailsRaw() %} {% if batch_info.batch_details_raw %}
{{ batch_info.batch_details_raw }}
{% endif %} {% endmacro %} {%- block script %} {{ super() }} {% if is_moderator %} {% endif %} {% endblock %}