Merged in [8208] from rjsparks@nostrum.com:

use doc.href rather than manually constructing URLs in several templates. Fixes ticket #1459.
 - Legacy-Id: 8314
Note: SVN reference [8208] has been migrated to Git commit be3d2034ff8432ca9869d26a56e51cc66275c68b
This commit is contained in:
Henrik Levkowetz 2014-09-16 19:34:03 +00:00
parent d633499f03
commit e661231b99
6 changed files with 7 additions and 9 deletions

View file

@ -296,7 +296,7 @@ MAILING_LIST_INFO_URL = "https://www.ietf.org/mailman/listinfo/%(list_addr)s"
# versions right now, we'll point to external websites
DOC_HREFS = {
"charter": "http://www.ietf.org/charter/{doc.name}-{doc.rev}.txt",
"draft": "http://tools.ietf.org/html/{doc.name}-{doc.rev}",
"draft": "http://www.ietf.org/archive/id/{doc.name}-{doc.rev}.txt",
"slides": "http://www.ietf.org/slides/{doc.name}-{doc.rev}",
"conflrev": "http://www.ietf.org/cr/{doc.name}-{doc.rev}.txt",
"statchg": "http://www.ietf.org/sc/{doc.name}-{doc.rev}.txt",

View file

@ -277,7 +277,7 @@
{% else %}
<p>This Internet-Draft is no longer active. A copy of the expired Internet-Draft can be found here:<br/>
<a href="http://www.ietf.org/archive/id/{{ doc.name }}-{{ doc.rev }}.txt">http://www.ietf.org/archive/id/{{ doc.name }}-{{ doc.rev }}.txt</a>
<a href="{{doc.href}}">{{doc.href}}</a>
<h4>Abstract</h4>

View file

@ -6,7 +6,7 @@
<div>
<a href="{% url "doc_view" name=doc.name %}">{{doc.name}}-{{doc.rev}}</a>
<a href="http://www.ietf.org/id/{{doc.name}}-{{doc.rev}}.txt">[txt]</a>
<a href="{{doc.href}}">[txt]</a>
<br/>{{ doc.title }}
@ -14,7 +14,7 @@
<div style="padding-left:30px;">
<a href="{% url "doc_view" name=conflictdoc.name %}">{{ conflictdoc.name }}-{{ conflictdoc.rev }}</a>
<a href="http://www.ietf.org/id/{{ conflictdoc.name }}-{{ conflictdoc.rev }}.txt">[txt]</a>
<a href="{{ conflictdoc.href }}">[txt]</a>
<br/>{{ conflictdoc.title }} ({{ conflictdoc.stream }}: {{ conflictdoc.intended_std_level }})
{% if conflictdoc.note %}
<br/>Note: {{ conflictdoc.note|linebreaksbr }}

View file

@ -9,8 +9,6 @@
{% with doc.rfc_number as rfc_number %}
{% if rfc_number %}
<a href="http://www.rfc-editor.org/rfc/rfc{{rfc_number}}/">[txt]</a>
{% elif doc.type.slug == 'draft' %}
<a href="http://www.ietf.org/id/{{doc.name}}-{{doc.rev}}.txt">[txt]</a>
{% else %}
<a href="{{doc.href}}">[txt]</a>
{% endif %}

View file

@ -2,12 +2,12 @@
{{ doc.title }}
<br><a href="{% url "doc_view" name=doc.canonical_name %}">{{doc.canonical_name}}</a>
<a href="http://www.ietf.org/id/{{doc.canonical_name}}-{{doc.rev}}.txt">[txt]</a>
<a href="{{doc.href}}">[txt]</a>
<div style="padding-left:20px">
{{ doc.conflictdoc.title }} ({{ doc.conflictdoc.stream }}: {{ doc.conflictdoc.intended_std_level }})
<br><a href="{% url "doc_view" name=doc.conflictdoc.canonical_name %}">{{ doc.conflictdoc.canonical_name }}</a>
<a href="http://www.ietf.org/id/{{ doc.conflictdoc.canonical_name }}-{{ doc.conflictdoc.rev }}.txt">[txt]</a>
<a href="{{doc.conflictdoc.href}}">[txt]</a>
{% if doc.conflictdoc.note %}
<br>Note: {{ doc.conflictdoc.note|linebreaksbr }}
{% endif %}

View file

@ -5,7 +5,7 @@
{% if rfc_number %}
<a href="http://www.rfc-editor.org/rfc/rfc{{ rfc_number }}/">[txt]</a>
{% else %}
<a href="http://www.ietf.org/id/{{ doc.canonical_name }}-{{ doc.rev }}.txt">[txt]</a>
<a href="{{doc.href}}">[txt]</a>
{% endif %}
{% endwith %}