<commit_before><h2>Projects</h2>
<% if current_user.has_role?('Admin') %>
  <%= link_to('New',    {:action=>'new'},{:class=>"btnlnk"}) %>
  <%= link_to('Import', {:action=>'import'},{:class=>"btnlnk"}) %>
  <%= link_to('Check',  {:action=>'check'},{:class=>"btnlnk"}) %>
<% end %>
<%= link_to('Report',       {:action=>'report'},{:class=>"btnlnk"}) %>
<%= link_to('Summary',      {:action=>'summary'},{:class=>"btnlnk"}) %>
<%= link_to('WS Reporting', {:action=>'ws_reporting'},{:class=>"btnlnk"}) %>
<%= link_to('Request changes', {:action=>'week_changes'}, {:class=>'btnlnk'}) %>

<div class="stats">
  Last RMT update: <%= time_ago_in_words(@last_update) %> ago (<%= @last_update %>)<br/>
  <b>Filter</b>: <%= @projects.size %> projects, <%= @wps.size %> WPs with open requests and a status.<br/>
  <b>Total</b>: <%= @total_wps %> WPs, <%= @total_status %> statuses.
</div>

<%= link_to_function('filters', "Effect.toggle('filters','blind');",{:class=>"btnlnk"}) %>
<% if(are_filtered) %><strong>filtered</strong><% end %>
<div id="filters" style="display:none;border:1px solid #DDD;margin-top:25px;background: #EEE;">
<% form_tag(:action=>'filter') do %>
<table>
  <tr valign="top"><td>
  <b>Status</b><br/>
  <%= check_box_tag('st[]', 0) %> unknown<br/>
  <%= check_box_tag('st[]', 1) %> green<br/>
  <%= check_box_tag('st[]', 2) %> amber<br/>
  <%= check_box_tag('st[]', 3) %> red<br/>
  </td><td>
  <b>Workstreams</b><br/>
  <% for workstream in @workstreams %>
    <%= check_box_tag('ws[]',workstream) %> <%= workstream %><br/>
  <% end %>
  </td><td>
  <b>Supervisors</b><br/>
  <% for s in @supervisors %>
    <%= check_box_tag('sup[]',s.id) %> <%= s.name %><br/>
  <% end %>
  </td><td>
  <b>QR</b><br/>
  <% for s in @qr %>
    <%= check_box_tag('qr[]',s.id) %> <%= s.name %><br/>
  <% end %>
  </td></tr>
  <tr>
  <td colspan=4>
  Text: <%= text_field_tag('text') %> precedence on other filters<br/>
  Searches project title and description, statuses, request summary and PM names
  </td>
  </tr>
</table>
<%= submit_tag('Filter') %>
<% end %>
<br/>
</div>
<br/>
<br/>

<%
  cookies["tab_menu_project_index"] = "1" if !cookies["tab_menu_project_index"]
%>

<div id="tabs">
  <ol>
      <%= tab_menu("project_index", [
        "Projects <strong>#{@wps.size}</strong>",
        "CI <strong>#{@ci.size}</strong>",
        "Actions <strong>#{@actions.size}</strong>",
        "Amendments <strong>#{@amendments.size}</strong>",
        "Risks <strong>#{@risks.size}</strong>",
        "Inconsistencies <strong>#{@inconsistencies.size}</strong>",
        "Checklists <strong>#{@checklist_milestones.size}</strong>"
        ]) %>  
  </ol>

  <div id="tabscontent">
    <div id="tabContent1" class="tabContent" style="display:<%= cookies["tab_menu_project_index"]=="1"? "block" : "none"%>;">
        <br />
        <div>
        <%= render(:file=>'projects/index_projects') %>
        </div>
    </div>

    <div id="tabContent2" class="tabContent" style="display:<%= cookies["tab_menu_project_index"]=="2"? "block" : "none"%>;">
        <br />
        <div>
          <%= render(:file=>'ci_projects/ci_header') %>
          <%= render(:partial=>'ci_projects/ci_project', :collection=>@ci, :as=>:p) %>
          </table>
        </div>
    </div>

    <div id="tabContent3" class="tabContent" style="display:<%= cookies["tab_menu_project_index"]=="3"? "block" : "none"%>;">
        <br />
        <div>
          <%= render(:file=>'actions/actions_header') %>
          <%= render(:partial=>'actions/action', :collection=>@actions) %>
          </table>
        </div>
    </div>

    <div id="tabContent4" class="tabContent" style="display:<%= cookies["tab_menu_project_index"]=="4"? "block" : "none"%>;">
        <br />
        <div>
          <%= render(:file=>'amendments/amendments_header') %>
          <%= render(:partial=>'amendments/amendment', :collection=>@amendments) %>
          </table>
        </div>
    </div>

    <div id="tabContent5" class="tabContent" style="display:<%= cookies["tab_menu_project_index"]=="5"? "block" : "none"%>;">
        <br />
        <div>
          <%= render(:file=>'risks/risks_header') %>
          <%= render(:partial=>'risks/risk', :collection=>@risks) %>
          </table>
        </div>
    </div>

    <div id="tabContent6" class="tabContent" style="display:<%= cookies["tab_menu_project_index"]=="6"? "block" : "none"%>;">
        <br />
        <div>
          <table>
          <tr style="font-weight:bold;"><td>Suggested</td><td>Current</td><td>Project</td></tr>
          <%= render(:partial=>'risks/inconsistency', :collection=>@inconsistencies, :as=>:p) %>
          </ul>
          </table>
        </div>
    </div>

    <div id="tabContent7" class="tabContent" style="display:<%= cookies["tab_menu_project_index"]=="7"? "block" : "none"%>;">
        <br />
        <div>
          <% if @checklist_milestones.size == 0 %>
            All is OK !
          <% else %>
            These milestones are done, but the checklist is not filled:<br/><br/>
          <% end %>
          <ul>
            <%= render(:partial=>"checklists/milestone", :collection=>@checklist_milestones, :as=> :m) %>
          </ul>
        </div>
    </div>
  </div><!--End of tabscontent-->
