Skip to content

Commit 046ee2a

Browse files
committed
New main page
- Legacy-Id: 1971
1 parent 2451d19 commit 046ee2a

3 files changed

Lines changed: 86 additions & 1 deletion

File tree

ietf/idrfc/views.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,17 @@
3131
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232

3333
from django.shortcuts import render_to_response
34+
from django.template import RequestContext
3435
from ietf.idrfc.models import RfcIndex, RfcEditorQueue, DraftVersions
36+
from ietf.idrfc.views_search import SearchForm
3537

3638
def test(request):
3739
q = RfcEditorQueue.objects.order_by('-date_received')[:20]
3840
v = DraftVersions.objects.order_by('-revision_date')[:20]
3941
r = RfcIndex.objects.order_by('-rfc_number')[:20]
4042
return render_to_response('idrfc/test.html', {'queue':q, 'versions':v, 'rfcs':r})
43+
44+
def main(request):
45+
form = SearchForm()
46+
return render_to_response('idrfc/main.html', {'form':form}, context_instance=RequestContext(request))
47+

ietf/templates/idrfc/main.html

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{% extends "idrfc/base.html" %}
2+
{% comment %}
3+
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
4+
All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions
8+
are met:
9+
10+
* Redistributions of source code must retain the above copyright
11+
notice, this list of conditions and the following disclaimer.
12+
13+
* Redistributions in binary form must reproduce the above
14+
copyright notice, this list of conditions and the following
15+
disclaimer in the documentation and/or other materials provided
16+
with the distribution.
17+
18+
* Neither the name of the Nokia Corporation and/or its
19+
subsidiary(-ies) nor the names of its contributors may be used
20+
to endorse or promote products derived from this software
21+
without specific prior written permission.
22+
23+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34+
{% endcomment %}
35+
36+
{% block title %}IETF Datatracker{% endblock %}
37+
38+
{% block content %}
39+
<table>
40+
<tr valign="middle">
41+
<td colspan="2">
42+
<h1 style="font-size:40px;margin-bottom:10px;margin-top:5px;"><b>IETF Datatracker</b></h1>
43+
</td>
44+
<td style="padding:8px;"><div style="text-align:center;"><img src="http://www.ietf.org/images/ietflogo.gif" width="140"/></div></td>
45+
</tr>
46+
47+
<tr valign="top"><td style="width:600px;background:#edf5ff;padding:8px;border:1px solid #cccccc;">
48+
<div noid="search_form_box">
49+
<h1>Search Internet-Drafts and RFCs</h1>
50+
{% include "idrfc/search_form.html" %}
51+
</div>
52+
</td>
53+
<td style="width:8px;">&nbsp;</td>
54+
<td style="width:200px;background:#fff5df;padding:8px;border:1px solid #cccccc;">
55+
The IETF Datatracker is the IETF's web system for managing information
56+
about:
57+
<ul style="padding-left:20px;">
58+
<li><a href="/doc/">Internet-Drafts and RFCs</a></li>
59+
<li><a href="/ipr/">IPR disclosures</a></li>
60+
<li><a href="/liaison/">Liaison statements</a></li>
61+
<li><a href="/meeting/agenda/">Meeting agenda</a> and <a href="/meeting/materials/">session agendas/slides/minutes</a></li>
62+
<li><a href="/iesg/agenda/">IESG telechat agenda</a></li>
63+
</ul>
64+
</td>
65+
</tr>
66+
</table>
67+
68+
<div id="search_results" style="margin-top:8px;">
69+
{% if docs %}
70+
{% include "idrfc/search_results.html" %}
71+
{% endif %}
72+
</div>
73+
{% endblock content %}
74+
{% block scripts %}
75+
YAHOO.util.Event.onContentReady("search_submit_button", function () {
76+
var oButton = new YAHOO.widget.Button("search_submit_button", {});
77+
});
78+
{% endblock scripts %}

ietf/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
(r'^doc/', include('ietf.idrfc.urls')),
5454
(r'^wg/', include('ietf.wginfo.urls')),
5555

56-
(r'^$', 'ietf.redirects.views.redirect'),
56+
(r'^$', 'ietf.idrfc.views.main'),
5757

5858
# Google webmaster tools verification url
5959
(r'^googlea30ad1dacffb5e5b.html', 'django.views.generic.simple.direct_to_template', { 'template': 'googlea30ad1dacffb5e5b.html' }),

0 commit comments

Comments
 (0)