From 46e15852c0839dacdbd651bc4c53698e7036076c Mon Sep 17 00:00:00 2001
From: str4d <str4d@mail.i2p>
Date: Mon, 4 Apr 2016 12:50:16 +0000
Subject: [PATCH] Add proposal number to proposal page

---
 i2p2www/pages/spec/proposal-show.html | 2 ++
 i2p2www/spec/views.py                 | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/i2p2www/pages/spec/proposal-show.html b/i2p2www/pages/spec/proposal-show.html
index 4b3d8c9c9..de00a93b8 100644
--- a/i2p2www/pages/spec/proposal-show.html
+++ b/i2p2www/pages/spec/proposal-show.html
@@ -8,6 +8,8 @@
 {% endblock %}
 {% block content %}
 <dl class="meta">
+  <dt>Number</dt>
+  <dd>{{ meta.num }}</dd>
   <dt>Author</dt>
   <dd>{{ meta.author }}</dd>
   <dt>Created</dt>
diff --git a/i2p2www/spec/views.py b/i2p2www/spec/views.py
index 318638553..a2d26b29d 100644
--- a/i2p2www/spec/views.py
+++ b/i2p2www/spec/views.py
@@ -49,6 +49,7 @@ PROPOSAL_LIST_METATAGS = [
     ]
 PROPOSAL_STATUS_SORT = {
     'Draft': 1,
+    'Rejected': 100,
     '': 999,
     }
 
@@ -151,6 +152,7 @@ def render_rst(directory, name, meta_parser, template):
     # publish the spec with docutils
     parts = publish_parts(source=rendered_content, source_path=directory, writer_name="html")
     meta = meta_parser(parts['meta'])
+    meta['num'] = int(name[:3])
 
     return render_template(template, title=parts['title'], toc=toc, body=parts['fragment'], name=name, meta=meta)
 
-- 
GitLab