<commit_before>- if @subject.editable_by?(current_user)
  .row
    .col-sm-4.col-buffer
      - if @project.events.where(archived: false).count > 0
        = link_to choose_event_project_subject_path(@project, @subject), class: "btn btn-lg btn-accent btn-shadow btn-block" do
          %i.fa.fa-plus
          New Event
      - else
        = link_to data_entry_project_subject_path(@project, @subject), class: "btn btn-lg btn-accent btn-shadow btn-block" do
          %i.fa.fa-plus
          New Sheet

    .col-sm-4.col-buffer
      - if @project.randomizations_enabled? && @project.unblinded?(current_user)
        - scheme_count = @project.randomization_schemes.published.count
        - if @subject.randomizations_count.zero? && scheme_count == 1
          - @project.randomization_schemes.published.where.not(id: @subject.randomizations.select(:randomization_scheme_id)).each do |scheme|
            = link_to randomize_subject_to_list_project_randomization_scheme_path(@project, scheme, subject_code: @subject.subject_code), class: "btn btn-lg btn-accent btn-shadow btn-block" do
              %i.fa.fa-random
              Randomize

    .col-sm-4.col-buffer
      - if @project.adverse_events_enabled? && @project.unblinded?(current_user)
        = link_to new_project_adverse_event_path(@project, subject_code: @subject.subject_code), class: "btn btn-lg btn-accent btn-shadow btn-block" do
          %i.fa.fa-exclamation-triangle
          Report
          %span.d-inline.d-lg-none AE
          %span.d-none.d-lg-inline Adverse Event
<commit_msg>Minor adjustment to text display in "Report AE" button<commit_after>- if @subject.editable_by?(current_user)
  .row
    .col-md-4.col-buffer
      - if @project.events.where(archived: false).count > 0
        = link_to choose_event_project_subject_path(@project, @subject), class: "btn btn-lg btn-accent btn-shadow btn-block" do
          %i.fa.fa-plus
          New Event
      - else
        = link_to data_entry_project_subject_path(@project, @subject), class: "btn btn-lg btn-accent btn-shadow btn-block" do
          %i.fa.fa-plus
          New Sheet

    .col-md-4.col-buffer
      - if @project.randomizations_enabled? && @project.unblinded?(current_user)
        - scheme_count = @project.randomization_schemes.published.count
        - if @subject.randomizations_count.zero? && scheme_count == 1
          - @project.randomization_schemes.published.where.not(id: @subject.randomizations.select(:randomization_scheme_id)).each do |scheme|
            = link_to randomize_subject_to_list_project_randomization_scheme_path(@project, scheme, subject_code: @subject.subject_code), class: "btn btn-lg btn-accent btn-shadow btn-block" do
              %i.fa.fa-random
              Randomize

    .col-md-4.col-buffer
      - if @project.adverse_events_enabled? && @project.unblinded?(current_user)
        = link_to new_project_adverse_event_path(@project, subject_code: @subject.subject_code), class: "btn btn-lg btn-accent btn-shadow btn-block" do
          %i.fa.fa-exclamation-triangle
          Report
          %span.d-inline.d-xl-none AE
          %span.d-none.d-xl-inline Adverse Event

{'fraction_non_alphanumeric': 0.11481129083412622, 'fraction_numerical': 0.003171582619727244, 'mean_word_length': 2.9180124223602486, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3851434', 'n_tokens_mistral': 1018, 'n_tokens_neox': 999, 'n_words': 180}