From ca702a629868c6ad888e04237c89a23711826cfa Mon Sep 17 00:00:00 2001 From: seocam Date: Mon, 16 Apr 2012 18:38:47 +0000 Subject: [PATCH] Merge com https://bitbucket.org/seocam/atu-colab/src/810a0e848fcd --- colab/rss/feeds.py | 8 ++++++-- colab/rss/urls.py | 6 +++--- colab/settings.py | 2 +- colab/static/css/screen.css | 4 ++++ colab/static/img/COPYRIGHT | 1 + colab/static/img/rss.png | Bin 0 -> 405 bytes colab/super_archives/views.py | 5 ++++- colab/templates/base.html | 17 +++++++++++++++++ colab/templates/home.html | 18 +++++++++++++++--- colab/urls.py | 2 +- colab/views/other.py | 20 +++++++++++++++----- solr-conf/schema.xml | 2 +- update-deploy.sh | 19 +++++++++++++++++++ 13 files changed, 87 insertions(+), 17 deletions(-) create mode 100644 colab/static/img/rss.png create mode 100755 update-deploy.sh diff --git a/colab/rss/feeds.py b/colab/rss/feeds.py index 145b606..e788f6a 100644 --- a/colab/rss/feeds.py +++ b/colab/rss/feeds.py @@ -19,7 +19,9 @@ class LatestThreadsFeeds(Feed): return item.latest_message.url def item_title(self, item): - return item.latest_message.subject_clean + title = '[' + item.mailinglist.name + '] ' + title += item.latest_message.subject_clean + return title def item_description(self, item): return item.latest_message.body @@ -36,7 +38,9 @@ class HottestThreadsFeeds(Feed): return item.latest_message.url def item_title(self, item): - return item.latest_message.subject_clean + title = '[' + item.mailinglist.name + '] ' + title += item.latest_message.subject_clean + return title def item_description(self, item): return item.latest_message.body diff --git a/colab/rss/urls.py b/colab/rss/urls.py index cb6d42d..c995183 100644 --- a/colab/rss/urls.py +++ b/colab/rss/urls.py @@ -2,8 +2,8 @@ from django.conf.urls.defaults import patterns, url import feeds urlpatterns = patterns('', - url(r'threads/latest/$', feeds.LatestThreadsFeeds()), - url(r'colab/latest/$', feeds.LatestColabFeeds()), - url(r'threads/hottest/$', feeds.HottestThreadsFeeds()), + url(r'threads/latest/$', feeds.LatestThreadsFeeds(), name='rss_latest_threads'), + url(r'colab/latest/$', feeds.LatestColabFeeds(), name='rss_latest_colab'), + url(r'threads/hottest/$', feeds.HottestThreadsFeeds(), name='rss_hottest_threads'), ) diff --git a/colab/settings.py b/colab/settings.py index 23ffeaa..e0c3fc9 100644 --- a/colab/settings.py +++ b/colab/settings.py @@ -155,7 +155,7 @@ SOLR_SELECT_PATH = '/solr/select' SOLR_COLAB_URI = 'http://colab.interlegis.gov.br' SOLR_BASE_QUERY = """ - (Type:changeset OR Type:ticket OR Type:wiki OR Type:thread) + ((Type:changeset OR Type:ticket OR Type:wiki OR Type:thread) AND Title:["" TO *]) """ from settings_local import * diff --git a/colab/static/css/screen.css b/colab/static/css/screen.css index 14eebba..bc125f0 100644 --- a/colab/static/css/screen.css +++ b/colab/static/css/screen.css @@ -222,4 +222,8 @@ img.center { content: ''; } +.rss { + float: right; + padding-top: 2px; +} diff --git a/colab/static/img/COPYRIGHT b/colab/static/img/COPYRIGHT index 5e88aad..86cc332 100644 --- a/colab/static/img/COPYRIGHT +++ b/colab/static/img/COPYRIGHT @@ -6,5 +6,6 @@ The icons listed bellow were copied from the Iconic icons package. The icons in * wiki.png * x.png * plus.png +* rss.png The full Iconic package can be found here: https://github.com/downloads/somerandomdude/Iconic/iconic.zip diff --git a/colab/static/img/rss.png b/colab/static/img/rss.png new file mode 100644 index 0000000..978e758 Binary files /dev/null and b/colab/static/img/rss.png differ diff --git a/colab/super_archives/views.py b/colab/super_archives/views.py index fe48da0..5a3d30a 100644 --- a/colab/super_archives/views.py +++ b/colab/super_archives/views.py @@ -56,7 +56,10 @@ def list_messages(request): threads = threads.filter(mailinglist__name=mail_list) paginator = Paginator(threads, 16) - page = int(request.GET.get('p', '1')) + try: + page = int(request.GET.get('p', '1')) + except ValueError: + page = 1 threads = paginator.page(page) lists = MailingList.objects.all() diff --git a/colab/templates/base.html b/colab/templates/base.html index 8c226a2..eeb4f97 100644 --- a/colab/templates/base.html +++ b/colab/templates/base.html @@ -44,6 +44,23 @@ {% endblock %} + + {% block google_analytics %} + + {% endblock %} + diff --git a/colab/templates/home.html b/colab/templates/home.html index 35e7801..4cf84ab 100644 --- a/colab/templates/home.html +++ b/colab/templates/home.html @@ -18,7 +18,11 @@ {% block main-content %}
-

{% trans "Últimas Colaborações" %}

+

{% trans "Últimas Colaborações" %} + RSS +