<%- model_class = Plan -%>
<% javascript "plans.js" %>
<!--
editing plan details is handled through plan#show
so if we come this way then we are editing a phase
-->
<!-- render the project title -->
<%= render :partial => "plan_title", locals: {plan: @plan} %>
<div class="dmp_details">
<div class="tabbed-area">
<ul class="tabs" role="tablist">
<li id="details-tab" class="active" role="tab" aria-controls="details-panel">
<a href="#details-panel" aria-selected="true"><%= _('Project Details') %></a>
</li>
<% i = 0 %>
<% @plan.template.phases.each do |phase| %>
<li id="phase-<%= i %>-tab" role="tab" aria-controls="phase-<%= i %>-panel">
<a href="#phase-<%= i %>-panel" aria-selected="false"><%= phase.title %></a>
</li>
<% end %>
<li id="share-tab" role="tab" aria-controls="share-panel">
<a href="#share-panel" aria-selected="true"><%= _('Share') %></a>
</li>
<li id="download-tab" role="tab" aria-controls="download-panel">
<a href="#download-panel" aria-selected="true"><%= _('Download') %></a>
</li>
</ul>
<div class="tab-panels" role="tabpanel">
<div id="details-panel" class="tab-panel active" aria-hidden="false"
aria-labelledby="details-tab">
<%= render :partial => 'details', locals: {plan: @plan} %>
</div>
<% i = 0 %>
<% @plan.template.phases.each do |phase| %>
<div id="phase-<%= i %>-panel" class="tab-panel" aria-hidden="false"
aria-labelledby="phase-<%= i %>-tab">
<%= render :partial => 'phase', locals: {plan: @plan, phase: phase} %>
</div>
<% end %>
<div id="share-panel" class="tab-panel" aria-hidden="false"
aria-labelledby="share-tab">
<%= render :partial => 'share', locals: {plan: @plan} %>
</div>
<div id="download-panel" class="tab-panel" aria-hidden="false"
aria-labelledby="download-tab">
<%= render :partial => 'download', locals: {plan: @plan} %>
</div>
</div>
</div>
</div>
<!-- this session is created when a comment is created, edited or deleted. After the view is loaded this session variable can be deleted-->
<% session.delete(:question_id_comments)%>