Commit 5b1b1a74 authored by Fabiano Sluzarski's avatar Fabiano Sluzarski

Changes in the alert of concept null in the last semester, on the pdf

for the travel requisition and in the transcript per section pdf. Added
registration requisition pdf for the travel requisition class.
parent 384ce8a8
......@@ -5,6 +5,8 @@ import java.util.List;
import javax.validation.constraints.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.MailSender;
import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;
......@@ -19,6 +21,9 @@ import br.ufpr.c3sl.sapos.models.scholar.TravelRequisition;
@RooEntity
public class Configuration {
@Autowired
public transient MailSender mailTemplate;
public static String COORDINATOR_NAME = "coordinator.name";
public static String MASTER_COURSE_NAME = "master.course.name";
public static String PHD_COURSE_NAME = "phd.course.name";
......@@ -68,7 +73,7 @@ public class Configuration {
"(r.defense_date - r.proposal_date)/30 > "+Configuration.findConfigValueByName("month.nb.defense.date.expiring"),Registration.class).getResultList();
}
//- avisar que notas do semestre anterior nao foram preenchidas
//- avisar que conceito do semestre anterior nao foram preenchidas
public static Object findLastPeriodBlankConcepts(){
int year, month, period = 0;
Calendar c = Calendar.getInstance();
......@@ -82,9 +87,9 @@ public class Configuration {
period = 1;
return entityManager().createNativeQuery(
"select * from transcript t, section_pos s, registration r, person p where (t.concept IS NULL or t.concept = 'Nulo') " +
"select * from transcript t, section_pos s, registration r, person p, course c where (t.concept IS NULL or t.concept = 'Nulo') " +
"and t.transcript_section = s.id and s.section_year = "+year+" and s.period = "+period+
" and t.student = r.id and r.student = p.id order by p.name", Transcript.class).getResultList();
" and t.student = r.id and r.student = p.id and s.course = c.id order by c.code", Transcript.class).getResultList();
}
//- alerta para requisicoes de viagem
......
......@@ -88,7 +88,7 @@ public class Transcript {
public static String convertConcept(ConceptTranscript concept) {
if (concept == ConceptTranscript.Nulo)
return "-";
return " ";
else
return concept.toString();
}
......@@ -499,7 +499,7 @@ public class Transcript {
response.setContentType("application/pdf");
//left,right,top,bottom margins
Document document = new Document(PageSize.A4, 80, 80, 80, 80);
float[] colswidth = {2f,1f,1f,1f,1f};
float[] colswidth = {2f,1f,1f,1f};
PdfPTable table = new PdfPTable(colswidth);
Paragraph p;
......@@ -536,9 +536,9 @@ public class Transcript {
cell = new PdfPCell(new Paragraph("Conceito", ReportUtil.getTableTitleTextFont()));
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
table.addCell(cell);
cell = new PdfPCell(new Paragraph("Nota", ReportUtil.getTableTitleTextFont()));
/*cell = new PdfPCell(new Paragraph("Nota", ReportUtil.getTableTitleTextFont()));
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
table.addCell(cell);
table.addCell(cell);*/
cell = new PdfPCell(new Paragraph("Frequencia", ReportUtil.getTableTitleTextFont()));
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
table.addCell(cell);
......@@ -553,9 +553,10 @@ public class Transcript {
cell = new PdfPCell(new Paragraph(convertConcept(t.concept), ReportUtil.getTableTextFont()));
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
table.addCell(cell);
cell = new PdfPCell(new Paragraph(t.grade !=null ? t.grade.toString() : "", ReportUtil.getTableTextFont()));
/*cell = new PdfPCell(new Paragraph(t.grade !=null ? t.grade.toString() : "", ReportUtil.getTableTextFont()));
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
table.addCell(cell);
table.addCell(cell);*/
cell = new PdfPCell(new Paragraph(t.frequency !=null ? t.frequency.toString() : "", ReportUtil.getTableTextFont()));
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
......
......@@ -100,6 +100,14 @@ privileged aspect TravelRequisition_Roo_JavaBean {
public void TravelRequisition.setTotalValue(Float totalValue) {
this.totalValue = totalValue;
}
public Float TravelRequisition.getRegistrationValue() {
return this.registrationValue;
}
public void TravelRequisition.setRegistrationValue(Float registrationValue) {
this.registrationValue = registrationValue;
}
public TicketKind TravelRequisition.getTicketKind() {
return this.ticketKind;
......
......@@ -18,6 +18,7 @@ privileged aspect TravelRequisition_Roo_ToString {
sb.append("Person: ").append(getPerson()).append(", ");
sb.append("Place: ").append(getPlace()).append(", ");
sb.append("Profession: ").append(getProfession()).append(", ");
sb.append("RegistrationValue: ").append(getRegistrationValue()).append(", ");
sb.append("RequesterKind: ").append(getRequesterKind()).append(", ");
sb.append("RequestStatus: ").append(getRequestStatus()).append(", ");
sb.append("StartDate: ").append(getStartDate()).append(", ");
......
......@@ -100,17 +100,17 @@ public class ConfigurationController {
return "people/accepted";
}
@Autowired
private transient MailSender mailTemplate;
public void sendMessage(/*String mailFrom,*/ String subject, String mailTo, String message) {
//USAGE: sendMessage("[sapos] Teste Email", "exemplo@gmail.com", "Sucesso!!!");
org.springframework.mail.SimpleMailMessage simpleMailMessage = new org.springframework.mail.SimpleMailMessage();
simpleMailMessage.setFrom(Configuration.findConfigValueByName("course.email"));
simpleMailMessage.setSubject(subject);
simpleMailMessage.setTo(mailTo);
simpleMailMessage.setText(message);
mailTemplate.send(simpleMailMessage);
}
public static void sendMessage(/*String mailFrom,*/ String subject, String[] mailTo, String message) {
//USAGE: sendMessage("[sapos] Teste Email", "exemplo@gmail.com", "Sucesso!!!");
org.springframework.mail.SimpleMailMessage simpleMailMessage = new org.springframework.mail.SimpleMailMessage();
simpleMailMessage.setFrom(Configuration.findConfigValueByName("course.email"));
simpleMailMessage.setSubject(subject);
simpleMailMessage.setTo(mailTo);
simpleMailMessage.setText(message);
Configuration cfg = Configuration.findConfigurationByName("email.delivery.active").get(0);
if ( cfg.getValue().equals("true") )
cfg.mailTemplate.send(simpleMailMessage);
}
}
......@@ -49,6 +49,8 @@ public class ProfessorController {
ShaPasswordEncoder encoder = new ShaPasswordEncoder(256);
professor.setPassword(encoder.encodePassword(professor.getPassword(), ""));
}
else
professor.setPassword(null);
uiModel.asMap().clear();
professor.persist();
......
......@@ -54,6 +54,8 @@ public class StaffController {
ShaPasswordEncoder encoder = new ShaPasswordEncoder(256);
staff.setPassword(encoder.encodePassword(staff.getPassword(), ""));
}
else
staff.setPassword(null);
uiModel.asMap().clear();
staff.persist();
......
......@@ -43,6 +43,8 @@ public class StudentController {
ShaPasswordEncoder encoder = new ShaPasswordEncoder(256);
student.setPassword(encoder.encodePassword(student.getPassword(), ""));
}
else
student.setPassword(null);
uiModel.asMap().clear();
student.persist();
......
package br.ufpr.c3sl.sapos.web;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import org.springframework.roo.addon.web.mvc.controller.RooWebScaffold;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import br.ufpr.c3sl.sapos.models.people.Person;
import br.ufpr.c3sl.sapos.models.scholar.TravelRequisition;
import br.ufpr.c3sl.sapos.models.scholar.enums.RequestStatus;
@RooWebScaffold( path = "travelrequisitions", formBackingObject = TravelRequisition.class)
@RequestMapping("/travelrequisitions")
@Controller
public class TravelRequisitionController {
@RequestMapping(method = RequestMethod.POST)
public String create(@Valid TravelRequisition travelRequisition, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
if (bindingResult.hasErrors()) {
uiModel.addAttribute("travelRequisition", travelRequisition);
addDateTimeFormatPatterns(uiModel);
return "travelrequisitions/create";
}
Person p = travelRequisition.getPerson();
String message = new String();
message = "A pessoa "+p.getName()+" criou uma nova requisição de viagem.\n\n\n\n-----------------------\nMensagem automatica enviada pelo Sistema de Apoio a Pós (SAPOS)\nPara desativar envio automatico de emails troque o valor da configuração 'email.delivery.active' para 'false'.";
//TODO mailTo
String[] mailTo = {};
ConfigurationController.sendMessage("[sapos] Nova requisição de viagem adicionada", mailTo, message);
uiModel.asMap().clear();
travelRequisition.persist();
return "redirect:/travelrequisitions/" + encodeUrlPathSegment(travelRequisition.getId().toString(), httpServletRequest);
}
@RequestMapping(method = RequestMethod.PUT)
public String update(@Valid TravelRequisition travelRequisition, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
if (bindingResult.hasErrors()) {
uiModel.addAttribute("travelRequisition", travelRequisition);
addDateTimeFormatPatterns(uiModel);
return "travelrequisitions/update";
}
if (travelRequisition.getRequestStatus() != RequestStatus.Aberta) {
Person p = travelRequisition.getPerson();
String message = new String();
message = "A requisição de viagem de "+p.getName();
if (travelRequisition.getRequestStatus() == RequestStatus.Anulada)
message += " foi ANULADA.";
else if (travelRequisition.getRequestStatus() == RequestStatus.Negada)
message += " foi NEGADA.";
else if (travelRequisition.getRequestStatus() == RequestStatus.Confirmada)
message += " foi CONFIRMADA.";
message += "\n\n\n\n-----------------------\nMensagem automatica enviada pelo Sistema de Apoio a Pós (SAPOS)";
//TODO mailTo
String[] mailTo = {};
ConfigurationController.sendMessage("[sapos] Atualização de requisição de viagem", mailTo, message);
}
uiModel.asMap().clear();
travelRequisition.merge();
return "redirect:/travelrequisitions/" + encodeUrlPathSegment(travelRequisition.getId().toString(), httpServletRequest);
}
@RequestMapping(value="travelrequisitionpdf",method = RequestMethod.GET)
public void travelRequisitionPdf(@RequestParam(value = "id", required = true) String id, Model model, HttpServletResponse response) {
TravelRequisition tr = TravelRequisition.findTravelRequisition(new Long(id));
......@@ -23,4 +77,11 @@ public class TravelRequisitionController {
TravelRequisition.requisitionPdf(tr,response);
}
@RequestMapping(value="registrationrequisitionpdf",method = RequestMethod.GET)
public void registrationRequisitionPdf(@RequestParam(value = "id", required = true) String id, Model model, HttpServletResponse response) {
TravelRequisition tr = TravelRequisition.findTravelRequisition(new Long(id));
TravelRequisition.registrationRequisitionPdf(tr,response);
}
}
......@@ -30,17 +30,17 @@ import br.ufpr.c3sl.sapos.models.scholar.enums.TripKind;
privileged aspect TravelRequisitionController_Roo_Controller {
@RequestMapping(method = RequestMethod.POST)
public String TravelRequisitionController.create(@Valid TravelRequisition travelRequisition, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
if (bindingResult.hasErrors()) {
uiModel.addAttribute("travelRequisition", travelRequisition);
addDateTimeFormatPatterns(uiModel);
return "travelrequisitions/create";
}
uiModel.asMap().clear();
travelRequisition.persist();
return "redirect:/travelrequisitions/" + encodeUrlPathSegment(travelRequisition.getId().toString(), httpServletRequest);
}
// @RequestMapping(method = RequestMethod.POST)
// public String TravelRequisitionController.create(@Valid TravelRequisition travelRequisition, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
// if (bindingResult.hasErrors()) {
// uiModel.addAttribute("travelRequisition", travelRequisition);
// addDateTimeFormatPatterns(uiModel);
// return "travelrequisitions/create";
// }
// uiModel.asMap().clear();
// travelRequisition.persist();
// return "redirect:/travelrequisitions/" + encodeUrlPathSegment(travelRequisition.getId().toString(), httpServletRequest);
// }
@RequestMapping(params = "form", method = RequestMethod.GET)
public String TravelRequisitionController.createForm(Model uiModel) {
......@@ -70,17 +70,17 @@ privileged aspect TravelRequisitionController_Roo_Controller {
return "travelrequisitions/list";
}
@RequestMapping(method = RequestMethod.PUT)
public String TravelRequisitionController.update(@Valid TravelRequisition travelRequisition, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
if (bindingResult.hasErrors()) {
uiModel.addAttribute("travelRequisition", travelRequisition);
addDateTimeFormatPatterns(uiModel);
return "travelrequisitions/update";
}
uiModel.asMap().clear();
travelRequisition.merge();
return "redirect:/travelrequisitions/" + encodeUrlPathSegment(travelRequisition.getId().toString(), httpServletRequest);
}
// @RequestMapping(method = RequestMethod.PUT)
// public String TravelRequisitionController.update(@Valid TravelRequisition travelRequisition, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
// if (bindingResult.hasErrors()) {
// uiModel.addAttribute("travelRequisition", travelRequisition);
// addDateTimeFormatPatterns(uiModel);
// return "travelrequisitions/update";
// }
// uiModel.asMap().clear();
// travelRequisition.merge();
// return "redirect:/travelrequisitions/" + encodeUrlPathSegment(travelRequisition.getId().toString(), httpServletRequest);
// }
@RequestMapping(value = "/{id}", params = "form", method = RequestMethod.GET)
public String TravelRequisitionController.updateForm(@PathVariable("id") Long id, Model uiModel) {
......
......@@ -325,13 +325,14 @@ label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_place=Place
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_tripkind=Trip Kind
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_startdate=Start Date
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_enddate=End Date
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_daynumber=Day Number
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_daynumber=Number of days
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_totalvalue=Total Value
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_ticketkind=Ticket Kind
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_destinations=Destinations
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_tripstartdate=Trip Start Date
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_tripenddate=Trip End Date
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_ticketvalue=Ticket Value
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_registrationvalue=Registration Value
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_requeststatus=Request Status
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_observations=Observations
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_plural=Travel Requisitions
......
......@@ -324,6 +324,7 @@ label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_destinations=Trecho
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_tripstartdate=Sada
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_tripenddate=Retorno
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_ticketvalue=Valor da Passagem
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_registrationvalue=Valor da Inscrio
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_requeststatus=Status da Requisio
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_observations=Observaes
label_br_ufpr_c3sl_sapos_models_scholar_travelrequisition_plural=Requisies de Viagem
......
......@@ -7,27 +7,18 @@
<page:list id="pl_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition" items="${travelrequisition}" emptyLabels="true" z="user-managed">
<table:table data="${travelrequisition}" id="l_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition" path="/travelrequisitions" create="false" z="user-managed">
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_person" navigation="true" property="person" z="user-managed"/>
<table:column property="requesterKind" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_requesterKind" z="user-managed"/>
<table:column property="profession" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_profession" z="user-managed"/>
<table:column property="conference" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_conference" z="user-managed"/>
<table:column property="place" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_place" z="user-managed"/>
<table:column property="destinations" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_destinations" z="user-managed"/>
<table:column property="justification" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_justification" z="user-managed"/>
<table:column property="tripKind" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_tripKind" z="user-managed"/>
<table:column property="dayNumber" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_dayNumber" z="user-managed"/>
<table:column property="tripStartDate" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_tripStartDate" z="user-managed"/>
<table:column property="tripEndDate" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_tripEndDate" z="user-managed"/>
<table:column property="startDate" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_startDate" z="user-managed"/>
<table:column property="endDate" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_endDate" z="user-managed"/>
<table:column property="ticketKind" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_ticketKind" z="user-managed"/>
<table:column property="ticketValue" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_ticketValue" z="user-managed"/>
<table:column property="totalValue" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_totalValue" z="user-managed"/>
<table:column property="requestStatus" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_requestStatus" z="user-managed"/>
<table:column property="observations" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_observations" z="user-managed"/>
</table:table>
</page:list>
......@@ -91,12 +82,11 @@
<b>Avaliações do semestre anterior com conceitos não preenchidos</b>
<page:list id="pl_br_ufpr_c3sl_sapos_models_scholar_Transcript" items="${gradeEmpty}" emptyLabels="true" z="XkBEOi8+LWqvFKK06b3mq90KI1U=">
<table:table data="${gradeEmpty}" id="l_br_ufpr_c3sl_sapos_models_scholar_Transcript" path="/transcripts" create="false" z="57/qLH4Y2mwQJG9RQk+tGXo2kpw=">
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Course_code" navigation="true" property="transcriptSection.course.code" z="9ecOZUPR3CIVL2XOtG9aRmLJzn4="/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Transcript_transcriptSection" navigation="true" property="transcriptSection.course.name" z="user-managed"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Transcript_student" navigation="true" property="student.student.name" z="user-managed"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regKind" navigation="true" property="student.regKind" z="user-managed"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Transcript_transcriptSection" navigation="true" property="transcriptSection.course.name" z="user-managed"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Course_code" navigation="true" property="transcriptSection.course.code" z="9ecOZUPR3CIVL2XOtG9aRmLJzn4="/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Transcript_concept" property="concept" z="BXtOb5eNDgQ2EdjEiJ8bBaXfZ0A=" nullvalue="Nulo"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Transcript_grade" property="grade" z="clivGE2OFc6Wld+CLitF/sAXddU="/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Transcript_frequency" property="frequency" z="rLQfQM3aCKOI9biFAIRRtKNmVKs="/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Transcript_situation" property="situation" z="iq+rXnC/oF96+jdqVt0v2XQMzZw=" nullvalue="Nulo"/>
</table:table>
......
......@@ -4,10 +4,6 @@
<jsp:output omit-xml-declaration="yes"/>
<menu:menu id="_menu" z="user-managed">
<menu:category id="c_travelrequisition" z="user-managed">
<menu:item id="i_travelrequisition_new" messageCode="global_menu_new" url="/travelrequisitions?form" z="user-managed"/>
<menu:item id="i_travelrequisition_list" messageCode="global_menu_list" url="/travelrequisitions" z="user-managed"/>
</menu:category>
<menu:category id="c_professor" z="gFP/T2n5suI6k4wCJylC2vvnT0s=">
<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"/>
......@@ -92,7 +88,11 @@
<menu:item id="i_grantkind_new" messageCode="global_menu_new" url="/grantkinds?form" z="g+hv4UBwsO240706k4qM1VeEFQ0="/>
<menu:item id="i_grantkind_list" messageCode="global_menu_list" url="/grantkinds" z="fCwcn9TrCHkl6tT6GJGpJ0QLBuU="/>
</menu:category>
<menu:category id="c_configuration" z="ex6zSpCyqSksY2xxo+2yaACAxic=">
<menu:category id="c_travelrequisition" z="user-managed">
<menu:item id="i_travelrequisition_new" messageCode="global_menu_new" url="/travelrequisitions?form" z="user-managed"/>
<menu:item id="i_travelrequisition_list" messageCode="global_menu_list" url="/travelrequisitions" z="user-managed"/>
</menu:category>
<menu:category id="c_configuration" z="ex6zSpCyqSksY2xxo+2yaACAxic=">
<menu:item id="i_configuration_new" messageCode="global_menu_new" url="/configurations?form" z="PpKhRYSLF3fMvOlr5J8dEALoaF8="/>
<menu:item id="i_configuration_list" messageCode="global_menu_list" url="/configurations" z="user-managed"/>
</menu:category>
......
......@@ -30,6 +30,7 @@
<hr/>
<b>Valores</b>
<p/>
<field:input field="registrationValue" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_registrationValue" validationMessageCode="field_invalid_integer" z="user-managed"/>
<field:select field="ticketKind" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_ticketKind" items="${ticketkinds}" path="ticketkinds" z="user-managed"/>
<field:input field="ticketValue" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_ticketValue" validationMessageCode="field_invalid_integer" z="user-managed"/>
<field:input field="totalValue" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_totalValue" validationMessageCode="field_invalid_integer" z="user-managed"/>
......
......@@ -5,27 +5,18 @@
<page:list id="pl_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition" items="${travelrequisitions}" z="user-managed">
<table:table data="${travelrequisitions}" id="l_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition" path="/travelrequisitions" generatepdf="true" pathpdf="/travelrequisitions/travelrequisitionpdf?id=" z="user-managed">
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_person" navigation="true" property="person" z="user-managed"/>
<table:column property="requesterKind" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_requesterKind" z="user-managed"/>
<table:column property="profession" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_profession" z="user-managed"/>
<table:column property="conference" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_conference" z="user-managed"/>
<table:column property="place" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_place" z="user-managed"/>
<table:column property="destinations" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_destinations" z="user-managed"/>
<table:column property="justification" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_justification" z="user-managed"/>
<table:column property="tripKind" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_tripKind" z="user-managed"/>
<table:column property="dayNumber" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_dayNumber" z="user-managed"/>
<table:column property="tripStartDate" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_tripStartDate" z="user-managed"/>
<table:column property="tripEndDate" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_tripEndDate" z="user-managed"/>
<table:column property="startDate" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_startDate" z="user-managed"/>
<table:column property="endDate" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_endDate" z="user-managed"/>
<table:column property="ticketKind" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_ticketKind" z="user-managed"/>
<table:column property="ticketValue" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_ticketValue" z="user-managed"/>
<table:column property="totalValue" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_totalValue" z="user-managed"/>
<table:column property="requestStatus" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_requestStatus" z="user-managed"/>
<table:column property="observations" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_observations" z="user-managed"/>
</table:table>
</page:list>
</div>
......@@ -2,7 +2,35 @@
<div xmlns:field="urn:jsptagdir:/WEB-INF/tags/form/fields" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:page="urn:jsptagdir:/WEB-INF/tags/form" version="2.0">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<jsp:output omit-xml-declaration="yes"/>
<script>
function getObjectId() {
id = document.URL.substring(document.URL.indexOf("ns/", 1) + 3, document.URL.length);
return id;
}
function rewriteGeneratePdfLink() {
var cells = document.getElementsByTagName("a");
for (var i=0; i != cells.length; i++) {
var href = cells[i].getAttribute("href");
if (href.indexOf("/travelrequisitionpdf?id=") > 0) {
cells[i].setAttribute("href", href + getObjectId());
}
if (href.indexOf("/registrationrequisitionpdf?id=") > 0) {
cells[i].setAttribute("href", href + getObjectId());
}
}
}
</script>
<page:show id="ps_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition" object="${travelrequisition}" path="/travelrequisitions" z="user-managed">
<a href="./travelrequisitionpdf?id=">Gerar PDF</a>
<p/>
<a href="./registrationrequisitionpdf?id=">Requisição de inscrição</a>
<script>rewriteGeneratePdfLink();</script>
<p/>
<b>Requirente</b>
<p/>
<field:display field="person" id="s_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_person" object="${travelrequisition}" z="user-managed"/>
......@@ -33,6 +61,7 @@
<hr/>
<b>Valores</b>
<p/>
<field:display field="registrationValue" id="s_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_registrationValue" object="${travelrequisition}" z="user-managed"/>
<field:display field="ticketKind" id="s_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_ticketKind" object="${travelrequisition}" z="user-managed"/>
<field:display field="ticketValue" id="s_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_ticketValue" object="${travelrequisition}" z="user-managed"/>
<field:display field="totalValue" id="s_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_totalValue" object="${travelrequisition}" z="user-managed"/>
......
......@@ -30,6 +30,7 @@
<hr/>
<b>Valores</b>
<p/>
<field:input field="registrationValue" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_registrationValue" validationMessageCode="field_invalid_integer" z="user-managed"/>
<field:select field="ticketKind" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_ticketKind" items="${ticketkinds}" path="ticketkinds" z="user-managed"/>
<field:input field="ticketValue" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_ticketValue" validationMessageCode="field_invalid_integer" z="user-managed"/>
<field:input field="totalValue" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_totalValue" validationMessageCode="field_invalid_integer" z="user-managed"/>
......
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