From 762e0f83bc190df3e7bde0a6665bab32ff767944 Mon Sep 17 00:00:00 2001
From: Greg Taylor
Date: Tue, 31 Jul 2007 14:59:00 +0000
Subject: [PATCH] The news archives and searching news is now operational. Next
up, flatpages.
---
apps/news/views.py | 6 ++++--
webtemplates/prosimii/news/archive.html | 18 +++++++++---------
webtemplates/prosimii/news/search_form.html | 6 +++---
3 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/apps/news/views.py b/apps/news/views.py
index 99485b4f83..75fd653d97 100755
--- a/apps/news/views.py
+++ b/apps/news/views.py
@@ -16,7 +16,7 @@ sidebar = """
This page’s menu:
"""
@@ -51,6 +51,7 @@ def news_archive(request):
pagevars = {
"page_title": "News Archive",
+ "browse_url": "/news/archive",
"sidebar": sidebar
}
@@ -96,7 +97,8 @@ def search_results(request):
pagevars = {
"page_title": "Search Results",
- "searchtext": "search_terms="+ cleaned_get['search_terms'],
+ "searchtext": cleaned_get['search_terms'],
+ "browse_url": "/news/search/results",
"sidebar": sidebar
}
diff --git a/webtemplates/prosimii/news/archive.html b/webtemplates/prosimii/news/archive.html
index 326e2db75a..556f3eba5d 100644
--- a/webtemplates/prosimii/news/archive.html
+++ b/webtemplates/prosimii/news/archive.html
@@ -8,11 +8,11 @@
{% endblock %}
{% block content %}
-News Archive
+{{page_title}}
-Navigation: First |
+Navigation: First |
{% if has_previous %}
- Prev
+ Prev
{% else %}
Prev
{% endif %}
@@ -20,11 +20,11 @@
| {{page}} of {{pages}} pages |
{% if has_next %}
- Next
+ Next
{% else %}
Next
{% endif %}
-| Last
+| Last
{% for entry in object_list %}
{{entry.topic.name}}: {{entry.title}}
@@ -32,9 +32,9 @@
{{entry.body|truncatewords:80}}
{% endfor %}
-Navigation: First |
+Navigation: First |
{% if has_previous %}
- Prev
+ Prev
{% else %}
Prev
{% endif %}
@@ -42,10 +42,10 @@
| {{page}} of {{pages}} pages |
{% if has_next %}
- Next
+ Next
{% else %}
Next
{% endif %}
-| Last
+| Last
{% endblock %}
\ No newline at end of file
diff --git a/webtemplates/prosimii/news/search_form.html b/webtemplates/prosimii/news/search_form.html
index 4cb4d74170..acf246fdf9 100644
--- a/webtemplates/prosimii/news/search_form.html
+++ b/webtemplates/prosimii/news/search_form.html
@@ -10,10 +10,10 @@
{% block content %}
Search News
Enter a search term or phrase to search by. Matches will be made against
- news titles and their contents.
+ news titles and their contents. Searches must be at least three characters
+ long.
- {{debug}}
{% endblock %}
\ No newline at end of file