{% extends "p4l/p4l_base.html" %}
{% load static %}
{% load i18n %}

{% block page_title %}{% trans 'Record' %} {{ record.identifier }} - {% trans 'View' %}{% endblock %}

{% block js_page %}
<script type="text/javascript">
    var record_api_url = "{% url 'record-detail' identifier=record.identifier %}"; 
</script>
<script type="text/javascript" src="{% static 'p4l/lib/angular/angular.min.js' %}"></script>
<script type="text/javascript" src="{% static 'p4l/lib/angular/angular-resource.min.js' %}"></script>
<script type="text/javascript" src="{% static 'p4l/js/p4l.js' %}"></script>
{% endblock %}

{% block content %}
<form action="" method="post">{% csrf_token %}
<table class="table record-table">
{{ form.as_table }}
</table>
<input type="submit" value="Update" />
</form>
<div ng-app="recordApp" ng-controller="RecordCtrl">
{% verbatim %}
<p>identifier <input name="identifier" ng-model="record.identifier"/></p>
{% endverbatim %}
</div>

<div class="row">
    <div class="col-md-12 text-right">
      <a href="?uri={{ record.uri }}&lang=fr" alt="FR" /><img src="{% static 'p4l/img/blank.gif' %}" class="flag flag-fr" alt="FR" /></a>&nbsp;
      <a href="?uri={{ record.uri }}&lang=en" alt="EN" /><img src="{% static 'p4l/img/blank.gif' %}" class="flag flag-gb" alt="EN" /></a>&nbsp;
      <a href="?uri={{ record.uri }}&lang=es" alt="ES" /><img src="{% static 'p4l/img/blank.gif' %}" class="flag flag-es" alt="ES" /></a>
</div>
{% endblock %}