- if User.session
  - if policy(Comment.new(commentable:)).locked?
    .alert.alert-warning{ role: 'alert' }
      Commenting on this is locked.
      - if CommentLockPolicy.new(User.session, commentable).create?
        = comment_lock_alert(commentable)
      - if commentable.respond_to?(:bugowner_emails) && (url = commentable.report_bug_or_bugzilla_url).present?
        If you need to report a bug, make use of the
        = link_to('bug tracker', url)
  - if policy(Comment.new(commentable:)).create?
    = render(partial: 'webui/comment/comment_field',
      locals: { form_method: :post, comment: Comment.new, commentable: commentable,
                element_suffix: "new_comment_on_#{commentable.class.name.underscore}_#{commentable.id}",
                has_cancel: false })
