datatracker/ietf/templates/liaisons/detail.html
Lars Eggert 67ebadeadd A bunch more cosmetic fixes.
- Legacy-Id: 19913
2022-02-09 10:11:03 +00:00

246 lines
9.1 KiB
HTML

{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load ietf_filters person_filters textfilters %}
{% block title %}
Liaison statement:
{% include 'liaisons/liaison_title.html' %}
{% endblock %}
{% block content %}
{% origin %}
<h1>
Liaison statement
<br>
<small class="text-muted">{% include 'liaisons/liaison_title.html' %}</small>
</h1>
{% include "liaisons/detail_tabs.html" %}
<table class="table table-sm table-striped">
<tr>
<th>State</th>
<td>{{ liaison.state }}</td>
</tr>
<tr>
<th class="text-nowrap">Submitted Date</th>
<td>{{ liaison.submitted|date:"Y-m-d" }}</td>
</tr>
<tr>
<th class="text-nowrap">From Group{{ liaison.from_groups.all|pluralize }}</th>
<td>{{ liaison.from_groups_display }}</td>
</tr>
{% if liaison.from_contact %}
<tr>
<th class="text-nowrap">From Contact</th>
<td>{% person_link liaison.from_contact.person %}</td>
</tr>
{% endif %}
<tr>
<th class="text-nowrap">To Group{{ liaison.to_groups.all|pluralize }}</th>
<td>{{ liaison.to_groups_display }}</td>
</tr>
{% if liaison.to_contacts %}
<tr>
<th class="text-nowrap">To Contacts</th>
<td>{{ liaison.to_contacts|linkify|make_one_per_line|safe|linebreaksbr }}</td>
</tr>
{% endif %}
{% if liaison.cc_contacts %}
<tr>
<th class="text-nowrap">Cc</th>
<td>{{ liaison.cc_contacts|linkify|make_one_per_line|safe|linebreaksbr }}</td>
</tr>
{% endif %}
{% if liaison.response_contacts %}
<tr>
<th class="text-nowrap">Response Contact</th>
<td>{{ liaison.response_contacts|linkify|make_one_per_line|safe|linebreaksbr }}</td>
</tr>
{% endif %}
{% if liaison.technical_contacts %}
<tr>
<th class="text-nowrap">Technical Contact</th>
<td>{{ liaison.technical_contacts|linkify|make_one_per_line|safe|linebreaksbr }}</td>
</tr>
{% endif %}
{% if liaison.action_holder_contacts %}
<tr>
<th class="text-nowrap">Action Holder Contacts</th>
<td>{{ liaison.action_holder_contacts|linkify|make_one_per_line|safe|linebreaksbr }}</td>
</tr>
{% endif %}
<tr>
<th class="text-nowrap">Purpose</th>
<td>{{ liaison.purpose.name }}</td>
</tr>
{% if liaison.deadline %}
<tr>
<th class="text-nowrap">Deadline</th>
<td>
{{ liaison.deadline }}
{% if liaison.action_taken %}
<span class="actionTaken">Action Taken</span>
{% else %}
<span class="noActionTaken">Action Needed</span>
{% endif %}
{% if can_take_care %}
<form method="post" class="float-end">
{% csrf_token %}
<input class="btn btn-warning btn-sm"
type="submit"
value="Mark as action taken"
name='do_action_taken'>
</form>
{% endif %}
</td>
</tr>
{% endif %}
{% if relations %}
<tr>
<th class="text-nowrap">
Liaisons referring to this
</th>
<td>
{% for rel in relations %}
<a href="{% url "ietf.liaisons.views.liaison_detail" rel.pk %}">
{% if rel.title %}
{{ rel.title }}
{% else %}
Liaison #{{ rel.pk }}
{% endif %}
</a>
<br>
{% endfor %}
</td>
</tr>
{% endif %}
{% if liaison.related_to %}
{% if liaison.related_to.approved or is_approving %}
<tr>
<th class="text-nowrap">
Referenced liaison
</th>
<td>
<a href="{% url "ietf.liaisons.views.liaison_detail" liaison.related_to.pk %}">
{% if liaison.related_to.title %}
{{ liaison.related_to.title }}
{% else %}
Liaison #{{ liaison.related_to.pk }}
{% endif %}
</a>
</td>
</tr>
{% endif %}
{% endif %}
{% if liaison.other_identifiers %}
<tr>
<th class="text-nowrap">
Other Identifiers
</th>
<td>
{{ liaison.other_identifiers }}
</td>
</tr>
{% endif %}
<tr>
<th class="text-nowrap">
Attachments
</th>
<td>
{% for doc in liaison.active_attachments.all %}
<a href="{{ doc.get_href }}">
{{ doc.title }}
</a>
{% if not forloop.last %}<br>{% endif %}
{% empty %}
(None)
{% endfor %}
</td>
</tr>
{% if relations_by %}
<tr>
<th class="text-nowrap">
Liaisons referred by this one
</th>
<td>
{% for rel in relations_by %}
<a href="{% url "ietf.liaisons.views.liaison_detail" rel.pk %}">
{% if rel.title %}
{{ rel.title }}
{% else %}
Liaison #{{ rel.pk }}
{% endif %}
</a>
<br>
{% endfor %}
</td>
</tr>
{% endif %}
{% if relations_to %}
<tr>
<th class="text-nowrap">
Liaisons referring to this one
</th>
<td>
{% for rel in relations_to %}
<a href="{% url "ietf.liaisons.views.liaison_detail" rel.pk %}">
{% if rel.title %}
{{ rel.title }}
{% else %}
Liaison #{{ rel.pk }}
{% endif %}
</a>
<br>
{% endfor %}
</td>
</tr>
{% endif %}
{% if liaison.from_contact and liaison.body %}
<tr>
<th class="text-nowrap">
Body
</th>
<td>
<pre>{{ liaison.body|maybewordwrap:"80"|linkify|urlize_ietf_docs }}</pre>
</td>
</tr>
{% endif %}
</table>
<form method="post">
{% csrf_token %}
{% if liaison.state.slug == 'pending' and can_edit %}
<a class="btn btn-primary"
href="{% url "ietf.liaisons.views.liaison_edit" object_id=liaison.pk %}">
Edit liaison
</a>
{% elif liaison.state.slug == 'posted' and user|has_role:"Secretariat" %}
<a class="btn btn-primary"
href="{% url "ietf.liaisons.views.liaison_edit" object_id=liaison.pk %}">
Edit liaison
</a>
{% endif %}
{% if liaison.state.slug != 'dead' and can_reply %}
<a class="btn btn-primary"
href="{% url "ietf.liaisons.views.liaison_reply" object_id=liaison.pk %}">
Reply to liaison
</a>
{% endif %}
{% if liaison.state.slug == 'pending' and can_edit %}
<input class="btn btn-primary" type="submit" value="Approve" name='approved'>
<input class="btn btn-primary"
type="submit"
value="Mark as Dead"
name='dead'>
{% endif %}
{% if liaison.state.slug == 'posted' and user|has_role:"Secretariat" %}
<a class="btn btn-primary"
href="{% url "ietf.liaisons.views.liaison_resend" object_id=liaison.pk %}">
Resend statement
</a>
{% endif %}
{% if liaison.state.slug == 'dead' and can_edit %}
<input class="btn btn-primary"
type="submit"
value="Resurrect"
name='resurrect'>
{% endif %}
</form>
{% endblock %}