mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-23 07:34:08 +01:00
Code style fixes
This commit is contained in:
parent
c6bbc67dab
commit
d8acf60049
72 changed files with 458 additions and 594 deletions
|
|
@ -1,7 +1,6 @@
|
|||
module FeedlistHelper
|
||||
|
||||
def linkoptions(format, options)
|
||||
merge_hashes( {:format => format}, options, user_token_hash)
|
||||
merge_hashes( { :format => format }, options, user_token_hash)
|
||||
end
|
||||
|
||||
def rss_formatted_link(options = {})
|
||||
|
|
@ -10,25 +9,25 @@ module FeedlistHelper
|
|||
end
|
||||
|
||||
def text_formatted_link(options = {})
|
||||
link_to(content_tag(:span, 'TXT', {:class => 'feed', :title => "Plain text feed"}), linkoptions('txt', options))
|
||||
link_to(content_tag(:span, 'TXT', { :class => 'feed', :title => "Plain text feed" }), linkoptions('txt', options))
|
||||
end
|
||||
|
||||
def ical_formatted_link(options = {})
|
||||
link_to(content_tag(:span, 'iCal', {:class=>"feed", :title => "iCal feed"}), linkoptions('ics', options))
|
||||
link_to(content_tag(:span, 'iCal', { :class=>"feed", :title => "iCal feed" }), linkoptions('ics', options))
|
||||
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 << 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.html_safe
|
||||
end
|
||||
|
||||
def all_feed_links(object, symbol)
|
||||
feed_links([:rss, :txt, :ical], { :controller=> 'todos', :action => 'index', symbol => object.to_param }, content_tag(:strong, object.name))
|
||||
feed_links([:rss, :txt, :ical], { :controller => 'todos', :action => 'index', symbol => object.to_param }, content_tag(:strong, object.name))
|
||||
end
|
||||
|
||||
def all_feed_links_for_project(project)
|
||||
|
|
@ -48,6 +47,4 @@ module FeedlistHelper
|
|||
def user_token_hash
|
||||
{ :token => current_user.token }
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue