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

Chanced label on the first screen of the travelrequisition list and

removed from advisees statement the year of the student from the pdf.
parent 2f0ff853
......@@ -82,8 +82,15 @@ public class Professor extends Person {
Phrase phr = null;
int todayYear = ReportUtil.getTodayDate().get(Calendar.YEAR);
float[] colsWidth = {3f, 1f};
PdfPTable table = new PdfPTable(colsWidth);
PdfPTable table = null;
if (status.equals("Ativa")) {
float[] colsWidth = {3f, 1f};
table = new PdfPTable(colsWidth);
}
else {
float[] colsWidth = {1f};
table = new PdfPTable(colsWidth);
}
table.setWidthPercentage(80);
table.setHorizontalAlignment(Element.ALIGN_CENTER);
......@@ -132,14 +139,16 @@ public class Professor extends Person {
PdfPCell cell = new PdfPCell(new Paragraph(r.getStudent().getName(), ReportUtil.getTableTextFont()));
table.addCell(cell);
if (r.getStartDate() == null)
cell = new PdfPCell(new Paragraph("--", ReportUtil.getTableTextFont()));
else {
long diff = ReportUtil.getTodayDate().getTimeInMillis() - r.getStartDate().getTime();
long dayDifference = diff / (1000 * 60 * 60 * 24);
cell = new PdfPCell(new Paragraph(ReportUtil.getOrdinalNumber((int)dayDifference / 365)+" ano", ReportUtil.getTableTextFont()));
if (status.equals("Ativa")) {
if (r.getStartDate() == null)
cell = new PdfPCell(new Paragraph("--", ReportUtil.getTableTextFont()));
else {
long diff = ReportUtil.getTodayDate().getTimeInMillis() - r.getStartDate().getTime();
long dayDifference = diff / (1000 * 60 * 60 * 24);
cell = new PdfPCell(new Paragraph(ReportUtil.getOrdinalNumber((int)dayDifference / 365)+" ano", ReportUtil.getTableTextFont()));
}
table.addCell(cell);
}
table.addCell(cell);
}
document.add(table);
......
......@@ -3,6 +3,7 @@
application_name=Sapos
global_warning=Attention to repeated data (according to the existing values)
label_br_ufpr_c3sl_sapos_models_scholar_sectionpos_year=Year
label_br_ufpr_c3sl_sapos_models_customization_configuration=Configuration
label_br_ufpr_c3sl_sapos_models_customization_configuration_description=Description
......
......@@ -3,6 +3,7 @@
application_name=Sapos
global_warning=Atencao aos dados repetidos (de acordo com os valores existentes)
label_br_ufpr_c3sl_sapos_models_scholar_sectionpos_year=Ano
label_br_ufpr_c3sl_sapos_models_customization_configuration_master=Mestrado
label_br_ufpr_c3sl_sapos_models_customization_configuration_phd=Doutorado
......
......@@ -8,7 +8,7 @@
<field:select disableFormBinding="true" field="requestStatus" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_requestStatus" items="${requeststatusesblank}" path="requeststatusesblank" z="user-managed"/>
<field:input disableFormBinding="true" field="year" id="c_br_ufpr_c3sl_sapos_models_scholar_SectionPos_sectionYear"
<field:input disableFormBinding="true" field="year" id="c_br_ufpr_c3sl_sapos_models_scholar_SectionPos_year"
validationMessageCode="field_invalid_integer" z="user-managed"/>
<input type="submit" value="Enviar"/>
......
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