Merged from source:sprint/77/rjs@2119: Added STD/FYI/BCP info to the standard RFC display page
- Legacy-Id: 2134
This commit is contained in:
parent
f3337f2a31
commit
86738a8b53
|
@ -4,6 +4,10 @@ ietfdb (2.46)
|
|||
|
||||
* Added a link to the draft pages with email address to the draft authors
|
||||
|
||||
From RjS:
|
||||
|
||||
* Added STD/FYI/BCP info to the standard RFC display page
|
||||
|
||||
-- Henrik Levkowetz <henrik@levkowetz.com> 21 Mar 2010 00:36:05 +0100
|
||||
|
||||
ietfdb (2.46)
|
||||
|
|
|
@ -287,6 +287,8 @@ class RfcWrapper:
|
|||
return self._rfc_doc_list("updated_by")
|
||||
def updates(self):
|
||||
return self._rfc_doc_list("updates")
|
||||
def also(self):
|
||||
return self._rfc_doc_list("also")
|
||||
def has_errata(self):
|
||||
return self._rfcindex and (self._rfcindex.has_errata > 0)
|
||||
|
||||
|
|
|
@ -197,6 +197,9 @@ def urlize_ietf_docs(string, autoescape=None):
|
|||
if autoescape and not isinstance(string, SafeData):
|
||||
string = escape(string)
|
||||
string = re.sub("(?<!>)(RFC ?)0{0,3}(\d+)", "<a href=\"/doc/rfc\\2/\">\\1\\2</a>", string)
|
||||
string = re.sub("(?<!>)(BCP ?)0{0,3}(\d+)", "<a href=\"http://tools.ietf.org/html/bcp\\2/\">\\1\\2</a>", string)
|
||||
string = re.sub("(?<!>)(STD ?)0{0,3}(\d+)", "<a href=\"http://tools.ietf.org/html/std\\2/\">\\1\\2</a>", string)
|
||||
string = re.sub("(?<!>)(FYI ?)0{0,3}(\d+)", "<a href=\"http://tools.ietf.org/html/fyi\\2/\">\\1\\2</a>", string)
|
||||
string = re.sub("(?<!>)(draft-[-0-9a-zA-Z._+]+)", "<a href=\"/doc/\\1/\">\\1</a>", string)
|
||||
return mark_safe(string)
|
||||
urlize_ietf_docs.is_safe = True
|
||||
|
|
|
@ -44,6 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
{% if doc.updated_by %}<br />Updated by {{ doc.updated_by|urlize_ietf_docs }}{%endif %}
|
||||
{% if doc.obsoletes %}<br />Obsoletes {{ doc.obsoletes|urlize_ietf_docs }}{%endif %}
|
||||
{% if doc.updates %}<br />Updates {{ doc.updates|urlize_ietf_docs }}{%endif %}
|
||||
{% if doc.also %}<br />Also Known As {{ doc.also|urlize_ietf_docs }}{%endif %}
|
||||
{% if doc.draft_name %}<br/ >Was <a href="/doc/{{ doc.draft_name}}/">{{doc.draft_name}}</a>{% endif %}
|
||||
{% if doc.has_errata %}<br /><a href="http://www.rfc-editor.org/errata_search.php?rfc={{doc.rfc_number}}" rel="nofollow">Errata</a>{% endif %}
|
||||
</td></tr>
|
||||
|
|
Loading…
Reference in a new issue