<%-# 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/HR/show_hr.png") %>
  <h1><%= t('employee_text') %></h1>
  <h3><%= t('leaving_school') %></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">

  <div id="student-details">
    <h4> <%= @employee.first_name %> | <%= t('employee_number') %>  : <%= @employee.employee_number %> | <%= t('department') %> : <%= @employee.employee_department.name %> </h4>
  </div>

  <div class="extender"> </div>
  <% if @dependency.present? %>
    <% @dependency.each do |mod| %>
      <%= render :partial=> mod.classify.constantize.send("employee_dependency_hook") if mod.classify.constantize.respond_to?("employee_dependency_hook") %>
    <% end %>
  <% else %>
    <div id="remove-student">
      <p><%= t('paragraph') %></p>

      <% form_for :remove do |f| %>
        <div class="label-field-pair">
          <label for="remove_descr"><%= t('reason_for_leaving') %></label>
          <div class="text-input-bg"><%= f.text_field :status_description %></div>
        </div>

        <div id="submit-button">
          <%= submit_tag "► #{t('delete_text')}",:class=>'submit_button' %>
        </div>

      <% end %>
    </div>
  <% end %>

</div>