This repository has been archived by the owner. It is now read-only.
Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
113 lines (107 sloc) 5.35 KB
{% extends 'base.html' %}
{% load i18n %}
{% block extrahead %}
<link rel="stylesheet" href="http://assets.annotateit.org/annotator/v1.2.9/annotator.min.css">
{% endblock extrahead %}
{% block content %}
{% include menu_path %}
<div class="col-lg-9 standard-docs">
{% if current_release.is_master %}
<div class="panel panel-danger">
<div class="panel-heading">
<h4 class="panel-title"><span class="glyphicon glyphicon-warning-sign"></span> {% trans "You are viewing master, comments may not appear if they were on previous versions of master." %}</h4>
</div>
<div class="panel-body">
<p>{% trans "You are reading the very latest version of the standard. Not an official release. The latest release is " %}<a href="{% url 'standard-lang' other_releases.0.name lang %}">{{ other_releases.0.display_name }}</a></p>
<p>{% trans "The master document is a living document that is changing as we update it. " %}</p>
<p>{% trans "This version of master is identified by its unique id:" %} {{ current_release.commit }}</p>
<p>{% url 'standard' current_release.commit lang file_path as commit_url %}{% blocktrans %}Any comments you make will not show up if master is updated, but will always be available <a href="{{ commit_url }}">here</a>{% endblocktrans %}</p>
</div>
</div>
{% endif %}
{% if commit %}
<div class="panel panel-danger">
<div class="panel-heading">
<h4 class="panel-title"><span class="glyphicon glyphicon-warning-sign"></span>{% blocktrans %} You are the version of the standard at commit {{ commit }}.{% endblocktrans %}</h4>
</div>
<div class="panel-body">
<p>{% trans "The lastest version of the standard is always changing." %}</p>
<p>{% url 'standard-lang' 'master' lang as master_url %}{% blocktrans %}The <a href="{{ master_url }}">master document</a> is a living document that is changing as we update it.{% endblocktrans %}</p>
<p>{% blocktrans %}This is a specific version of the standard for viewing comments on this specific version ({{ commit }}).{% endblocktrans %}</p>
<p>{% url 'latest' as latest_url %}{% blocktrans %}You may have ended up here by mistake and want to view the <a href="{{ latest_url }}">latest released version of the standard</a>.{% endblocktrans %}</p>
</div>
</div>
{% endif %}
{% if latest_release_name != current_release.name and not current_release.is_master and not commit %}
<div class="panel panel-danger">
<div class="panel-heading">
<h4 class="panel-title"><span class="glyphicon glyphicon-warning-sign"></span>{% trans "Not the latest release." %}</h4>
</div>
<div class="panel-body">
<p>{% url 'standard-lang' other_releases.0.name lang as latest_url2 %}{% blocktrans %}You are viewing v{{ release_name }}. The latest release is <a href="{{ latest_url2 }}">v{{ latest_release_name }}</a>{% endblocktrans %}</p>
</div>
</div>
{% endif %}
{% include content_path %}
</div>
{% endblock content %}
{% block javascript %}
<script src="http://assets.annotateit.org/annotator/v1.2.9/annotator-full.min.js"></script>
<script>
jQuery(function ($) {
if ($('html').is('.ie6, .ie7, .ie8, .ie9')) {
alert("{% trans "This site does not work with Internet Explorer 9 or earlier. Please use a more recent version of Internet Explorer, or an open-source browser such as Firefox" %}");
} else {
var PROJECTNAME = 'ocdsstandard',
VERSION = '{% if current_release.is_master %}{{ current_release.commit }}{% else %}{{ current_release.display_name }}{% endif %}',
URI = '{{ request.build_absolute_uri }}',
SITE_UNIQUE_ID = '{{ site_unique_id }}',
PAGE_UNIQUE_ID = SITE_UNIQUE_ID + VERSION;
a = $('#annotatable').annotator(
{% if not request.user.is_authenticated %}
{ readOnly: true }
{% endif %}
);
a.annotator('setupPlugins', {}, {
{% if request.user.is_authenticated %}
Auth: {tokenUrl: '{% url 'token' %}'},
{% else %}
Auth: false,
{% endif %}
Tags: false,
Store: false,
Filter: false,
Permissions: {
showViewPermissionsCheckbox: false,
showEditPermissionsCheckbox: false,
user: '{{ request.user.username }}',
permissions: {
'read': ["group:__world__"],
'update': ["{{ request.user.username }}"],
'delete': ["{{ request.user.username }}"],
'admin': ["{{ request.user.username }}"],
},
},
});
a.annotator('addPlugin', 'Store', {
prefix: 'http://annotateit.org/api',
annotationData: {
'project': PROJECTNAME,
'version': VERSION,
'uri': URI,
'siteuid': SITE_UNIQUE_ID,
'pageuid': PAGE_UNIQUE_ID,
},
loadFromSearch: {
{% if commit %}
'version': '{{ commit }}',
{% else %}
'pageuid': PAGE_UNIQUE_ID.toLowerCase(),
{% endif %}
'limit': 1000,
},
});
}
});
</script>
{% endblock javascript %}