<%-# 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. -%>

<div id="content-header">
  <%= image_tag("/images/show_settings.png") %>
  <h1><%= t('batch_transfer') %></h1>
  <h3><%= t('graduation') %></h3>
  <div id="app-back-button">
    <%= link_to_function image_tag("/images/buttons/back.png",:border => 0), "history.back()" %>
  </div>
</div>


<div id="page-yield">
  <% unless flash[:notice].nil? %>
    <p class="flash-msg"> <%= flash[:notice] %> </p>
  <% end %>
  <% unless @id_lists.blank?  %>
    <%= link_to "#{t('generate_tc_for_all')}",
      {:controller => "student", :action => "generate_all_tc_pdf", :stud => @id_lists},:target => '_blank',:class=>'user_button' %>
    <br />
    <br />
  <% end %>
  <h4><%= t('garduating_batch') %>: <%= @batch.full_name %></h4>
  <% form_for :graduate do |f| %>
    <%= t('graduation_message') %>
    <div class="label-field-pair">
      <label for="subject_id"><%= t('status_description') %> : </label>
      <div class="text-input-bg"><%= f.text_field 'status_description' %></div>
    </div>


    <p><%= t('uncheck_message') %>.</p>
    <ul id="category-list">
      <li class="listheading">
        <div class="heading-no"><%= t('adm_no') %></div>
        <div class="category-name"><%= t('name') %></div>
        <div class="sel-list">
          <%= link_to_function t('all'), "$$('input.right').each(function(checkbox) { checkbox.checked = true; });" %>,
          <%= link_to_function t('none'), "$$('input.right').each(function(checkbox) { checkbox.checked = false; });" %>
        </div>
      </li>
      <% @batch.students.each do |student| %>
        <li class="list<%=cycle('odd', 'even')%>">
          <div class="category-delete"><%= student.admission_no %></div>
          <div class="category-name"><%= student.full_name %></div>
          <div class="category-edit"><%= check_box_tag 'graduate[students][]', student.id, true,:class=>"right" %></div>
        </li>
      <% end %>
    </ul>

    <%= submit_tag "", :value => "► #{t('save')}", :class => "submit_button" %>

  <% end %>

  <div class="extender"></div>
</div>
