mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-19 21:58:09 +01:00
finish migration of the feeds page
This commit is contained in:
parent
51106d015e
commit
2fa431ef54
14 changed files with 205 additions and 128 deletions
|
|
@ -15,7 +15,25 @@ module FeedlistHelper
|
|||
linkoptions = merge_hashes( {:format => 'ics'}, user_token_hash, options)
|
||||
link_to('<span class="feed">iCal</span>', linkoptions, :title => "iCal feed" )
|
||||
end
|
||||
|
||||
|
||||
def feed_links(feeds, link_options, title)
|
||||
space = " "
|
||||
html = ""
|
||||
html << rss_formatted_link(link_options)+space if feeds.include?(:rss)
|
||||
html << text_formatted_link(link_options)+space if feeds.include?(:txt)
|
||||
html << ical_formatted_link(link_options)+space if feeds.include?(:ical)
|
||||
html << title
|
||||
return html
|
||||
end
|
||||
|
||||
def all_feed_links_for_project(project)
|
||||
feed_links([:rss, :txt, :ical], { :controller=> 'todos', :action => 'index', :project_id => project.to_param }, content_tag(:strong, project.name))
|
||||
end
|
||||
|
||||
def all_feed_links_for_context(context)
|
||||
feed_links([:rss, :txt, :ical], { :controller=> 'todos', :action => 'index', :context_id => context.to_param }, content_tag(:strong, context.name))
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def merge_hashes(*hashes)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue