Commit dc9640bc authored by Fabiano Sluzarski's avatar Fabiano Sluzarski
Browse files

Separated advisees statement into two views, one for active and the same

name, and one for the concluded (concluded advisees statement) that
contains the changes on the last commit. Fixed advisees statement pdf
search with the years.
parent 78962761
......@@ -135,7 +135,7 @@ public class Professor extends Person {
document.add(Chunk.NEWLINE);
document.add(new Paragraph(""));
if (status.equals("Concluida")) {
if (status.equals("Concluida") && !l.isEmpty()) {
PdfPCell cell = new PdfPCell(new Paragraph("Nome do(a) Aluno(a)", ReportUtil.getTableTitleTextFont()));
table.addCell(cell);
......
......@@ -151,6 +151,11 @@ public class ProfessorController {
return "professors/statementadvisees";
}
@RequestMapping(value = "statementadviseesconcluded", method = RequestMethod.GET)
public String statementadviseesconcluded() {
return "professors/statementadviseesconcluded";
}
@RequestMapping(value = "statementcommittees", method = RequestMethod.GET)
public String statementcommittees() {
return "professors/statementcommittees";
......@@ -173,10 +178,19 @@ public class ProfessorController {
@RequestMapping(value="statementadviseeslist",method = RequestMethod.GET)
public String statementadviseesList(@RequestParam(value = "professor", required = true) String prof,
@RequestParam(value = "regKind", required = true) String kind,
@RequestParam(value = "regStatus", required = true) String status,
Model model) {
String status = "Ativa";
model.addAttribute("registrations", Registration.findRegistrationsPerAdvisorAndKind(prof, kind, status));
return "registrations/liststudentssimple";
}
@RequestMapping(value="statementadviseesconcludedlist",method = RequestMethod.GET)
public String statementadviseesconcludedList(@RequestParam(value = "professor", required = true) String prof,
@RequestParam(value = "regKind", required = true) String kind,
@RequestParam(value = "startYear", required = false) String startYear,
@RequestParam(value = "endYear", required = false) String endYear,
Model model) {
String status = "Concluida";
if (startYear != null || endYear != null)
model.addAttribute("registrations", Registration.findRegistrationsPerAdvisorAndYear(prof, kind, status, startYear, endYear));
else
......@@ -203,14 +217,31 @@ public class ProfessorController {
@RequestMapping(value="statementadviseespdf",method = RequestMethod.GET)
public void statementadviseesPdf(@RequestParam(value = "professor", required = true) String prof,
@RequestParam(value = "regKind", required = true) String kind,
@RequestParam(value = "regStatus", required = true) String status,
Model model, HttpServletResponse response) {
Professor p = Professor.findProfessor(new Long(prof));
String status = "Ativa";
List<Registration> l = (List<Registration>) Registration.findRegistrationsPerAdvisorAndKind(prof, kind, status);
Professor.statementAdvisees(p,kind,status,l,response);
}
@RequestMapping(value="statementadviseesconcludedpdf",method = RequestMethod.GET)
public void statementadviseesconcludedPdf(@RequestParam(value = "professor", required = true) String prof,
@RequestParam(value = "regKind", required = true) String kind,
@RequestParam(value = "startYear", required = false) String startYear,
@RequestParam(value = "endYear", required = false) String endYear,
Model model, HttpServletResponse response) {
Professor p = Professor.findProfessor(new Long(prof));
String status = "Concluida";
List<Registration> l = null;
if (startYear != null || endYear != null)
l = (List<Registration>) Registration.findRegistrationsPerAdvisorAndYear(prof, kind, status, startYear, endYear);
else
l = (List<Registration>) Registration.findRegistrationsPerAdvisorAndKind(prof, kind, status);
Professor.statementAdvisees(p,kind,status,l,response);
}
@RequestMapping(value="statementcommitteespdf",method = RequestMethod.GET)
public void statementcommitteesPdf(@RequestParam(value = "committee", required = true) String committee,
@RequestParam(value = "professor", required = true) String prof,
......
......@@ -4,6 +4,7 @@ global_menu_list=List all {0}
global_menu_list_status=List per status
global_menu_statement_disciplinas=List per course
global_menu_statement_advisees=Advisees' statement
global_menu_statement_advisees_concluded=Concluded Advisees' statement
global_menu_statement_committees=Committees participation statement
global_menu_statement_student_grant=Student grant statement
global_menu_statement_acceptance=Acceptance statement
......
......@@ -13,6 +13,7 @@ global_theme_standard=padr
global_menu_statement_disciplinas=Declarao disciplinas
global_menu_transcript_section=Dirio de classe
global_menu_statement_advisees=Declarao de orientandos
global_menu_statement_advisees_concluded=Declarao de orientandos concluidos
global_menu_statement_committees=Declarao de participao em banca
global_menu_statement_student_grant=Declarao de bolsista
global_menu_statement_acceptance=Declarao de aceitao
......
......@@ -12,6 +12,7 @@
<menu:item id="i_professor_new" messageCode="global_menu_new" url="/professors?form" z="user-managed"/>
<menu:item id="i_professor_list" messageCode="global_menu_list" url="/professors" z="user-managed"/>
<menu:item id="i_professor_list" messageCode="global_menu_statement_advisees" url="/professors/statementadvisees" z="user-managed"/>
<menu:item id="i_professor_list" messageCode="global_menu_statement_advisees_concluded" url="/professors/statementadviseesconcluded" z="user-managed"/>
<menu:item id="i_professor_list" messageCode="global_menu_statement_committees" url="/professors/statementcommittees" z="user-managed"/>
<menu:item id="i_professor_list" messageCode="global_menu_statement_courses" url="/professors/statementcourses" z="user-managed"/>
</menu:category>
......
......@@ -10,7 +10,7 @@
</script>
<b>Declaração de orientandos</b> <p/>
<b>Selecione um professor e o curso do orientandos</b>
<b>Selecione um professor e o curso dos orientandos ativos</b>
<p></p>
<form name="adviseesstatement" action="statementadviseeslist" method="get">
......@@ -20,15 +20,6 @@
<field:select disableFormBinding="true" field="regKind" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regKind" items="${registrationkinds}"
path="registrationkinds" z="QHL6MLE5411WNUa/F8UyTxE9H6w="/>
<field:select disableFormBinding="true" field="regStatus" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regStatus" items="${registrationstatuses}"
path="registrationstatuses" z="P9eI83EY6Adc/hMCVIP3kIeWY2k="/>
<field:input field="startYear" id="c_br_ufpr_c3sl_sapos_models_scholar_StudentGrant_startYear" disableFormBinding="true"
z="user_managed"/>
<field:input field="endYear" id="c_br_ufpr_c3sl_sapos_models_scholar_StudentGrant_endYear" disableFormBinding="true"
z="user_managed"/>
<input type="button" value="Listar" onclick="send('statementadviseeslist')"/>
<input type="button" value="PDF" onclick="send('statementadviseespdf')"/>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<div xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:field="urn:jsptagdir:/WEB-INF/tags/form/fields" xmlns:form="urn:jsptagdir:/WEB-INF/tags/form" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:spring="http://www.springframework.org/tags" version="2.0">
<jsp:output omit-xml-declaration="yes"/>
<script>
function send(pag){
document.adviseesstatementconcluded.action = pag;
document.adviseesstatementconcluded.submit();
}
</script>
<b>Declaração de orientandos concluidos</b> <p/>
<b>Selecione um professor e o curso dos orientandos concluidos</b>
<p></p>
<form name="adviseesstatementconcluded" action="statementadviseesconcludedlist" method="get">
<field:select disableFormBinding="true" field="professor" id="c_br_ufpr_c3sl_sapos_models_people_Professor"
itemValue="id" items="${professors}" path="/professors" z="user-managed" />
<field:select disableFormBinding="true" field="regKind" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regKind" items="${registrationkinds}"
path="registrationkinds" z="QHL6MLE5411WNUa/F8UyTxE9H6w="/>
<field:input field="startYear" id="c_br_ufpr_c3sl_sapos_models_scholar_StudentGrant_startYear" disableFormBinding="true"
z="user_managed"/>
<field:input field="endYear" id="c_br_ufpr_c3sl_sapos_models_scholar_StudentGrant_endYear" disableFormBinding="true"
z="user_managed"/>
<input type="button" value="Listar" onclick="send('statementadviseesconcludedlist')"/>
<input type="button" value="PDF" onclick="send('statementadviseesconcludedpdf')"/>
</form>
<form:dependency dependencies="${dependencies}" id="d_br_ufpr_c3sl_sapos_models_people_Student" render="${not empty dependencies}" z="gW+juyJp3mRm7nWlqYbCfkbtYVo="/>
</div>
......@@ -18,6 +18,10 @@
<put-attribute name="body" value="/WEB-INF/views/professors/statementadvisees.jspx"/>
</definition>
<definition extends="default" name="professors/statementadviseesconcluded">
<put-attribute name="body" value="/WEB-INF/views/professors/statementadviseesconcluded.jspx"/>
</definition>
<definition extends="default" name="professors/statementcommittees">
<put-attribute name="body" value="/WEB-INF/views/professors/statementcommittees.jspx"/>
</definition>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment