<commit_before><% @project ||= @show_projects.first -%>
<h3><%= your_project.title %></h3>

<%= render :remote, :controller => 'reports', :action => :project_stats, :project_id => your_project.id %>

<%
@viewer.set_project(your_project)

title = ""
if @viewer.is_eventgroup_coordinator?(@eg)
    title += ", Projects Coordinator"
end
if @viewer.is_project_director?
    title += ", Project Director"
end
if @viewer.is_project_administrator?
    title += ", Project Administrator"
end
if @viewer.is_support_coach?
    title += ", Support Coach"
end
if @viewer.is_project_staff?
    title += ", Project Staff"
end
if @viewer.is_processor?
    title += ", Processor"
end

%>

<h4><%= "#{@viewer.name}#{title}" %></h4>

<% if @viewer.is_support_coach? || @viewer.is_atleast_project_staff(your_project) %>
    <%= render :partial => "support_coach_list", :locals => { :project => your_project } %>
<% end %>

<% if !@viewer.is_student?(@eg) %>
  <% 
    cache(:controller => 'main', :action => 'your_projects', :section => 'Acceptance',
          :project_id => your_project.id, :role => @viewer.roles_wrt_project(your_project)) do
  %>

    <p>
      <%= link_to 'File paperwork', :action => 'find_prep_items', :project_id => your_project.id, :command =>'received' %>
      <%= link_to 'Assign optional paperwork items', :action => 'find_prep_items', :project_id => your_project.id , :command =>'optional' %>
    </p>

    <p>Accepted pile:
	    <blockquote>
	      <%= render :partial => "accepted_pile", :locals => { :project => your_project } %>
      </blockquote>
      
    </p>
  <% end %>
    <!-- all staff can see the processor list, but only certain people can actually evaluate -->
    <% @can_evaluate = @viewer.is_eventgroup_coordinator?(@eg) || @viewer.is_processor? %>
    <% appln_includes = [ :references, { :viewer => { :persons => :campuses } }, :preference1, :profiles ]
       @processor_list = Applying.find_all_by_project_id your_project.id,
         :include => [
          :project,
          :appln,
          { :locked_by => :persons }
        ]
    %>
    
    <p>Processor's pile:
    <blockquote>
      <%= render :partial => "processor_pile", :locals => { :project => your_project } %>
    </blockquote>
    </p>

  <% 
    cache(:controller => 'main', :action => 'your_projects', :section => 'StaffProfile',
          :project_id => your_project.id, :role => @viewer.roles_wrt_project(your_project)) do
  %>
    <p>Staff:
      <blockquote>
        <%= render :partial => "staff_pile", :locals => { :project => your_project } %>
      </blockquote>
    </p>
  <% end %>

  <% 
    cache(:controller => 'main', :action => 'your_projects', :section => 'Withdrawn',
          :project_id => your_project.id, :role => @viewer.roles_wrt_project(your_project)) do
  %>
    <!-- these piles will now have their own intros which are removed if empty -->
    <% if @viewer.is_eventgroup_coordinator?(@eg) || @viewer.is_processor? %>
      <p>Withdrawn pile:
      <blockquote>
        <%= render :partial => "withdrawn_pile", :locals => {:project => your_project }%>
      </blockquote>
    <% end %>
  <% end %>
<% end %><commit_msg>add view caching for Applying sections<commit_after><% @project ||= @show_projects.first -%>
<h3><%= your_project.title %></h3>

<%= render :remote, :controller => 'reports', :action => :project_stats, :project_id => your_project.id %>

<%
@viewer.set_project(your_project)

title = ""
if @viewer.is_eventgroup_coordinator?(@eg)
    title += ", Projects Coordinator"
end
if @viewer.is_project_director?
    title += ", Project Director"
end
if @viewer.is_project_administrator?
    title += ", Project Administrator"
end
if @viewer.is_support_coach?
    title += ", Support Coach"
end
if @viewer.is_project_staff?
    title += ", Project Staff"
end
if @viewer.is_processor?
    title += ", Processor"
end

%>

<h4><%= "#{@viewer.name}#{title}" %></h4>

<% if @viewer.is_support_coach? || @viewer.is_atleast_project_staff(your_project) %>
    <%= render :partial => "support_coach_list", :locals => { :project => your_project } %>
<% end %>

<% if !@viewer.is_student?(@eg) %>
  <% 
    cache(:controller => 'main', :action => 'your_projects', :section => 'Acceptance',
          :project_id => your_project.id, :role => @viewer.roles_wrt_project(your_project)) do
  %>

    <p>
      <%= link_to 'File paperwork', :action => 'find_prep_items', :project_id => your_project.id, :command =>'received' %>
      <%= link_to 'Assign optional paperwork items', :action => 'find_prep_items', :project_id => your_project.id , :command =>'optional' %>
    </p>

    <p>Accepted pile:
	    <blockquote>
	      <%= render :partial => "accepted_pile", :locals => { :project => your_project } %>
      </blockquote>
      
    </p>
  <% end %>
    <!-- all staff can see the processor list, but only certain people can actually evaluate -->
    <% @can_evaluate = @viewer.is_eventgroup_coordinator?(@eg) || @viewer.is_processor? %>
    <% appln_includes = [ :references, { :viewer => { :persons => :campuses } }, :preference1, :profiles ]
       @processor_list = Applying.find_all_by_project_id your_project.id,
         :include => [
          :project,
          :appln,
          { :locked_by => :persons }
        ]
    %>
    
  <% 
    cache(:controller => 'main', :action => 'your_projects', :section => 'Applying',
          :project_id => your_project.id, :role => @viewer.roles_wrt_project(your_project)) do
  %>
    <p>Processor's pile:
    <blockquote>
      <%= render :partial => "processor_pile", :locals => { :project => your_project } %>
    </blockquote>
    </p>
  <% end %>

  <% 
    cache(:controller => 'main', :action => 'your_projects', :section => 'StaffProfile',
          :project_id => your_project.id, :role => @viewer.roles_wrt_project(your_project)) do
  %>
    <p>Staff:
      <blockquote>
        <%= render :partial => "staff_pile", :locals => { :project => your_project } %>
      </blockquote>
    </p>
  <% end %>

  <% 
    cache(:controller => 'main', :action => 'your_projects', :section => 'Withdrawn',
          :project_id => your_project.id, :role => @viewer.roles_wrt_project(your_project)) do
  %>
    <!-- these piles will now have their own intros which are removed if empty -->
    <% if @viewer.is_eventgroup_coordinator?(@eg) || @viewer.is_processor? %>
      <p>Withdrawn pile:
      <blockquote>
        <%= render :partial => "withdrawn_pile", :locals => {:project => your_project }%>
      </blockquote>
    <% end %>
  <% end %>
<% end %>
{'fraction_non_alphanumeric': 0.17931456548347613, 'fraction_numerical': 0.0015299877600979193, 'mean_word_length': 3.4348710990502034, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 194, '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': '800453', 'n_tokens_mistral': 2332, 'n_tokens_neox': 2176, 'n_words': 449}