<%-# 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 @fa_groups.empty? %>
  <div class="box">
    <table align="center" width="100%" cellpadding="1" cellspacing="1">
      <tr class="tr-head">
        <td><%= t("fa_group") %></td>
        <td><%= t("exam_category") %></td>
        <td></td>
      </tr>
      <tr>
        <td></td>
        <td></td>
        <td></td>
      </tr>
      <% @fa_groups.each do |g| %>
        <tr class="tr-<%= cycle('odd', 'even') %>">
          <td class="col-1">
            <%= link_to g.name, fa_group_path(g) %>
          </td>
          <td class="col-1">
            <%= link_to g.try(:cce_exam_category).try(:name), fa_group_path(g) %>
          </td>
          <td class="col-3">
            <div class="category-edit"><%= link_to_remote t("edit_text"),:url=>{:controller=>'fa_groups',:action=>'edit',:id=>g.id},:method=>:get %> | <%= link_to t("delete_text"),g,:method=>:delete,:confirm=>"Delete FA Group #{g.name}?" %></div>
          </td>
        </tr>
      <% end %>
    </table>
  </div>
<% else %>
  <div id="flash-box">
    <p class="flash-msg">No Scholastic Items present</p>
  </div>
<% end %>