datatracker/ietf/templates/liaisons/detail.html

215 lines
6.4 KiB
HTML

{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load ietf_filters %}
{% block title %}Liaison statement: {% include 'liaisons/liaison_title.html' %}{% endblock %}
{% block content %}
{% origin %}
<h1>
Liaison statement<br><small>{% include 'liaisons/liaison_title.html' %}</small>
</h1>
{% include "liaisons/detail_tabs.html" %}
<table class="table table-condensed table-striped">
<tr>
<th>State</th>
<td>{{ liaison.state }}</td>
</tr>
<tr>
{% if liaison.state.slug == "posted" %}
<th class="text-nowrap">Posted Date</th>
<td>{{ liaison.posted|date:"Y-m-d" }}</td></tr>
{% else %}
<th class="text-nowrap">Submitted Date</th>
<td>{{ liaison.submitted|date:"Y-m-d" }}</td></tr>
{% endif %}
<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>
<a href="mailto:{{ liaison.from_contact.address }}">{{ liaison.from_contact.person }}</a>
</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|parse_email_list|make_one_per_line|safe|linebreaksbr }}
</td>
</tr>
{% endif %}
{% if liaison.cc_contacts %}
<tr>
<th class="text-nowrap">Cc</th><td>{{ liaison.cc_contacts|parse_email_list|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|parse_email_list|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|parse_email_list|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|parse_email_list|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="pull-right">
{% csrf_token %}
<input class="btn btn-warning btn-xs" 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.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" }}</pre>
</td>
</tr>
{% endif %}
</table>
<form method="post">
{% csrf_token %}
{% if liaison.state.slug == 'pending' and can_edit %}
<a class="btn btn-default" 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-default" 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-default" 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-default" type="submit" value="Approve" name='approved' />
<input class="btn btn-default" type="submit" value="Mark as Dead" name='dead' />
{% endif %}
{% if liaison.state.slug == 'posted' and user|has_role:"Secretariat" %}
<a class="btn btn-default" 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-default" type="submit" value="Resurrect" name='resurrect' />
{% endif %}
</form>
{% endblock %}