| Module | ApplicationHelper |
| In: |
app/helpers/application_helper.rb
|
Project iboard4 Author Andreas Altendorfer Copyright 2009 by Andreas Altendorfer
Methods added to this helper will be available to all templates in the application.
return true if url is part of the actual requested url
# File app/helpers/application_helper.rb, line 9
9: def mark_active_link(item,url)
10: l = link_to(t(item[:label].to_s.downcase), item[:url])
11: if Permalink.is_destination?(url,item[:url])
12: "<div class='user_menu_selected_url'>"+l+ "</div>"
13: else
14: "<div class='user_menu_unselected_url'>"+l+ "</div>"
15: end
16: end
Progress bar
# File app/helpers/application_helper.rb, line 28
28: def show_spinner
29: content_tag( "div", "<div id='ajax_msg'>" + t(:working) + "</div>" + BR*2 + image_tag("spinner.gif", :align=>:middle),
30: :id => "ajax_busy", :style => "display:none;" )
31: end
# File app/helpers/application_helper.rb, line 33
33: def start_update
34: periodically_call_remote(:url => {:controller => 'user_sessions', :action => 'get_ajax_msg'}, :frequency => '1',
35: :update => 'ajax_msg');
36: end