<%-# 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/student_details/student_details_logo.jpg") %>
  <h1><%= t('student_details') %></h1>
  <h3><%= t('report_center') %></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="exam-results-dashboard">

    <h3><%= t('academics') %></h3>

    <div class="exam-results-reports-col">
      <% if permitted_to? :exam_report, :student %>
        <h4 class="themed_text"><%= t('recent_exams') %></h4>
        <ul>
          <% @exam_groups.each do |e| %>
            <li><%= link_to e.name, { :action => 'generated_report',:exam_group=>e.id, :student => @student.id} %></li>
          <% end %>
        </ul>
      <%end%>

      <h4 class="themed_text"><%= t('subject_wise_result') %></h4>
      <ul>
        <% @subjects.each do |s| %>
          <li><%= link_to s.name, { :action => 'generated_report3', :student => @student.id, :subject => s.id } %></li>
        <% end %>
      </ul>
    </div>

    <div class="exam-results-reports-col">

      <h4 class="themed_text"><%= t('detailed_report') %></h4>
      <ul>
        <% unless @grouped_exams.empty? %>
          <li><%= link_to "Transcript Report", { :controller=>'exam', :action => 'student_transcript',:transcript=>{:batch_id=>@student.batch_id},:student_id=>@student.former_id,:flag=>"1" } %></li>
        <% else %>
          <li><%= link_to "Transcript Report", { :controller=>'exam', :action => 'student_transcript',:transcript=>{:batch_id=>@student.batch_id},:student_id=>@student.former_id,:flag=>"1" } %></li>
        <% end %>
        <% if Configuration.cce_enabled? %>
          <li><%= link_to "CCE Transcript Report", { :controller => 'cce_reports', :action => 'student_transcript',:id=>@student.id, :type=>"former" }%></li>
        <% end %>

      </ul>



    </div>

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

  </div>

  <div id="attendance-reports-dashboard">

    <h3><%= t('attendance') %></h3>

    <h4 class="themed_text"><%= t('detailed_report') %></h4>
    <ul>
      <% @old_batches.each do |b| %>
        <li><%= link_to b.name, :action => 'student_report', :id => @student.id, :year => b.id %></li>
      <% end %>
    </ul>
  </div>

</div>
