{% from "wiki/includes/document_macros.html" import build_document_crumbs, get_document_quick_links, get_document_buttons, get_document_subnav, get_approvals_html, document_watch with context %} {% if document.parent %} {# If there is a parent doc, use it for translating. #} {% set translate_url = url('wiki.select_locale', document_path=document.parent.full_path) %} {% else %} {% set translate_url = url('wiki.select_locale', document_path=document.full_path, locale=document.locale) %} {% endif %} {% if fallback_reason == 'no_translation' %} {% set help_link = url('wiki.translate', document_path=document.full_path, locale=document.locale)|urlparams(tolocale=request.locale) %} {% elif fallback_reason == 'translation_not_approved' %} {% set help_link = url('wiki.translate', document_path=document.parent.full_path, locale=document.parent.locale)|urlparams(tolocale=request.locale) %} {% endif %} {# get attachments and tags ready for use #} {% set tags = document.tags.all() %} {% set attachments = document.attachments.all() %} {% set num_attachments = attachments|length %} {% set is_logged_in = request.user.is_authenticated() %} {% set disabled_class = ('disabled' if not is_logged_in else '') %} {% set disabled_attr = ('title="%s"' % _('Please log in to use this feature.') if not is_logged_in else '') %} {% if not document.is_template %} {% set quick_links_section_id = 'Quick_Links' %} {% set quick_links_html = document.rendered_html|section_extract(quick_links_section_id) %} {% endif %} {% set zone_stack = document.find_zone_stack() %} {% set is_zone = zone_stack|length %} {% set is_zone_root = is_zone and zone_stack[0].document == document %} {% set zone_subnav_section_id = 'Subnav' %} {% set zone_subnav_html = document|zone_section_extract(zone_subnav_section_id) %} {% set current_revision = document.current_revision %} {% if (user.is_authenticated() and current_revision and document.allows_revision_by(user)) and (current_revision.needs_technical_review() or current_revision.needs_editorial_review()) %} {% set approvals_html = get_approvals_html(document, request.user) %} {% endif %} {% set show_left = zone_subnav_html or quick_links_html or approvals_html %} {% set show_right = (not is_zone_root and (toc_html or tags|length or num_attachments)) %} {% set content_class = 'column-all' %} {% if show_left and show_right %} {% set content_class = 'column-half' %} {% elif show_left or show_right %} {% set content_class = 'column-main' %} {% endif %} {% if is_zone %} {% if is_zone_root %}
{{ get_document_buttons(document) }} {{ build_document_crumbs(document) }}

{{ document.title }}

{% if zone_subnav_html %} {{ get_document_subnav(zone_subnav_html) }} {% endif %} {% if quick_links_html %} {{ get_document_quick_links(quick_links_html) }} {% endif %}
 

{{ document|selector_content_find('.summary') }}

{% elif zone_stack|length %}
{% endif %} {% endif %}
{% if not is_zone_root %} {% endif %}
{% if show_left and not is_zone_root %} {% endif %}
{% if show_right %}
{% if toc_html %}
{{ _('In This Article') }}
    {{ toc_html|safe }}
{% endif %} {% if tags|length %}
{% endif %} {% if num_attachments %} {% endif %}
{% endif %} {% if not document.is_template %} {% set document_html_safe = document_html|section_hide(zone_subnav_section_id, quick_links_section_id)|safe %} {% else %} {% set document_html_safe = document_html|safe %} {% endif %}
{% if kumascript_errors %} {% include 'wiki/includes/kumascript_errors.html' %} {% endif %}
{% if not fallback_reason %} {% if not document_html %} {{ _("This article doesn't have any content yet.") }} {% elif document.is_template %}
{{ document_html }}
{% else %} {{ document_html_safe }} {% endif %} {% elif fallback_reason == 'no_translation' %} {{ document_html_safe }} {% elif fallback_reason == 'translation_not_approved' %} {{ document.parent.html|safe }} {% else %} {{ _("This article doesn't have approved content yet.") }} {% endif %}
{% if not is_zone_root %} {% if num_attachments %} {% include 'wiki/includes/attachment_list.html' %} {% endif %}

{% trans contributors=user_list(contributors) %} Contributors to this page: {{ contributors }} {% endtrans %} {% if current_revision.creator %}
{{ _('Last updated by:') }} {{ current_revision.creator }}, {{ datetimeformat(current_revision.created, format='datetime') }} {% endif %}

{% endif %}
{% if show_left %}
{% if not is_zone_root %} {{ _('Hide Sidebar') }} {% if zone_subnav_html %} {{ get_document_subnav(zone_subnav_html) }} {% endif %} {% if quick_links_html %} {{ get_document_quick_links(quick_links_html) }} {% endif %} {% if approvals_html %} {{ approvals_html }} {% endif %} {% endif %}
{% endif %}