{% extends "charme_base.html" %}

{% load i18n %}

{% block main %}

<h2>Annotation {{ uri }}</h2>

<div class=contactform id="annotation">
	<div class=accounts>
		<form method="post" action="{% url 'annotation' %}">
			{% csrf_token %}
			{{ resource_form.resource_uri.as_hidden }}
			<table>
				{% if wasInvalidatedBy %}
				<tr>				
					<td><label><b>{% trans "Invalidated by:" noop %}</b></label></td>
					<td><b><a href={{ wasInvalidatedBy }}>{{ wasInvalidatedBy }}</a></b></td>
				</tr>
				{% endif %}

				{% if wasRevisionOf %}
				<tr>				
					<td><label><b>{% trans "Revision of:" noop %}</b></label></td>
					<td><b><a href={{ wasRevisionOf }}>{{ wasRevisionOf }}</a></b></td>
				</tr>
				{% endif %}

				{% if wasGeneratedBy %}
				<tr>				
					<td><label>{% trans "Generated by:" noop %}</label></td>
					<td><a href={{ wasGeneratedBy }}>{{ wasGeneratedBy }}</a></td>
				</tr>
				{% endif %}
				
				{% if title %}
				<tr>
					<td><label>{% trans "Title:" noop %}</label></td>
					<td>{{ title }}</td>
				</tr>
				{% endif %}

				<tr>
					<td><label>{% trans "Last modified:" noop %}</label></td>
					<td>{{ annotated_at }}</td>
				</tr>

				<tr>
					<td><label>{% trans "Author's first name:" noop %}</label></td>
					<td><a href={{ person }}>{{ first_name }}</a></td>
				</tr>
				<tr>
					<td><label>{% trans "Author's last name:" noop %}</label></td>
					<td><a href={{ person }}>{{ last_name }}</a></td>
				</tr>

				{% if email %}
				<tr>
					<td><label>{% trans "Author's email:" noop %}</label></td>
					<td>{{ email }}</td>
				</tr>
				{% endif %}

				<tr>
					<td><label>{% trans "Author's  username:" noop %}</label></td>
					<td><label>{{ username }}</label></td>
				</tr>
				<tr>
					<td><label>{% trans "Via organization:" noop %}</label></td>
					<td><a href={{ organization_uri }}>{{ organization_name }}</a></td>
				</tr>
				<tr>
					<td><label>{% trans "Serialized by:" noop %}</label></td>
					<td><a href={{ agent_uri }}>{{ agent_name }}</a></td>
				</tr>
				<tr>
					<td><label>{% trans "Serialized at:" noop %}</label></td>
					<td>{{ serialized_at }}</td>
				</tr>
				
				{% for motivation in motivations %}
				<tr>
					<td><label>{% trans "Motivated by:" noop %}</label></td>
					<td><a href={{ motivation }}>{{ motivation }}</a></td>
				</tr>
				{% endfor %}
												
				{% for target in targets %}
				<tr>
					<td><label>{% trans "Target URI:" noop %}</label></td>
					<td><a href={{ target.0 }}>{{ target.0 }}</a></td>
				</tr>
				{% for type in target.1 %}
				<tr>
					<td><label>{% trans "Target type:" noop %}</label></td>
					<td><a href={{ type }}>{{ type }}</a></td>
				</tr>
				{% endfor %}
				{% for text in target.2 %}
				<tr>
					<td><label>{% trans "Targets text:" noop %}</label></td>
					<td>{{ text }}</td>
				</tr>
				{% endfor %}
				{% endfor %}

				{% for body in bodies %}
				<tr>
					<td><label>{% trans "Body URI:" noop %}</label></td>
					<td><a href={{ body.0 }}>{{ body.0 }}</a></td>
				</tr>
				{% for type in body.1 %}
				<tr>
					<td><label>{% trans "Body type:" noop %}</label></td>
					<td><a href={{ type }}>{{ type }}</a></td>
				</tr>
				{% endfor %}
				{% for text in body.2 %}
				<tr>
					<td><label>{% trans "Body text:" noop %}</label></td>
					<td>{{ text }}</td>
				</tr>
				{% endfor %}
				{% endfor %}

				{% if citing_entity %}
				<tr>
					<td><label>{% trans "Citing entity:" noop %}</label></td>
					<td><a href={{ citing_entity }}>{{ citing_entity }}</a></td>
				</tr>
				{% endif %}

				{% if cited_entity %}
				<tr>
					<td><label>{% trans "Cited entity:" noop %}</label></td>
					<td><a href={{ cited_entity }}>{{ cited_entity }}</a></td>
				</tr>
				{% endif %}

				{% if citation_characterization %}
				<tr>
					<td><label>{% trans "Citation characterization:" noop %}</label></td>
					<td><a href={{ citation_characterization }}>{{ citation_characterization }}</a></td>
				</tr>
				{% endif %}

				{% if delete %}
				<tr>
					<td style="text-align: right;"><input type="submit"
						value="Delete annotation"></td>
					<td></td>
				</tr>
				{% endif %}
			</table>
			{% if message %}
				<p>{{ message }}</p>
			{% endif %}
		</form>
	</div>
</div>

{% endblock %}
