#open-comment.comment.view %h3.tmargin0= t("layout.comments.new_header") - if commentable.class == Issue - new_path = project_issue_comments_path(project, commentable) - is_subscribed = commentable.subscribes.exists?(:user_id => current_user.id) - subscribe_path = is_subscribed ? project_issue_subscribe_path(project, commentable, current_user.id) : project_issue_subscribes_path(project, commentable) - else commentable.class == Grit::Commit - new_path = project_commit_comments_path(project, commentable) - is_subscribed = Subscribe.subscribed_to_commit?(project, current_user, commentable) - subscribe_path = is_subscribed ? unsubscribe_commit_path(project, commentable) : subscribe_commit_path(project, commentable) = form_for :comment, :url => new_path, :method => :post, :html => { :class => :form } do |f| = render :partial => "comments/form", :locals => {:f => f} .comment-left = t("layout.comments.notifications_are") %span.bold - if is_subscribed = t("layout.turned_on")\ - else = t("layout.turned_off")\ \. - if is_subscribed = link_to t('layout.commits.unsubscribe_btn'), subscribe_path, :method => :delete - else = link_to t('layout.commits.subscribe_btn'), subscribe_path, :method => :post .both