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

<% unless @grades.empty?  %>
  <table align="center" width="100%" cellpadding="1" cellspacing="1">
    <tr class="tr-head">
      <td>Grade</td>
      <td>Grade points</td>
      <td></td>
    </tr>
    <tr>
      <td></td>
      <td></td>
    </tr>
    <% @grades.each do |g| %>
      <tr class="tr-<%= cycle('odd', 'even') %>">
        <td class="col-1">
          <%= g.name %>
        </td>
        <td class="col-2">
          <%= g.grade_point %>
        </td>
        <td class="col-3">
          <div class="category-edit"><%= link_to_remote "#{t("edit_text")}", :url => { :action => 'edit_grade', :id => g.id } %> | <%= link_to_remote "#{t("delete_text")}", :url => { :action => 'destroy_grade', :id => g.id},:confirm=>"Delete Grade #{g.name}?"  %></div>
        </td>
      </tr>
    <% end %>
  </table>
<% else %>
  <div id="flash-box">
    <p class="flash-msg">No grades  present</p>
  </div>
<% end %>
