{% extends "ndf/node_details_base.html" %} {% load ndf_tags %} {% load i18n %} {% block title %} {{title}} {{node.name}}{% endblock %} {% block url %}{% url 'create_edit' groupid node %}{% endblock %} {% block head %} {% endblock %} {% block style %} {{block.super}} .name-section{ height:80px; } #alertModalLabel{ color:black; } {% endblock %} {% block collection_content %}
{% include "ndf/collection_ajax_view.html" %}
{% endblock %} {% block body_content %} {% get_group_name groupid as group_name_tag %}

×

{{node.name}} {% check_is_gstaff groupid request.user as is_gstaff %} {% if is_gstaff or request.user.id == node.created_by %} Edit {% endif %}

{{ node.member_of_names_list|join:', ' }} created {{node.created_at|timesince}} ago by {{node.user_details_dict.created_by}}
{% if node_type == "Course" %} {% if is_gstaff %} {% trans "Announce" %} {% if course_structure_exists %}{% trans "Edit Course Structure" %}{% else %}{% trans "Add Course Structure" %}{% endif %} {% trans "Delete" %} {% endif %} {% endif %}
{% with node.content|safe as description %} {% if description != "None" %} {{ description }} {% endif %} {% endwith %}

{% endblock %} {% block script %} {{block.super}} // Click on delete button $(document).on('click','.fi-trash',function(){ lbl_msg = "Are you sure you want to delete '{{node.name}}' course?" $("#alertModalLabel").text(lbl_msg); $("#alertModal") .removeClass("medium").addClass("small") $("#alertModal").foundation('reveal', 'open'); }); //Confirm or Cancel Deletion $(document).on("click", "#btnConfirmYes", function() { $("#alertModal").foundation('reveal', 'close'); turl = "{% url 'del_course' group_id node.pk %}" $(".fi-trash").attr("href",turl) location.href = $(".fi-trash").attr('href'); }); $(document).on("click", "#btnConfirmNo", function() { $("#alertModal").foundation('reveal', 'close'); }); {% endblock %} {% block document_ready %} {{block.super}} $(function() { $('.tree').tree({ autoOpen: 0 }); }); $('.tree').bind( 'tree.click', function(event) { // The clicked node is 'event.node' var node = event.node; alert(node.id); } ); {% if node_type == "Course" %} {% if not course_structure_exists %} $("#view_page").append("") {% endif %} {% endif %} {% endblock %}