% subscriptions = ProjectSubscriber.joins(:project).where(:user_id => @user.id) %> <% if subscriptions.any? %> <% content_for(:header_tags) do %> <% if defined?(observe_field) %> <%= javascript_include_tag('subscription_prototype', :plugin => 'subscription') %> <% else %> <%= javascript_include_tag('subscription_jquery', :plugin => 'subscription') %> <% end %> <% end %>
<% if defined?(observe_field) %> <%= javascript_tag("Event.observe(window, 'load', fix_user_subscriptions_position);") %> <% else %> <%= javascript_tag("$(document).ready(fix_user_subscriptions_position);") %> <% end %> <% end %>