mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-31 05:05:18 +01:00
Merge pull request #2016 from C-Otto/fix-feeds-2.3
use @not_done_todos for feeds
This commit is contained in:
commit
e01872d515
6 changed files with 238 additions and 74 deletions
|
|
@ -1,9 +1,9 @@
|
|||
atom_feed do |feed|
|
||||
feed.title(@feed_title)
|
||||
feed.subtitle(@feed_description)
|
||||
feed.updated(@todos.last.updated_at)
|
||||
feed.updated(@not_done_todos.last.updated_at)
|
||||
|
||||
@todos.each do |todo|
|
||||
@not_done_todos.each do |todo|
|
||||
feed.entry(todo) do |entry|
|
||||
entry.title(h(todo.description))
|
||||
entry.link(todo.project ? project_url(todo.project) : context_url(todo.context))
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ TZID:<%= ENV['TZ'] || 'GMT' %>
|
|||
LAST-MODIFIED:<%= Time.now.strftime("%Y%m%dT%H%M%SZ") %>
|
||||
TZNAME:<%= ENV['TZ'] %>
|
||||
END:VTIMEZONE
|
||||
<% for @todo in @todos -%>
|
||||
<% for @todo in @not_done_todos -%>
|
||||
BEGIN:VTODO
|
||||
DTSTAMP:<%= @todo.created_at.strftime("%Y%m%dT%H%M%SZ") %>
|
||||
DTSTART;VALUE=DATE:<%= @todo.created_at.strftime("%Y%m%d") %>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ xml.rss :version => "2.0" do
|
|||
xml.language 'en-us'
|
||||
xml.ttl 40
|
||||
|
||||
@todos.each do |todo|
|
||||
@not_done_todos.each do |todo|
|
||||
xml.item do
|
||||
xml.title h(todo.description)
|
||||
xml.description feed_content_for_todo(todo)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue