datatracker/ietf/templates/doc/review/complete_review.html
Sasha Romijn 871a4b653b Fix #2217 - Allow submission of unsolicited reviews by secretaries.
- For team secretaries, a button "Submit unsolicited review" will now
  appear next to "Request review" on the document's main page.
- If the secretary is a secretary for multiple teams, they are taken
  through an intermediate page to select for which team they are
  submitting their review.
- The form is similar (and using the same code) as the usual review
  completion, with a few extra fields for the review type and reviewer,
  which would usually already be known.
- When submitting the review, a ReviewRequest and ReviewAssignment are
  automatically created. The assignment is then immediately closed in
  the usual way.
- Other workflows are unchanged.

The issues with the review form in #2061 are slightly worse for the
unsolicited review scenario, but that will be improved when #2061 is
fixed.

Commit ready for merge.
 - Legacy-Id: 16924
2019-10-24 12:37:59 +00:00

121 lines
5.1 KiB
HTML

{% extends "base.html" %}
{# Copyright The IETF Trust 2016, All Rights Reserved #}
{% load origin bootstrap3 static %}
{% block title %}{% if revising_review %}Revise{% elif assignment %}Complete{% else %}Submit unsolicited{% endif %} review of {{ review_req.doc.name }}{% endblock %}
{% block pagehead %}
<link rel="stylesheet" href="{% static 'bootstrap-datepicker/css/bootstrap-datepicker3.min.css' %}">
{% endblock %}
{% block content %}
{% origin %}
<h1>{% if revising_review %}Revise{% elif assignment %}Complete{% else %}Submit unsolicited{% endif %} review<br>
<small>{{ doc.name }}</small>
</h1>
{% if assignment %}
<p>
<div><strong>Review type:</strong> {{ assignment.review_request.team.acronym }} - {{ assignment.review_request.type }} review </div>
<div><strong>Requested version for review:</strong> {{ assignment.review_request.requested_rev|default:"Current" }} </div>
<div><strong>Requested:</strong> {{ assignment.review_request.time|date:"Y-m-d" }} </div>
<div><strong>Reviewer:</strong> {{ assignment.reviewer.person.name }}</div>
</p>
{% else %}
<p>
You are submitting an <strong>unsolicited</strong> review for this document for the {{ team }}.
<strong>This process should only be used for unsolicited reviews.</strong>
A review request and assignment will be created automatically upon submitting this review.
</p>
{% endif %}
{% if assignment and not revising_review %}
<p>The review findings should be made available here and the review
posted to the mailing list. If you enter the findings below, the
system will post the review for you. If you already have posted
the review, you can try to let the system find the link to the
archive and retrieve the email body.</p>
<p>If you enter the review below, the review will be sent
to <em>{{ review_to|join:", " }}</em>
{% if review_cc %}, with a Cc to <em>{{ review_cc|join:", " }}</em>{% endif %}.</p>
{% elif assignment %}
<p>You can revise this review by entering the results below.</p>
{% endif %}
<form class="complete-review form-horizontal" method="post" enctype="multipart/form-data">
{% csrf_token %}
{% bootstrap_form form layout="horizontal" %}
{% buttons %}
{% if assignment %}
<a class="btn btn-default" href="{% url "ietf.doc.views_review.review_request" name=doc.canonical_name request_id=assignment.review_request.pk %}">Cancel</a>
{% else %}
<a class="btn btn-default" href="{{ doc.get_absolute_url }}">Cancel</a>
{% endif %}
<button type="submit" class="btn btn-primary">{% if revising_review %}Revise{% else %}Complete{% endif %} review</button>
{% endbuttons %}
<div class="template" style="display:none">
{% if mail_archive_query_urls %}
<div class="mail-archive-search form-group">
<div class="col-md-offset-2 col-md-10">
<p class="form-inline">
Search mail archive subjects for:
<input class="query-input form-control input-sm" value="{{ mail_archive_query_urls.query }}">
<button type="button" class="search btn btn-default btn-sm">Search</button>
</p>
<div class="retrieving hidden">
<span class="fa fa-spin fa-circle-o-notch"></span>
Searching...
</div>
<div class="results hidden">
<p>Select one of the following messages to automatically pre-fill link and content:</p>
<div class="list-group">
</div>
</div>
<div class="error alert alert-warning hidden">
<p>
<span class="content"></span>
<span class="hidden try-yourself">(searched for <a class="query-url" href="">"<span class="query"></span>"</a>, corresponding <a class="query-data-url" href="">export</a>).</span>
You have to fill in link and content yourself.
</p>
</div>
</div>
</div>
{% else %}
<div class="mail-archive-search">
<small class="text-muted">Mailing list does not have a recognized ietf.org archive. Auto-searching disabled.</small>
</div>
{% endif %}
</div>
{% spaceless %}
<div class="template" style="display:none">
<button type="button" class="mail-archive-search-result list-group-item">
<small class="date pull-right"></small>
<small class="from pull-right"></small>
<span class="subject"></span>
</button>
</div>
{% endspaceless %}
</form>
{% endblock %}
{% block js %}
<script src="{% static 'bootstrap-datepicker/js/bootstrap-datepicker.min.js' %}"></script>
<script>
{% if assignment %}
var searchMailArchiveUrl = "{% url "ietf.doc.views_review.search_mail_archive" name=doc.name assignment_id=assignment.pk %}";
{% else %}
var searchMailArchiveUrl = "{% url "ietf.doc.views_review.search_mail_archive" name=doc.name acronym=team.acronym %}";
{% endif %}
</script>
<script src="{% static 'ietf/js/complete-review.js' %}"></script>
{% endblock %}