* fix: Clean up view_feedback_pending - Remove "Unclassified" column header, which caused misalignment in the table body. - Show the message author - previously displayed as `(None)`. * feat: Reclassify nomcom feedback (#4669) - There's a new `Chair/Advisor Tasks` menu item `Reclassify feedback`. - I overloaded `view_feedback*` URLs with a `?reclassify` parameter. - This adds a checkbox to each feedback message, and a `Reclassify` button at the bottom of each feedback page. - "Reclassifying" basically de-classifies the feedback, and punts it back to the "Pending emails" view for reclassification. - If a feedback has been applied to multiple nominees, declassifying it from one nominee removes it from all. * fix: Remove unused local variables * fix: Fix some missing and mis-nested html * test: Add tests for reclassifying feedback * refactor: Substantial redesign of feedback reclassification - Break out reclassify_feedback* as their own URLs and views, and revert changes to view_feedback*.html. - Replace checkboxes with a Reclassify button on each message. * fix: Remember to clear the feedback associations when reclassifying * feat: Add an 'Overcome by events' feedback type * refactor: When invoking reclassification from a view-feedback page, load the corresponding reclassify-feedback page * fix: De-conflict migration with 0004_statements Also change the coding style to match, and add a reverse migration. * fix: Fix a test case to account for new feedback type * fix: 842e730 broke the Back button * refactor: Reclassify feedback directly instead of putting it back in the work queue * fix: Adjust tests to new workflow * refactor: Further refine reclassification to avoid redirects * refactor: Impose a FeedbackTypeName ordering Also add FeedbackTypeName.legend field, rather than synthesizing it every time we classify or reclassify feedback. In the reclassification forms, only show the relevant feedback types. * refactor: Merge reclassify_feedback_* back into view_feedback_* This means the "Reclassify" button is always present, but eliminates some complexity. * refactor: Add filter(used=True) on FeedbackTypeName querysets * refactor: Add the new FeedbackTypeName to the reclassification success message * fix: Secure reclassification against rogue nomcom members
93 lines
3.6 KiB
HTML
93 lines
3.6 KiB
HTML
{% extends "nomcom/nomcom_private_base.html" %}
|
|
{# Copyright The IETF Trust 2015-2023, All Rights Reserved #}
|
|
{% load origin %}
|
|
{% load nomcom_tags textfilters %}
|
|
{% block subtitle %}- View unrelated feedback{% endblock %}
|
|
{% block nomcom_content %}
|
|
{% origin %}
|
|
{% if reclassify_feedback %}
|
|
{% include "nomcom/reclassify_feedback_item.html" %}
|
|
{% else %}
|
|
<h2>Feedback not related to nominees</h2>
|
|
<ul role="tablist" class="nav nav-tabs my-3">
|
|
{% for ft in feedback_types %}
|
|
<li class="nav-item">
|
|
<button class="nav-link {% if forloop.first %}active{% endif %}"
|
|
data-bs-target="#{{ ft.ft.slug }}"
|
|
role="tab" type="button"
|
|
data-bs-toggle="tab">
|
|
{{ ft.ft.name }}
|
|
</button>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
<div class="tab-content">
|
|
{% for ft in feedback_types %}
|
|
<div role="tabpanel" class="tab-pane {% if forloop.first %} active{% endif %}"
|
|
id="{{ ft.ft.slug }}">
|
|
{% for feedback in ft.feedback %}
|
|
{% if not forloop.first %}
|
|
<hr>
|
|
{% endif %}
|
|
<dl class="row">
|
|
<dt class="col-sm-2">
|
|
From
|
|
</dt>
|
|
<dd class="col-sm-10">
|
|
{{ feedback.author|formatted_email|default:"Anonymous"|linkify }}
|
|
</dd>
|
|
<dt class="col-sm-2">
|
|
Date
|
|
</dt>
|
|
<dd class="col-sm-10">
|
|
{{ feedback.time|date:"Y-m-d" }}
|
|
</dd>
|
|
<dt class="col-sm-2">
|
|
Feedback
|
|
</dt>
|
|
<dd class="col-sm-10 pasted">
|
|
<pre>{% decrypt feedback.comments request year 1 %}</pre>
|
|
</dd>
|
|
{% if user|is_chair_or_advisor:year %}
|
|
<dt class="col-sm-2">
|
|
<form id="reclassify-{{ feedback.id }}" method="post">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="feedback_id" value="{{ feedback.id }}">
|
|
<button class="btn btn-warning btn-sm" type="submit">
|
|
Reclassify
|
|
</button>
|
|
</form>
|
|
</dt>
|
|
<dd>
|
|
</dd>
|
|
{% endif %}
|
|
</dl>
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
<p>
|
|
<a class="btn btn-secondary"
|
|
href="{% url 'ietf.nomcom.views.view_feedback' year %}">Back</a>
|
|
</p>
|
|
{% endif %}
|
|
{% endblock %}
|
|
{% block js %}
|
|
<script>
|
|
$(document)
|
|
.ready(function () {
|
|
// Javascript to enable link to tab
|
|
var url = document.location.toString();
|
|
if (url.match('#')) {
|
|
$('.nav-tabs button[data-bs-target="#' + url.split('#')[1] + '"]')
|
|
.tab('show');
|
|
}
|
|
// Change hash for page-reload
|
|
$('.nav-tabs button')
|
|
.on('shown.bs.tab', function (e) {
|
|
history.replaceState(null, null, e.currentTarget.dataset.bsTarget);
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|