From 5fcd0297edac0558db5ca00fb39682c86ca5e1da Mon Sep 17 00:00:00 2001 From: Ole Laursen <olau@iola.dk> Date: Wed, 2 May 2012 12:16:25 +0000 Subject: [PATCH] Reverse direction of revisions on charter /doc/ page to match tools.ietf.org/html/draft-*. - Legacy-Id: 4349 --- ietf/idrfc/views_doc.py | 6 ++++-- ietf/templates/idrfc/document_charter.html | 2 +- static/css/doc.css | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ietf/idrfc/views_doc.py b/ietf/idrfc/views_doc.py index 1021e1271..ac6035302 100644 --- a/ietf/idrfc/views_doc.py +++ b/ietf/idrfc/views_doc.py @@ -92,10 +92,12 @@ def document_main(request, name, rev=None): doc = get_object_or_404(Document, docalias__name=name) group = doc.group - revisions = [ doc.rev ] - for h in doc.history_set.order_by("-time"): + revisions = [] + for h in doc.history_set.order_by("time", "id"): if h.rev and not h.rev in revisions: revisions.append(h.rev) + if not doc.rev in revisions: + revisions.append(doc.rev) snapshot = False diff --git a/ietf/templates/idrfc/document_charter.html b/ietf/templates/idrfc/document_charter.html index 9afb053fd..3559f8021 100644 --- a/ietf/templates/idrfc/document_charter.html +++ b/ietf/templates/idrfc/document_charter.html @@ -15,7 +15,7 @@ Snapshots: <span class="revisions"> {% for rev in revisions %} - <a {% if rev != doc.rev %}href="{% url doc_view name=doc.name %}{% if not forloop.first %}{{ rev }}/{% endif %}"{% endif %}>{{ rev }}</a> + <a {% if rev != doc.rev %}href="{% url doc_view name=doc.name %}{% if not forloop.last %}{{ rev }}/{% endif %}"{% endif %}>{{ rev }}</a> {% endfor %} </span> </div> diff --git a/static/css/doc.css b/static/css/doc.css index 3a49e3c9e..8d1e4211e 100644 --- a/static/css/doc.css +++ b/static/css/doc.css @@ -9,7 +9,7 @@ .m_h { font-family: arial; font-weight:bold;} .snapshots { margin: 0.5em 0; } -.snapshots .revisions a:first-child { font-weight: bold } +.snapshots .revisions a:last-child { font-weight: bold; } .metabox .actions a { display: inline-block; margin-right: 0.4em; } .metabox .ballot-summary { font-style: italic; }