<%-# Fedena
#Copyright 2010 Foradian Technologies Private Limited
#
#This product includes software developed at
#Project Fedena - http://www.projectfedena.org/
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
#  http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or agreed to in writing,
#software distributed under the License is distributed on an
#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
#KIND, either express or implied.  See the License for the
#specific language governing permissions and limitations
#under the License. -%>

<h4 style="text-align: center;"><%= t('previous_batch') %> : <%= @previous_batch.name %></h4>
<% unless @previous_batch_normal_subject.empty? %>
  <ul id="category-list">
    <div class="linker2">
<%= link_to_remote "#{t('select_all')}", :url => { :controller=>'batch_transfers',:action => 'assign_all_previous_batch_subjects', :id => @batch} %>
</div>
    <h4 style="width:300px;"><%= t('normal_subjects') %></h4>
  <% @previous_batch_normal_subject.each do |sub| %>
    <li id="prev-subject-name-<%=sub.id%>" class="list<%=cycle('odd', 'even')%>">
     <div class="category-name"> <%= sub.name %> </div>
    <div class="category-sel"><%= link_to_remote "#{t('select')}", :url=>{:controller=>"batch_transfers", :action=>"assign_previous_batch_subject",:id=>sub.id,:id2=>@batch.id} %></div>
    </li>
  <% end %>
  </ul>
<% end %>


<% unless @elective_groups.empty? %>
  <% @elective_groups.each do |eg| %>

    <% unless @previous_batch_electives.empty? %>
    <ul id="category-list">
          <h4><%= eg.name %>:</h4>
      <% @previous_batch_electives.each do |elect| %>
        <% if elect.elective_group_id == eg.id %>
          <li id="prev-subject-name-<%=elect.id%>" class="list<%=cycle('odd', 'even')%>">
           <div class="category-name"> <%= elect.name %> </div>
           <div class="category-sel"> <%= link_to_remote "#{t('select')}", :url=>{:controller=>"batch_transfers", :action=>"assign_previous_batch_subject",:id=>elect.id,:id2=>@batch.id} %></div>
          </li>
        <% end %>
      <% end %>
    </ul>
    <% end %>
  <% end %>
<% end %>
        <hr style="color:#b40000">