datatracker/ietf/templates/doc/document_html.html
Henrik Levkowetz 814e1315b5 Added a new document tab for some documents, showing htmlized drafts and RFCs
using the htmlization code previously developed for tools.ietf.org.  As the
generation of the htmlized page is a bit too costly to do on the fly for
often-referenced drafts and RFCs, the part of each page which contains the
htmlized document is cached on file with a cache time of 2 weeks.

Changed all links which pointed to the htmlized version on tools to instead
point at the datatracker htmlized document.

Tweaked some URLs which didn't permit retrieval of intermediate-rev-charters.

Narrowed the pattern for document names to disallow dots in names, and
instead explicitly enumerated the few historical draftw with dots in the
name.

Added a file-system cache for the htmlized documents, and specified a
max_entries value for caches, overriding the default 300 entries.

Tweaked the code for new author email entries to provide a time if missing
in an updated entry.

Changed links in various email templates which pointed at tools.ietf.org
pages to instead point at datatracker pages, where appropriate.

Changed the search result rows to provide links to both the current meta-
information document pages (with a (i) info symbol) and to the new htmlized
document pages.
 - Legacy-Id: 13040
2017-03-20 14:08:52 +00:00

70 lines
2.2 KiB
HTML

{% extends "base.html" %}
{# Copyright The IETF Trust 2016, All Rights Reserved #}
{% load origin %}
{% load staticfiles %}
{% load ietf_filters %}
{% load cache %}
{% block pagehead %}
<link rel="alternate" type="application/atom+xml" title="Document changes" href="/feed/document-changes/{{ doc.name }}/">
<meta name="description" content="{{ doc.title }} {% if doc.get_state_slug == "rfc" %}(RFC {{ rfc_number }}{% if published %}, {{ published.time|date:"F Y" }}{% endif %}{% if obsoleted_by %}; obsoleted by {{ obsoleted_by|join:", " }}{% endif %}){% else %}(Internet-Draft, {{ doc.time|date:"Y" }}){% endif %}">
<script src="{% static 'd3/d3.min.js' %}"></script>
<script src="{% static 'jquery/jquery.min.js' %}"></script>
{% endblock %}
{% block morecss %}
.inline { display: inline; }
{% endblock %}
{% block title %}
{% if doc.get_state_slug == "rfc" %}
{{ doc.canonical_name }}
{% else %}
{{ doc.name }}-{{ doc.rev }}
{% endif %}
{% endblock %}
{% block bodyAttrs %}style="padding-top: 0;"{% endblock %}
{% block content %}
{% origin %}
<div class="hidden-print">
{{ top | safe }}
</div>
{# {% include "doc/revisions_list.html" %} #}
<div class="col-md-2"></div>
<div class="col-md-8 rfcmarkup">
{% if doc.meta %}
<div class="hidden-print">
<pre class="meta-info">{{ doc.meta|safe }}</pre>
</div>
{% endif %}
{% comment %}
{% if doc.is_dochistory %}
{% if doc.rev != doc.doc.rev %}
<pre class="meta-info alert-warning text-center">A newer version of the document below exists</pre>
{% elif doc.doc.is_rfc %}
<pre class="meta-info alert-info text-center">The draft below has been published as <a href="{% url 'ietf.doc.views_doc.document_html' name=doc.doc.canonical_name %}">RFC {{doc.doc.rfc_number}}</a></pre>
{% endif %}
{% endif %}
{% endcomment %}
{% with 1209600 as two_weeks %}
{% cache two_weeks htmlized doc.name doc.rev using="htmlized" %}
<div>
{{ doc.htmlized|default:"Generation of htmlized text failed"|safe }}
</div>
{% endcache %}
{% endwith %}
</div>
<div class="col-md-1"></div>
<div class="col-md-1"></div>
{% endblock %}
{% block footer %}
<div></div>
{% endblock %}