</div><!--End of tabs-->

render time: <%= Time.now - @time %>
<commit_msg>Mantis 0000260<commit_after><h2>Projects</h2>
<% if current_user.has_role?('Admin') %>
  <%= link_to('New',    {:action=>'new'},{:class=>"btnlnk"}) %>
  <%= link_to('Import', {:action=>'import'},{:class=>"btnlnk"}) %>
  <%= link_to('Check',  {:action=>'check'},{:class=>"btnlnk"}) %>
<% end %>
<%= link_to('Report',       {:action=>'report'},{:class=>"btnlnk"}) %>
<%= link_to('Summary',      {:action=>'summary'},{:class=>"btnlnk"}) %>
<%= link_to('WS Reporting', {:action=>'ws_reporting'},{:class=>"btnlnk"}) %>
<%= link_to('Request changes', {:action=>'week_changes'}, {:class=>'btnlnk'}) %>

<div class="stats">
  Last RMT update: <%= time_ago_in_words(@last_update) %> ago (<%= @last_update %>)<br/>
  <b>Filter</b>: <%= @projects.size %> projects, <%= @wps.size %> WPs with open requests and a status.<br/>
  <b>Total</b>: <%= @total_wps %> WPs, <%= @total_status %> statuses.
</div>

<%= link_to_function('filters', "Effect.toggle('filters','blind');",{:class=>"btnlnk"}) %>
<% if(are_filtered) %><strong>filtered</strong><% end %>
<div id="filters" style="display:none;border:1px solid #DDD;margin-top:25px;background: #EEE;">
<% form_tag(:action=>'filter') do %>
<table>
  <tr valign="top"><td>
  <b>Status</b><br/>
  <%= check_box_tag('st[]', 0) %> unknown<br/>
  <%= check_box_tag('st[]', 1) %> green<br/>
  <%= check_box_tag('st[]', 2) %> amber<br/>
  <%= check_box_tag('st[]', 3) %> red<br/>
  </td><td>
  <b>Workstreams</b><br/>
  <% for workstream in @workstreams %>
    <%= check_box_tag('ws[]',workstream) %> <%= workstream %><br/>
  <% end %>
  </td><td>
  <b>Supervisors</b><br/>
  <% for s in @supervisors %>
    <%= check_box_tag('sup[]',s.id) %> <%= s.name %><br/>
  <% end %>
  </td><td>
  <b>QR</b><br/>
  <% for s in @qr %>
    <%= check_box_tag('qr[]',s.id) %> <%= s.name %><br/>
  <% end %>
  </td></tr>
  <tr>
  <td colspan=4>
  Text: <%= text_field_tag('text') %> precedence on other filters<br/>
  Searches project title and description, statuses, request summary and PM names
  </td>
  </tr>
</table>
<%= submit_tag('Filter') %>
<% end %>
<br/>
</div>
<br/>
<br/>

<%
  cookies["tab_menu_project_index"] = "1" if !cookies["tab_menu_project_index"]
%>

