<% if User.current.allowed_to?(:subscribe_to_project, @project) && @project.subscribables.any? %> <% if (controller_name == 'projects' && action_name == 'show') || controller_name == 'news' || controller_name == 'versions' || controller_name == 'files' || controller_name == 'wiki' || (controller_name == 'issues' && action_name == 'index') || (controller_name == 'boards' && action_name == 'index') %> <% if User.current.logged? %> <%= render(:partial => 'subscribe/form', :locals => { :resource => controller_name }) %> <% else %> <%= render(:partial => 'subscribe/register') %> <% end %> <% end %> <% end %>