%-# 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. -%>
<% @class_timing.each do |ct| %> | <%= ct.start_time.strftime("%I:%M%p") unless ct.start_time.nil? %> - <%= ct.end_time.strftime("%I:%M%p") unless ct.end_time.nil? %> |
<% end %>
<% @weekday.each do |wk| %>
|
<%= t(Date::DAYNAMES[wk.day_of_week].downcase).upcase %> |
<% @class_timing.each do |ct| %> <% @tte = @timetable[wk.id][ct.id] %> |
" class="drop"onClick="update_selected_divs('<%= "#{wk.id}_#{ct.id}" %>');">
<%= drop_receiving_element("drop_#{wk.id}_#{ct.id}",
:accept => "employees_subject",
:onDrop => "function(draggable_element, droppable_element) { $(droppable_element).highlight(); make_ajax_calls('#{wk.id}_#{ct.id}', draggable_element.id.split('_').last()); }") -%>
<% if @tte.is_a? TimetableEntry %>
<% unless @tte.subject.nil? %>
<% unless @tte.subject.elective_group_id.nil? %>
<%= shorten_string(@tte.subject.elective_group.name.to_s,10) %>
<% else %>
<%= @tte.subject.code %>
<% end %>
<% unless @tte.subject.elective_group_id.nil? %>
<% @subj_in_elective = Subject.find_all_by_elective_group_id(@tte.subject.elective_group_id,:conditions=>'is_deleted = false') %>
<% @subj_in_elective.each do |s| %>
<%= s.name unless s.nil? %>
<% @sub_emp = EmployeesSubject.find_by_subject_id(s.id) %>
<%= @sub_emp.employee.full_name unless @sub_emp.nil? %>
<% end %>
<% else %>
<%= @tte.subject.name unless @tte.subject.nil? %>
<%= @tte.employee.full_name unless @tte.employee.nil? %>
<% end %>
<% end %>
<%= link_to_remote image_tag("/images/buttons/delete-new.png", :border => 0),
:url => {:action => "delete_employee2", :id => @tte.id},
:complete => "clear_selected_divs();",
:confirm=>t("remove_entry_confirm"),
:before => "Element.show('loader')",
:success => "Element.hide('loader')",
:update => "timetable" \
unless @tte.subject.nil? -%>
<% unless @tte.subject.nil? %>
<% unless @tte.subject.elective_group_id.nil? %>
<%= t('elective') %>
<% else %>
<%= @tte.employee.first_name unless @tte.employee.nil? %>
<% end %>
<% end %>
<% else %>
<% end %>
|
<% end %>