% unless defined? @count %>
<% @count = ProjectSubscriber.where(:project_id => @project).count %>
<% end %>
<%= l(:label_subscription) %>
<% if User.current.allowed_to?(:view_number_of_subscribers, @project) && @count > 0 %>
(<%= @count %>)
<% end %>
<% if defined?(observe_field) %>
<% on_form_submit = "var user_mail = $('user_mail'); if (user_mail.value == 'user@host') { user_mail.value = ''; }" %>
<% on_field_focus = "var user_mail = $('user_mail'); user_mail.className = ''; if (user_mail.value == 'user@host') { user_mail.value = ''; }" %>
<% else %>
<% on_form_submit = "var user_mail = $('#user_mail'); if (user_mail.val() == 'user@host') { user_mail.val(''); }" %>
<% on_field_focus = "var user_mail = $('#user_mail'); user_mail.removeClass('empty'); if (user_mail.val() == 'user@host') { user_mail.val(''); }" %>
<% end %>
<% form = form_tag({ :controller => 'account', :action=> 'register' }, :onsubmit => on_form_submit) do %>
<%= l(:text_register_or_login_to_subscribe) %>
<%= text_field_tag('user[mail]', 'user@host', :size => 30, :class => 'empty', :onfocus => on_field_focus) %>
<%= submit_tag(l(:label_register), :class => 'small') %>
<%= link_to(l(:label_login), url_for(:controller => 'account', :action => 'login')) %>
<% end %>
<%= form if Rails::VERSION::MAJOR >= 3 %>