<commit_before><h1 class="row-fluid"><span class="icon template-preview"></span>DMP Preview</h1>
<br/>
<div class="row-fluid">
	<%= link_to "Export as PDF", plan_path(@plan, :format=>"pdf"), :class => "btn pull-left" %>
	<%= link_to "Export as RTF", plan_path(@plan, :format=>"rtf"), :class => "btn pull-left" %>
        <%= link_to(content_tag(:span, "", :class => "icon print") + "Print",
                    plan_path(@plan, :format=>"html"),
                    :class => "btn pull-left")  %>
</div>
<br/>

<div class="border-box">
  <%= render :partial => 'html_render', locals: {plan: @plan} %>
</div>

<div class="buttons">
	<p class="pull-left"><strong>This DMP is</strong> <span style="color: blue;">private</span>.</p>
	<%= link_to "Change Settings", "#", remote: true, :class => "btn change_visibility_link" %>
</div>
<div class="row-fluid">
	<%= link_to "<< DMP Details", details_plan_path(@plan), :class => "btn btn-green pull-left" %>
	<% if @customization_review == true %>
    <%= button_to "Submit", plan_plan_states_submitted_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% elsif (@customization_review == nil && @template_review == true) %>
  	<%= button_to "Submit", plan_plan_states_submitted_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
  <% else %>
		<%= button_to "Finish", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
	<% end %>
</div>
<div id = 'visibility_dialog_form'>
	<%= render partial: 'change_visibility', locals: {:plan_id => params[:id]} %>
</div>
<script type="text/javascript">
	tab_jump();
	add_tab_to_pagination();
</script>

<commit_msg>Grey out Finish and Submit button on Plan Preview page if plan is in committed/submitted state<commit_after><h1 class="row-fluid"><span class="icon template-preview"></span>DMP Preview</h1>
<br/>
<div class="row-fluid">
	<%= link_to "Export as PDF", plan_path(@plan, :format=>"pdf"), :class => "btn pull-left" %>
	<%= link_to "Export as RTF", plan_path(@plan, :format=>"rtf"), :class => "btn pull-left" %>
        <%= link_to(content_tag(:span, "", :class => "icon print") + "Print",
                    plan_path(@plan, :format=>"html"),
                    :class => "btn pull-left")  %>
</div>
<br/>

<div class="border-box">
  <%= render :partial => 'html_render', locals: {plan: @plan} %>
</div>

<div class="buttons">
	<p class="pull-left"><strong>This DMP is</strong> <span style="color: blue;">private</span>.</p>
	<%= link_to "Change Settings", "#", remote: true, :class => "btn change_visibility_link" %>
</div>
<div class="row-fluid">
	<%= link_to "<< DMP Details", details_plan_path(@plan), :class => "btn btn-green pull-left" %>
	<% if @customization_review == true %>
	  <% if state(@plan) == :submitted %>
    	<%= button_to "Submit", plan_plan_states_submitted_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
    <% else %>
    	<%= button_to "Submit", plan_plan_states_submitted_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
    <% end %>
  <% elsif (@customization_review == nil && @template_review == true) %>
	  <% if state(@plan) == :submitted %>
    	<%= button_to "Submit", plan_plan_states_submitted_path(@plan), disabled: true, :class => "btn btn-green pull-right" %>
    <% else %>
    	<%= button_to "Submit", plan_plan_states_submitted_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
    <% end %>
  <% else %>
  	<% if state(@plan) == :committed %>
			<%= button_to "Finish", plan_plan_states_committed_path(@plan), disabled: true,  :class => "btn btn-green pull-right" %>
			<% else %>
				<%= button_to "Finish", plan_plan_states_committed_path(@plan), method: :post, :class => "btn btn-green pull-right" %>
			<% end %>
	<% end %>
</div>
<div id = 'visibility_dialog_form'>
	<%= render partial: 'change_visibility', locals: {:plan_id => params[:id]} %>
</div>
<script type="text/javascript">
	tab_jump();
	add_tab_to_pagination();
</script>


{'fraction_non_alphanumeric': 0.211864406779661, 'fraction_numerical': 0.0009970089730807576, 'mean_word_length': 4.612587412587413, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 0, '>': 122, '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': '1056844', 'n_tokens_mistral': 1484, 'n_tokens_neox': 1369, 'n_words': 313}