<commit_before><% if @customization_review == "formal" %>
  <% if state(@plan) == :submitted || state(@plan) == :approved || state(@plan) == :rejected %>
  	<%= link_to "Submit for Review", plan_plan_states_submitted_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% elsif state(@plan) == :new || state(@plan) == :revised %>
  	<%= link_to "Submit for Review", plan_plan_states_submitted_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% elsif state(@plan) == :committed%>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% else %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% end %>

<% elsif @customization_review == "informal" %>
  <% if state(@plan) == :submitted || state(@plan) == :reviewed %>
    <%= link_to "Submit for Review", plan_plan_states_submitted_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% elsif state(@plan) == :new || state(@plan) == :revised %>
    <%= link_to "Submit for Review", plan_plan_states_submitted_path(@plan), method: :post, :class => "btn btn-green pull-right" %><%= content_tag(:span, '', :title => '<p>Submit your Plan for Informal Review Process.</p>', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip pull-right') %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %><%= content_tag(:span, '', :title => '<p>Complete your Plan.</p>', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip pull-right') %>
  <% elsif state(@plan) == :committed %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% else %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% end %>

<% elsif @customization_review == "no" %>
  <% if state(@plan) == :committed %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% else %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% end %>

<% elsif (@customization_review == nil && @template_review == "formal") %>
  <% if state(@plan) == :submitted || state(@plan) == :approved || state(@plan) == :rejected %>
    <%= link_to "Submit for Review", plan_plan_states_submitted_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% elsif state(@plan) == :new || state(@plan) == :revised %>
    <%= link_to "Submit for Review", plan_plan_states_submitted_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% elsif state(@plan) == :committed%>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% else %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% end %>

<% elsif (@customization_review == nil && @template_review == "informal") %>
  <% if state(@plan) == :submitted || state(@plan) == :reviewed %>
    <%= link_to "Submit for Review", plan_plan_states_submitted_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% elsif state(@plan) == :new || state(@plan) == :revised %>
    <%= link_to "Submit for Review", plan_plan_states_submitted_path(@plan), method: :post, :class => "btn btn-green pull-right" %><%= content_tag(:span, '', :title => '<p>Submit your Plan for Informal Review Process.</p>', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip pull-right') %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %><%= content_tag(:span, '', :title => '<p>Complete your Plan.</p>', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip pull-right') %>
  <% elsif state(@plan) == :committed %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% else %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% end %>

<% elsif (@customization_review == nil && @template_review == "no") %>
  <% if state(@plan) == :committed %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% else %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% end %>

<% elsif (@customization_review == nil && @template_review == nil) %>
  <h3 class="red pull-right"><strong>Review Process not defined for the associated DMP Template</strong></h3>

<% end %><commit_msg>Refactor code to Display done buttons after Reviewed/Approved state.<commit_after><% if @customization_review == "formal" %>
  <% if state(@plan) == :submitted || state(@plan) == :rejected %>
  	<%= link_to "Submit for Review", plan_plan_states_submitted_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% elsif state(@plan) == :new || state(@plan) == :revised %>
  	<%= link_to "Submit for Review", plan_plan_states_submitted_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% elsif state(@plan) == :committed%>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% elsif state(@plan) == :approved %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% end %>

<% elsif @customization_review == "informal" %>
  <% if state(@plan) == :submitted %>
    <%= link_to "Submit for Review", plan_plan_states_submitted_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% elsif state(@plan) == :new || state(@plan) == :revised %>
    <%= link_to "Submit for Review", plan_plan_states_submitted_path(@plan), method: :post, :class => "btn btn-green pull-right" %><%= content_tag(:span, '', :title => '<p>Submit your Plan for Informal Review Process.</p>', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip pull-right') %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %><%= content_tag(:span, '', :title => '<p>Complete your Plan.</p>', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip pull-right') %>
  <% elsif state(@plan) == :committed %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% elsif state(@plan) == :reviewed %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% end %>

<% elsif @customization_review == "no" %>
  <% if state(@plan) == :committed %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% else %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% end %>

<% elsif (@customization_review == nil && @template_review == "formal") %>
  <% if state(@plan) == :submitted || state(@plan) == :rejected %>
    <%= link_to "Submit for Review", plan_plan_states_submitted_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% elsif state(@plan) == :new || state(@plan) == :revised %>
    <%= link_to "Submit for Review", plan_plan_states_submitted_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% elsif state(@plan) == :committed%>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% elsif state(@plan) == :approved %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% end %>

<% elsif (@customization_review == nil && @template_review == "informal") %>
  <% if state(@plan) == :submitted %>
    <%= link_to "Submit for Review", plan_plan_states_submitted_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% elsif state(@plan) == :new || state(@plan) == :revised %>
    <%= link_to "Submit for Review", plan_plan_states_submitted_path(@plan), method: :post, :class => "btn btn-green pull-right" %><%= content_tag(:span, '', :title => '<p>Submit your Plan for Informal Review Process.</p>', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip pull-right') %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %><%= content_tag(:span, '', :title => '<p>Complete your Plan.</p>', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip pull-right') %>
  <% elsif state(@plan) == :committed %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% elsif state(@plan) == :reviewed %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% end %>

<% elsif (@customization_review == nil && @template_review == "no") %>
  <% if state(@plan) == :committed %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
  <% else %>
    <%= link_to "Done", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% end %>

<% elsif (@customization_review == nil && @template_review == nil) %>
  <h3 class="red pull-right"><strong>Review Process is not defined for the associated DMP Template</strong></h3>

<% end %>
{'fraction_non_alphanumeric': 0.20752143413873733, 'fraction_numerical': 0.0003897116134060795, 'mean_word_length': 5.176293622141998, 'pattern_counts': {'":': 0, '<': 147, '<?xml version=': 0, '>': 231, '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': '7140992', 'n_tokens_mistral': 3604, 'n_tokens_neox': 3398, 'n_words': 813}