Reviewers: ,

Description:
tryton-rietveld: Add new rss feed, remove cc to ML and google-analytics

Please review this at http://codereview.tryton.org/947002/

Affected files:
  M codereview/feeds.py
  M codereview/urls.py
  M codereview/views.py
  M index.yaml
  M templates/base.html
  A templates/feeds/new_description.html
  A templates/feeds/new_title.html


Index: codereview/feeds.py
===================================================================
--- a/codereview/feeds.py
+++ b/codereview/feeds.py
@@ -125,6 +125,18 @@
     return query.fetch(RSS_LIMIT)


+class NewFeed(BaseFeed):
+  title = 'Code Review - New issues'
+
+  def items(self):
+    query = models.Issue.gql('WHERE closed = FALSE AND private = FALSE '
+                             'ORDER BY created DESC')
+    return query.fetch(RSS_LIMIT)
+
+  def item_pubdate(self, item):
+    return item.created
+
+
 class OneIssueFeed(BaseFeed):
   def link(self):
     return reverse('codereview.views.index')
Index: codereview/urls.py
===================================================================
--- a/codereview/urls.py
+++ b/codereview/urls.py
@@ -93,6 +93,7 @@
   'mine' : feeds.MineFeed,
   'all': feeds.AllFeed,
   'issue' : feeds.OneIssueFeed,
+  'new': feeds.NewFeed,
 }

 urlpatterns += patterns(
Index: codereview/views.py
===================================================================
--- a/codereview/views.py
+++ b/codereview/views.py
@@ -3312,8 +3312,6 @@
       del context['patch']
   if issue.message_set.count(1) > 0:
     subject = 'Re: ' + subject
-  elif not issue.private:
-    cc.append('[email protected]')
   if comments:
     details = _get_draft_details(request, comments)
   else:
Index: index.yaml
===================================================================
--- a/index.yaml
+++ b/index.yaml
@@ -66,6 +66,13 @@
   properties:
   - name: closed
   - name: private
+  - name: created
+    direction: desc
+
+- kind: Issue
+  properties:
+  - name: closed
+  - name: private
   - name: modified
     direction: desc

Index: templates/base.html
===================================================================
--- a/templates/base.html
+++ b/templates/base.html
@@ -256,17 +256,5 @@
<div style="margin-top: .3em;">This is Rietveld <a href='http://code.google.com/p/rietveld/source/list'>{{rietveld_revision}}</a></div>
 </div>

-{%if not is_dev%}
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl."; : "http://www.";); -document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-var pageTracker = _gat._getTracker("UA-4361230-6");
-pageTracker._initData();
-pageTracker._trackPageview();
-</script>
-{%endif%}
-
 </body>
 </html>
Index: templates/feeds/new_description.html
===================================================================
new file mode 100644
--- /dev/null
+++ b/templates/feeds/new_description.html
@@ -0,0 +1,1 @@
+{%extends "feeds/template_description.html"%}
Index: templates/feeds/new_title.html
===================================================================
new file mode 100644
--- /dev/null
+++ b/templates/feeds/new_title.html
@@ -0,0 +1,1 @@
+{%extends "feeds/template_title.html"%}


Reply via email to