<div id="tabs">
  <ol>
	  <%
	  	wps_size_str = ""
		ci_size_str = ""
		actions_size_str = ""
		amendments_size_str = ""
		risks_size_str = ""
		inconsistencies_size_str = ""
		checklists_size_str = ""
		if(@wps.size > 0)
			wps_size_str = "[<strong>#{@wps.size}</strong>]"
		else
			wps_size_str = "[#{@wps.size}]"
		end
		if(@ci.size > 0)
			ci_size_str = "[<strong>#{@ci.size}</strong>]"
		else
			ci_size_str = "[#{@ci.size}]"
		end
		if(@actions.size > 0)
			actions_size_str = "[<strong>#{@actions.size}</strong>]"
		else
			actions_size_str = "[#{@actions.size}]"
		end
		if(@amendments.size > 0)
			amendments_size_str = "[<strong>#{@amendments.size}</strong>]"
		else
			amendments_size_str = "[#{@amendments.size}]"
		end
		if(@risks.size > 0)
			risks_size_str = "[<strong>#{@risks.size}</strong>]"
		else
			risks_size_str = "[#{@risks.size}]"
		end
		if(@inconsistencies.size > 0)
			inconsistencies_size_str = "[<strong>#{@inconsistencies.size}</strong>]"
		else
			inconsistencies_size_str = "[#{@inconsistencies.size}]"
		end
		if(@checklist_milestones.size > 0)
			checklists_size_str = "[<strong>#{@checklist_milestones.size}</strong>]"
		else
			checklists_size_str = "[#{@checklist_milestones.size}]"
		end
	
	  %>
      <%= tab_menu("project_index", [
        "Projects #{wps_size_str}",
        "CI #{ci_size_str}",
        "Actions #{amendments_size_str}",
        "Amendments #{actions_size_str}",
        "Risks #{risks_size_str}",
        "Inconsistencies #{inconsistencies_size_str}",
        "Checklists #{checklists_size_str}"
        ]) %>  
  </ol>

  <div id="tabscontent">
    <div id="tabContent1" class="tabContent" style="display:<%= cookies["tab_menu_project_index"]=="1"? "block" : "none"%>;">
        <br />
        <div>
        <%= render(:file=>'projects/index_projects') %>
        </div>
    </div>

    <div id="tabContent2" class="tabContent" style="display:<%= cookies["tab_menu_project_index"]=="2"? "block" : "none"%>;">
        <br />
        <div>
          <%= render(:file=>'ci_projects/ci_header') %>
          <%= render(:partial=>'ci_projects/ci_project', :collection=>@ci, :as=>:p) %>
          </table>
        </div>
    </div>

    <div id="tabContent3" class="tabContent" style="display:<%= cookies["tab_menu_project_index"]=="3"? "block" : "none"%>;">
        <br />
        <div>
          <%= render(:file=>'actions/actions_header') %>
          <%= render(:partial=>'actions/action', :collection=>@actions) %>
          </table>
        </div>
    </div>

    <div id="tabContent4" class="tabContent" style="display:<%= cookies["tab_menu_project_index"]=="4"? "block" : "none"%>;">
        <br />
        <div>
          <%= render(:file=>'amendments/amendments_header') %>
          <%= render(:partial=>'amendments/amendment', :collection=>@amendments) %>
          </table>
        </div>
    </div>

    <div id="tabContent5" class="tabContent" style="display:<%= cookies["tab_menu_project_index"]=="5"? "block" : "none"%>;">
        <br />
        <div>
          <%= render(:file=>'risks/risks_header') %>
          <%= render(:partial=>'risks/risk', :collection=>@risks) %>
          </table>
        </div>
    </div>

    <div id="tabContent6" class="tabContent" style="display:<%= cookies["tab_menu_project_index"]=="6"? "block" : "none"%>;">
        <br />
        <div>
          <table>
          <tr style="font-weight:bold;"><td>Suggested</td><td>Current</td><td>Project</td></tr>
          <%= render(:partial=>'risks/inconsistency', :collection=>@inconsistencies, :as=>:p) %>
          </ul>
          </table>
        </div>
    </div>

    <div id="tabContent7" class="tabContent" style="display:<%= cookies["tab_menu_project_index"]=="7"? "block" : "none"%>;">
        <br />
        <div>
          <% if @checklist_milestones.size == 0 %>
            All is OK !
          <% else %>
            These milestones are done, but the checklist is not filled:<br/><br/>
          <% end %>
          <ul>
            <%= render(:partial=>"checklists/milestone", :collection=>@checklist_milestones, :as=> :m) %>
          </ul>
        </div>
    </div>
  </div><!--End of tabscontent-->
</div><!--End of tabs-->

render time: <%= Time.now - @time %>

{'fraction_non_alphanumeric': 0.24405218726016883, 'fraction_numerical': 0.005628037861345613, 'mean_word_length': 3.4256603773584904, 'pattern_counts': {'":': 0, '<': 386, '<?xml version=': 0, '>': 465, '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': '1435277', 'n_tokens_mistral': 4672, 'n_tokens_neox': 4269, 'n_words': 660}