Template tags and filters for the Enterprise application.
Django template tag that returns an alert message.
{% alert_messages messages %}
Django template tag that returns course information to display in a modal.
You may pass in a particular course if you like. Otherwise, the modal will look for course context within the parent context.
{% course_modal %} {% course_modal course %}
Django template tag that returns a button used to expand/collapse a container.
You may pass in the ID of the container that this button controls, and a button text value.
{% expand_button ‘Click me!’ ‘#id’ %}
Django template tag that returns font awesome icon depending upon message type.
{% fa_icon “success” %}
Django template filter that returns an anchor with attributes useful for course modal selection.
{{ link_text|link_to_modal:index }}
Examples
{{ course_title|link_to_modal:forloop.counter0 }} {{ course_title|link_to_modal:3 }} {{ view_details_text|link_to_modal:0 }}
Django template filter that strips all HTML tags excepts those degined in ALLOWED_TAGS.
{{ html_text|only_safe_html }}