mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
Removed superfluous 'tracks' directory at the root of the repository.
Testing commits to github.
This commit is contained in:
parent
6a42901514
commit
4cbf5a34d3
2269 changed files with 0 additions and 0 deletions
29
app/helpers/feedlist_helper.rb
Normal file
29
app/helpers/feedlist_helper.rb
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
module FeedlistHelper
|
||||
|
||||
def rss_formatted_link(options = {})
|
||||
image_tag = image_tag("feed-icon.png", :size => "16X16", :border => 0, :class => "rss-icon")
|
||||
linkoptions = merge_hashes( {:format => 'rss'}, user_token_hash, options)
|
||||
link_to(image_tag, linkoptions, :title => "RSS feed")
|
||||
end
|
||||
|
||||
def text_formatted_link(options = {})
|
||||
linkoptions = merge_hashes( {:format => 'txt'}, user_token_hash, options)
|
||||
link_to('<span class="feed">TXT</span>', linkoptions, :title => "Plain text feed" )
|
||||
end
|
||||
|
||||
def ical_formatted_link(options = {})
|
||||
linkoptions = merge_hashes( {:format => 'ics'}, user_token_hash, options)
|
||||
link_to('<span class="feed">iCal</span>', linkoptions, :title => "iCal feed" )
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def merge_hashes(*hashes)
|
||||
hashes.inject(Hash.new){ |result, h| result.merge(h) }
|
||||
end
|
||||
|
||||
def user_token_hash
|
||||
{ :token => current_user.token }
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue