{% extends "base.html" %} {% import "_section.html" as _section %} {% import "_base.html" as _base %} {% import "_wtform.html" as wtform %} {% block breadcrumbs %} {{ _base.breadcrumbs(section) }} {% endblock %} {% block hostname_searchform_buttons %} {% if section['rules'] %} {% else %} {{ super() }} {% endif %} {% endblock %} {% set is_editable = (section['revision'] == current_section['revision'] and not section.get('deleted')) -%} {% set current_revision = current_section['revision'] -%} {% if is_editable %} {% block extrahead %}{{ _section.yaml_editor_boilerplate() }}{% endblock %} {% endif %} {% block content -%} {% if is_editable and is_owner %} {{ wtform.modal_form(id='createsubsection', title=gettext('Create subsection'), submit_text=gettext('Create'), form=new_subsection_form) }} {{ wtform.modal_form(id='descform', title=gettext('Change description'), submit_text=gettext('Save'), form=desc_form, submit_btn_class='disable-if-uneditable') }} {{ wtform.modal_form(id='ownersform', title=gettext('Change owners'), submit_text=gettext('Save'), form=owners_form, submit_btn_class='disable-if-uneditable') }} {% endif -%} {% if is_editable -%} {{ wtform.modal_form(id='createrule', title=gettext('Create rule'), submit_text=gettext('Create'), form=new_rule_form, attrs=_section.ruleform_attrs(section), submit_btn_class='disable-if-uneditable') }} {{ _section.yaml_editor('#createrule textarea.yaml', line_numbers=False, rows=4) }} {{ _section.rule_form_script() }} {% endif -%}
{% if section['revision'] != current_revision -%}

{% trans -%} You are viewing an outdated revision of the section! {%- endtrans %}

{% with securl=url_for('section', path=section['path'], revision=current_revision), secname=section['name'] %}

{% trans -%} No edits can be made. Current revision of section "{{ secname }}" is r{{ current_revision }}. {%- endtrans %}

{% endwith -%} {% if current_user_is_in_list(current_section['owners'] + current_section['inherited_owners']) %}

{% trans %}You can rules to this revision. Note that current owners and description will be used, not the ones from the revision you're reverting to.{% endtrans %}

{% endif %}
{%- endif %} {% if section.get('deleted') -%}

{% trans -%} Section was deleted! You are viewing its last state. {%- endtrans %}

{% with securl=url_for('section', path=section['path'], revision=current_revision), secname=section['name'] %}

{% trans -%}No edits can be made.{%- endtrans %}

{% endwith -%}
{%- endif %}
{{ _section.check_current_revision_script( url_for('section', path=section['path'], revision=section['revision']) ) }}

{% if section['path'] %} {% with is_marked = 'marked_by' in section and g.username in section['marked_by'] %}
{% endwith %} {% endif %} {{ _section.section_icon(section, 36) }} {{ section['name'] }} {{ _section.revision(section) }} {% if section['rules'] -%} {{ _base.volatile_labels(section['status']) }} {%- endif %}

{% if section['stype'] == 'sandbox_resource' -%}

{% trans srt=_base.sandbox_resource_type(section['stype_options']['resource_type']), update_status_url=url_for('volatile_status', vtype='sandbox_releases', key=section['stype_options']['resource_type']) -%} Sandbox resource type: {{ srt }}. See its update status. {%- endtrans %}

{%- trans %}Manage resource aliases{% endtrans -%}

{%- endif %}

{{ _section.owners(section['owners'], section['inherited_owners']) }} {% if is_editable and is_owner -%} {%- endif %}

{% if is_editable and is_owner and not section['rules'] and not section['subsections'] %}
{% endif %}
{{ _section.description(section['desc']) }}
{% if is_editable and is_owner -%} {%- endif %}
{% if not section['rules'] -%}
{% if not section['subsections'] -%} {% trans %}No subsections{% endtrans -%} {% else -%} {% trans %}Subsections{% endtrans -%} {% endif -%} {% if is_editable and is_owner %} {% endif -%}
{% for subsection_name, subsection in section['subsections']|dictsort -%} {% endfor -%}

{{ _section.section_link(subsection) }}

{% if subsection['rules'] %} {{ _base.volatile_labels(subsection['status']) }} {% endif %} {{ _section.owners(subsection['owners']) }}
{{ _section.description(subsection['desc']) }} {{ _section.section_content(subsection) }}
{% endif %} {% if not section['subsections'] -%} {{ _section.rules_table(gettext("Rules") if section['rules'] else gettext("No rules"), section, section['rules'], is_editable=(is_editable and is_owner), parent_rule=None, rule_order_form=rule_order_form, selector_statuses=selector_statuses) }} {% endif %} {% endblock %}