{% extends 'generic/object.html' %} {% load i18n %} {% load plugins %} {% load form_helpers %} {% block extra_controls %} {% if can_submit %}
{% csrf_token %}
{% endif %} {% if can_return_to_draft %}
{% csrf_token %}
{% endif %} {% if can_abandon %}
{% csrf_token %}
{% endif %} {% if can_reopen %}
{% csrf_token %}
{% endif %} {% endblock extra_controls %} {% block content %} {% if conflicts %}
{% blocktrans count counter=conflicts|length %}{{ counter }} object conflicts with main.{% plural %}{{ counter }} objects conflict with main.{% endblocktrans %}
{% trans "Main has changed the same fields as this branch. Merging would discard those changes. Sync the branch to resolve." %}
{% for diff in conflicts %} {{ diff.object_repr }}: {{ diff.conflicts|join:", " }} {% endfor %}
{% trans "View changes" %}
{% endif %} {% if reconciled_conflicts %}
{# An alert lays its direct children out in a row, so the second line has to sit inside #} {# the text block. As a sibling of the sentence it reads beside it, not under it. #}
{% blocktrans count counter=reconciled_conflicts|length %}The branching plugin flags {{ counter }} object as conflicting, but a sync has already reconciled it.{% plural %}The branching plugin flags {{ counter }} objects as conflicting, but a sync has already reconciled them.{% endblocktrans %}
{% trans "Main has not changed these objects since this branch last synced, so merging cannot discard anything. The branch page will still ask you to acknowledge them." %}
{% endif %} {% if window_warning %}
{% trans "This change may never merge automatically." %}
{% blocktrans with window=window_warning.window_minutes interval=window_warning.interval_minutes %}The change window is {{ window }} minutes long, but automatic merges are only attempted every {{ interval }} minutes, so the window can pass unnoticed. Widen the window, or lower auto_merge_interval.{% endblocktrans %}
{% endif %}

{% trans "Change Request" %}

{% trans "Reference" %}{{ object.ref|placeholder }}
{% trans "Title" %}{{ object.title }}
{% trans "Branch" %} {% if object.branch %}{{ object.branch|linkify }} {% else %} {{ object.branch_name }} {% trans "Deleted" %} {% endif %}
{% trans "Status" %} {% badge object.get_status_display bg_color=object.get_status_color %} {% if object.is_approved and not object.is_ready_to_merge %} {% trans "Blocked" %}
{% trans "Approved by reviewers, but not yet mergeable." %} {{ object.merge_blocked_reason }}
{% endif %}
{% trans "Priority" %}{% badge object.get_priority_display bg_color=object.get_priority_color %}
{% trans "Requester" %}{{ object.requester }}
{% trans "Description" %}{{ object.description|placeholder }}
{% trans "Change window" %} {% if object.has_window %} {{ object.scheduled_start|placeholder }} → {{ object.scheduled_end|placeholder }} {% with state=object.window_state %} {% if state == 'open' %}{% trans "Open" %} {% elif state == 'early' %}{% trans "Not yet open" %} {% elif state == 'closed' %}{% trans "Closed" %} {% endif %} {% endwith %} {% else %} {% trans "Any time" %} {% endif %}
{% trans "Merge automatically" %} {% checkmark object.auto_merge %} {% if window_warning %}{% trans "Window too short" %}{% endif %}

{% trans "Approval status" %} {% if evaluation.satisfied %}{% trans "Reviews satisfied" %}{% else %}{% trans "Awaiting reviews" %}{% endif %}

{% for rule in evaluation.rules %} {% empty %} {% endfor %}
{{ rule.rule.policy }} / {{ rule.rule.name }}
{% if rule.required %} {% include 'netbox_change_control/inc/rule_reviewers.html' with rule=rule.rule %} {% else %} {% trans "The pre-merge checks are the only gate." %} {% endif %}
{% if not rule.required %} {% trans "No approval required" %} {% elif rule.satisfied %} {{ rule.count }} / {{ rule.required }} {% else %} {{ rule.count }} / {{ rule.required }} {% endif %}
{% trans "No policy rules apply yet. Submit the request for review." %}
{% with notes=evaluation.other_reasons %} {% if notes %} {% endif %} {% endwith %} {% if perms.netbox_change_control.change_mergecheck %} {% endif %}

{% trans "Applied policies" %}

{% for binding in bindings %} {% empty %} {% endfor %}
{{ binding.policy|linkify }} {% for name in binding.matched_object_types %}{{ name }} {% endfor %}
{% trans "No policies attached yet. Submit the request for review to match them." %}
{% plugin_left_page object %}

{% trans "Reviews" %}

{% for review in reviews %}
{{ review.reviewer }} {% badge review.get_decision_display bg_color=review.get_decision_color %} {% if review.stale %}{% trans "Stale" %}{% endif %}
{{ review.created|isodatetime:"minutes" }}
{% if review.comment %}
{{ review.comment|markdown }}
{% endif %}
{% empty %}
{% trans "No reviews yet." %}
{% endfor %}
{% include 'netbox_change_control/inc/review_form.html' %}
{% plugin_right_page object %}
{% plugin_full_width_page object %}
{% endblock %}