{% load simple_filters %} {% xextends "ndf/base.html" with first_body_column=0 %} {# {% extends "ndf/base.html" %} #} {% load i18n %} {% load cache %} {% load ndf_tags %} {% block title %}{% trans 'Events' %} {% endblock %} {% block style %} .course_outline_table, tr { border: 2px solid #0b8a91; border-collapse: collapse; } .gray-text{ color: gray; } #content > p { color: #6F6F6F !important; /*font-size: inherit;*/ } tr:hover{ cursor:pointer; } .tab{ padding-left: 2em; background-color:yellow !important; } .tab2{ padding-left: 4em; } #eventModal > label { color: white; font-weight: bold; font-size: 1rem; } .all_blogs{ overflow-y: auto; height:500px; } .jqtree-tree .jqtree-title { margin: 5px; font-size: 15px; color: black !important; /*Change the color here to change font color of tree*/ } li.remove-dot{ list-style: none; } .div-height { margin-bottom: 0px !important; height: 258px !important; } .course-banner{ text-shadow: 2px 2px black !important; background: none !important; } #status{ width: 100% !important; } {% endblock %} {% block head %} {# #} {# #} {# #} {% endblock %} {% block extended_header %} {% endblock %} {% block body_content %} {% check_is_gstaff groupid request.user as is_gstaff %} {% user_access_policy groupid request.user as user_access %} {# {% get_course_session_status group_obj True as next_session_in_course %} #}
×
{% include 'ndf/widget_photo_upload.html' with url_name='course_about' widget_for="group_banner" is_banner=True is_profile=False no_update_btn=True%}
{% if is_gstaff %} {% else %}
{% if user_access == "allow" %} ENROLLED {% else %} {% if user.is_authenticated %} {% if allow_to_join == "Open" %} ENROLL {% else %} Enrollment {{allow_to_join}} {% endif %} {% else %} ENROLL {% endif %} {% endif %}
{% endif %}
{% firstof group_obj.altnames group_obj.name %}
{% comment %} {% if request.user.is_authenticated %}
{% endif %} {% endcomment %} {% comment %} {% if request.user.is_authenticated %} {% endif %} {% endcomment %}
{% comment %} {% if next_session_in_course.1 %}
Next Session
{{next_session_in_course.0|default_if_none:"Data Not Available"}}
{{next_session_in_course.1|date:"d M Y"}}
{% endif %} {% endcomment %}
{% if title == 'dashboard' %} {% include "ndf/gcourseDashboard.html" %} {% elif title == 'course content' %} {% include "ndf/gcollection_ajax_view.html" %} {% elif title == 'notebook' %} {% include "ndf/gnotebook.html" %} {% elif title == 'gallery' %} {% include "ndf/ggallerypage.html" with file_detail_url='course_gallery_detail' redirect_tab_url='course_gallery' %} {% elif title == 'raw material' %} {% include "ndf/ggallerypage.html" with file_detail_url='course_raw_material_detail' redirect_tab_url='course_raw_material'%} {% elif title == 'about' %} {% include "ndf/course_about.html" %} {% comment %}

{{group_object.content_org|safe}}

{% endcomment %} {% endif %}
{% if title == "gallery" %} {% include 'ndf/pagination.html' with urlname="course_gallery_paged" first_arg=group_name_tag page_info=gallery_page_info %} {% elif title == "raw material" %} {% include 'ndf/pagination.html' with urlname="course_raw_material_paged" first_arg=group_name_tag page_info=raw_material_page_info %} {% endif %}
{% endblock %} {% block script %} {{block.super}} $(document).on('click','.enroll-btn',function(){ //trigger the ajax call to enroll $.ajax({ url: "{% url 'enroll_to_course' group_id %}", data: { 'csrfmiddlewaretoken': "{{csrf_token}}" }, type: "POST", dataType: "json", success: function(data){ success_state = data["success"] if(success_state){ $(".enroll-btn").attr('value', 'ENROLLED') $(".enroll-btn").attr("disabled","disabled") location.reload(); } }, });//end of ajax }) // {% endblock %}