Commit 16bc3154 authored by Fabiano Sluzarski's avatar Fabiano Sluzarski
Browse files

TransferCredit added on history, transcriptsection order by year, status

"Cancelado" added on RegistrationStatus, changed label for "Num.
Ingresso" and checkings started.
parent 4b72035e
......@@ -33,6 +33,5 @@ public class Course {
public static List<Course> findAllCourses() {
return entityManager().createQuery("select o from Course o order by name", Course.class).getResultList();
}
}
......@@ -45,7 +45,7 @@ public class SectionPos {
private Set<ClassSchedule> schedulings = new HashSet<ClassSchedule>();
public static List<SectionPos> findAllSectionPoses() {
return entityManager().createNativeQuery("select * from Section_Pos a, course b where a.course = b.id order by b.code, name", SectionPos.class).getResultList();
return entityManager().createNativeQuery("select * from Section_Pos a, course b where a.course = b.id order by a.section_year desc, a.period desc, b.code asc, name asc", SectionPos.class).getResultList();
}
public static Object findSectionPosesByYear(String year) {
......
......@@ -373,6 +373,16 @@ public class Transcript {
document.add(table);
ReportUtil.makeConceptsTableFooter(document);
if (reg.getTransferCredit() != null && reg.getTransferCredit().intValue() > 0)
{
phr = new Phrase("Reaproveitamento de Crédito: ", ReportUtil.getTitleTextFont());
document.add(phr);
phr = new Phrase(reg.getTransferCredit().toString(), ReportUtil.getNormalTextFont());
document.add(phr);
document.add(new Paragraph(""));
document.add(Chunk.NEWLINE);
}
getLanguage(reg.getProficiencyDate(), reg.getLanguage(), document);
......
......@@ -2,5 +2,5 @@ package br.ufpr.c3sl.sapos.models.scholar.enums;
public enum RegistrationStatus {
Ativa, Trancada, Concluida, Desistente, Desligada;
Ativa, Trancada, Concluida, Desistente, Desligada, Cancelado;
}
package br.ufpr.c3sl.sapos.web;
import br.ufpr.c3sl.sapos.models.location.City;
import java.util.List;
import org.springframework.roo.addon.web.mvc.controller.RooWebScaffold;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import br.ufpr.c3sl.sapos.models.location.City;
@RooWebScaffold(path = "cities", formBackingObject = City.class)
@RequestMapping("/cities")
@Controller
public class CityController {
@ModelAttribute("citiescombobox")
public java.util.Collection<City> populateName() {
City c = new City();
List <City> l = City.findAllCitys();
c.setName("");
l.add(0, c);
return l;
}
}
package br.ufpr.c3sl.sapos.web;
import br.ufpr.c3sl.sapos.models.scholar.Course;
import java.util.List;
import org.springframework.roo.addon.web.mvc.controller.RooWebScaffold;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import br.ufpr.c3sl.sapos.models.scholar.Course;
@RooWebScaffold(path = "courses", formBackingObject = Course.class)
@RequestMapping("/courses")
@Controller
public class CourseController {
/*@ModelAttribute("name")
public java.util.Collection<Course> populateName() {
Course c = new Course();
List <Course> l = Course.findAllCourses();
c.setName("");
l.add(0, c);
for (Course co : l)
co.setCode("");
return l;
}
@ModelAttribute("code")
public java.util.Collection<Course> populateCode() {
Course c = new Course();
List <Course> l = Course.findAllCourses();
c.setCode("");
l.add(0, c);
for (Course co : l)
co.setName("");
return l;
}*/
}
package br.ufpr.c3sl.sapos.web;
import br.ufpr.c3sl.sapos.models.entities.Organization;
import java.util.List;
import org.springframework.roo.addon.web.mvc.controller.RooWebScaffold;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import br.ufpr.c3sl.sapos.models.entities.Organization;
@RooWebScaffold(path = "organizations", formBackingObject = Organization.class)
@RequestMapping("/organizations")
@Controller
public class OrganizationController {
/*@ModelAttribute("organizationscombobox")
public java.util.Collection<Organization> populateName() {
Organization o = new Organization();
List <Organization> l = Organization.findAllOrganizations();
o.setName("");
l.add(0, o);
for (Organization r: l)
r.setAcronym("");
return l;
}*/
}
......@@ -11,10 +11,6 @@ import org.springframework.web.bind.annotation.RequestParam;
import br.ufpr.c3sl.sapos.models.location.City;
import br.ufpr.c3sl.sapos.models.people.Person;
import br.ufpr.c3sl.sapos.models.people.Professor;
import br.ufpr.c3sl.sapos.models.people.Staff;
import br.ufpr.c3sl.sapos.models.people.Student;
import br.ufpr.c3sl.sapos.models.people.enums.UserKind;
@RooWebScaffold(path = "people", formBackingObject = Person.class)
@RequestMapping("/people")
......
......@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import br.ufpr.c3sl.sapos.models.location.City;
import br.ufpr.c3sl.sapos.models.people.Professor;
import br.ufpr.c3sl.sapos.models.people.Staff;
import br.ufpr.c3sl.sapos.models.people.Student;
import br.ufpr.c3sl.sapos.models.people.enums.GenderKind;
import br.ufpr.c3sl.sapos.models.people.enums.MaritalStatus;
import br.ufpr.c3sl.sapos.models.people.enums.UserKind;
......@@ -117,6 +118,15 @@ public class ProfessorController {
public String statementcouses() {
return "professors/statementcourses";
}
@ModelAttribute("professorscombobox")
public java.util.Collection<Professor> populateName() {
Professor p = new Professor();
List <Professor> l = Professor.findAllProfessors();
p.setName("");
l.add(0, p);
return l;
}
@RequestMapping(value="statementadviseeslist",method = RequestMethod.GET)
public String statementadviseesList(@RequestParam(value = "professor", required = true) String prof,
......
package br.ufpr.c3sl.sapos.web;
import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
......@@ -15,7 +16,6 @@ import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import br.ufpr.c3sl.sapos.models.people.Professor;
import br.ufpr.c3sl.sapos.models.people.Staff;
import br.ufpr.c3sl.sapos.models.people.enums.UserKind;
......@@ -28,6 +28,15 @@ public class StaffController {
return Arrays.asList(UserKind.Funcionario, UserKind.Administrador);
}
@ModelAttribute("staffscombobox")
public java.util.Collection<Staff> populateName() {
Staff s = new Staff();
List <Staff> l = Staff.findAllStaffs();
s.setName("");
l.add(0, s);
return l;
}
@RequestMapping(method = RequestMethod.POST)
public String create(@Valid Staff staff, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
if (staff.getUserName() != null && staff.getUserName().length() > 0 ) {
......
package br.ufpr.c3sl.sapos.web;
import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
......@@ -16,7 +17,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import br.ufpr.c3sl.sapos.models.location.City;
import br.ufpr.c3sl.sapos.models.people.Staff;
import br.ufpr.c3sl.sapos.models.people.Student;
import br.ufpr.c3sl.sapos.models.people.enums.GenderKind;
import br.ufpr.c3sl.sapos.models.people.enums.MaritalStatus;
......@@ -89,6 +89,15 @@ public class StudentController {
@ModelAttribute("cities")
public java.util.Collection<City> populateCities() {
return City.findAllCitys();
}
}
@ModelAttribute("studentscombobox")
public java.util.Collection<Student> populateName() {
Student s = new Student();
List <Student> l = Student.findAllStudents();
s.setName("");
l.add(0, s);
return l;
}
}
......@@ -142,7 +142,7 @@ label_br_ufpr_c3sl_sapos_models_people_professor_observation=Mais informa
label_br_ufpr_c3sl_sapos_models_people_professor_oii=Oii
label_br_ufpr_c3sl_sapos_models_people_professor_phone=Telefone
label_br_ufpr_c3sl_sapos_models_people_professor_plural=Professores
label_br_ufpr_c3sl_sapos_models_people_professor_registrationnumber=Num. de Ingresso
label_br_ufpr_c3sl_sapos_models_people_professor_registrationnumber=Matricula UFPR
label_br_ufpr_c3sl_sapos_models_people_professor_researchfields=Linhas de Pesquisa
label_br_ufpr_c3sl_sapos_models_people_professor_rg=R.G.
label_br_ufpr_c3sl_sapos_models_people_professor_sections=Turmas
......
......@@ -14,11 +14,16 @@
<jsp:directive.attribute name="render" type="java.lang.Boolean" required="false" rtexprvalue="true" description="Indicate if the contents of this tag and all enclosed tags should be rendered (default 'true')" />
<jsp:directive.attribute name="z" type="java.lang.String" required="false" description="Used for checking if element has been modified (to recalculate simply provide empty string value)" />
<jsp:directive.attribute name="navigation" type="java.lang.Boolean" required="false" rtexprvalue="true" description="Indicates if it is a navigation expression." />
<jsp:directive.attribute name="comboboxform" type="java.lang.Boolean" required="false" rtexprvalue="true" description="Indicates if the select can serve as well as an input and it has a warning message for repeated values. (default false)." />
<c:if test="${empty render or render}">
<c:if test="${empty comboboxform}">
<c:set value="false" var="comboboxform" />
</c:if>
<c:if test="${empty disabled}">
<c:set value="false" var="disabled" />
</c:if>
......@@ -36,7 +41,7 @@
</c:if>
<c:set var="sec_field">
<spring:escapeBody javaScriptEscape="true" >${field}</spring:escapeBody>
<spring:escapeBody javaScriptEscape="true" >${field}</spring:escapeBody>
</c:set>
<spring:message code="select_value" var="select_one_value" htmlEscape="false" />
......@@ -97,6 +102,15 @@
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${comboboxform == true}">
<script type="text/javascript">Spring.addDecoration(new Spring.ElementDecoration({elementId : '_${sec_field}_id',
widgetType: 'dijit.form.ComboBox', widgetAttrs : {hasDownArrow : false,
validate: function(/*Boolean*/ isFocused){
this.displayMessage("Atencao para nao repetir valor (das sugestoes)");
return true;
}
}})); </script>
</c:when>
<c:when test="${multiple == false}">
<script type="text/javascript">Spring.addDecoration(new Spring.ElementDecoration({elementId : '_${sec_field}_id',
widgetType: 'dijit.form.FilteringSelect', widgetAttrs : {hasDownArrow : true}})); </script>
......
......@@ -26,7 +26,9 @@
<script type="text/javascript">dojo.require('dijit.TitlePane');</script>
<div id="_title_${sec_id}_id">
<script type="text/javascript">Spring.addDecoration(new Spring.ElementDecoration({elementId : '_title_${sec_id}_id', widgetType : 'dijit.TitlePane', widgetAttrs : {title: '${sec_title}', open: ${sec_openPane}}})); </script>
<script type="text/javascript">Spring.addDecoration(
new Spring.ElementDecoration({elementId : '_title_${sec_id}_id', widgetType : 'dijit.TitlePane', widgetAttrs :
{title: '${sec_title}', open: ${sec_openPane}}})); </script>
<jsp:doBody />
</div>
</c:if>
......
......@@ -2,8 +2,10 @@
<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:directive.page contentType="text/html;charset=UTF-8"/>
<jsp:output omit-xml-declaration="yes"/>
<form:create id="fc_br_ufpr_c3sl_sapos_models_location_City" modelAttribute="city" path="/cities" render="${empty dependencies}" z="rhgiwzhRNqWAuhcTqa6F+hAuAIc=">
<field:input field="name" id="c_br_ufpr_c3sl_sapos_models_location_City_name" required="true" z="kMxaJAK94rBG/YwUBdb+RIPqlXY="/>
<field:select field="name" id="c_br_ufpr_c3sl_sapos_models_location_City_name" comboboxform="true" items="${citiescombobox}" path="citiescombobox" z="user-managed" disableFormBinding="true" required="true" />
<!-- <field:input field="name" id="c_br_ufpr_c3sl_sapos_models_location_City_name" required="true" z="kMxaJAK94rBG/YwUBdb+RIPqlXY="/> -->
</form:create>
<form:dependency dependencies="${dependencies}" id="d_br_ufpr_c3sl_sapos_models_location_City" render="${not empty dependencies}" z="9k8FQ3wVKthoQWrTg4bZwYHCla8="/>
</div>
......@@ -2,8 +2,11 @@
<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:directive.page contentType="text/html;charset=UTF-8"/>
<jsp:output omit-xml-declaration="yes"/>
<form:create id="fc_br_ufpr_c3sl_sapos_models_scholar_Course" modelAttribute="course" path="/courses" render="${empty dependencies}" z="reV9Y3s2ZqZfN9a2vnqhZMpuja8=">
<!-- <field:select field="name" id="c_br_ufpr_c3sl_sapos_models_scholar_Course_name" comboboxform="true" items="${name}" path="name" z="user-managed" disableFormBinding="true" required="true" /> -->
<field:input field="name" id="c_br_ufpr_c3sl_sapos_models_scholar_Course_name" required="true" z="jyzaymCArZpuGX6SZ3zcwObT96A="/>
<!-- <field:select field="code" id="c_br_ufpr_c3sl_sapos_models_scholar_Course_code" comboboxform="true" items="${code}" path="code" z="user-managed" disableFormBinding="true" required="true" /> -->
<field:input field="code" id="c_br_ufpr_c3sl_sapos_models_scholar_Course_code" required="true" z="scZSxVorEYFvbiDaZR6gdyuySbY="/>
<field:input field="program" id="c_br_ufpr_c3sl_sapos_models_scholar_Course_program" z="jyzaymCArZpuGX6SZ3zcwObT96A="/>
<field:input field="workload" id="c_br_ufpr_c3sl_sapos_models_scholar_Course_workload" validationMessageCode="field_invalid_integer" z="Rwe8b7Mue8RP+DS351Zp6ahC3v8="/>
......
......@@ -2,7 +2,9 @@
<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:directive.page contentType="text/html;charset=UTF-8"/>
<jsp:output omit-xml-declaration="yes"/>
<form:create id="fc_br_ufpr_c3sl_sapos_models_entities_Organization" modelAttribute="organization" path="/organizations" render="${empty dependencies}" z="of+1ZxzOLh0BK466RVllo8KSGrI=">
<!-- <field:select field="name" id="c_br_ufpr_c3sl_sapos_models_entities_Organization_name" comboboxform="true" items="${organizationscombobox}" path="organizationscombobox" z="user-managed" disableFormBinding="true" required="true" /> -->
<field:input field="name" id="c_br_ufpr_c3sl_sapos_models_entities_Organization_name" required="true" z="n56DV4rAoiTyKQoLtOGyOTDy644="/>
<field:input field="acronym" id="c_br_ufpr_c3sl_sapos_models_entities_Organization_acronym" z="yEdHAy9d3sfr5GNWfmsAkYWd3MQ="/>
</form:create>
......
......@@ -2,10 +2,13 @@
<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:directive.page contentType="text/html;charset=UTF-8"/>
<jsp:output omit-xml-declaration="yes"/>
<form:create id="fc_br_ufpr_c3sl_sapos_models_people_Professor" modelAttribute="professor" path="/professors" render="${empty dependencies}" z="user-managed">
<b>Informacoes pessoais</b>
<p/>
<field:input field="name" id="c_br_ufpr_c3sl_sapos_models_people_Professor_name" required="true" z="user-managed"/>
<field:select field="name" id="c_br_ufpr_c3sl_sapos_models_people_Professor_name" comboboxform="true" items="${professorscombobox}" path="professorscombobox" z="user-managed" disableFormBinding="true" required="true" />
<!-- <field:input field="name" id="c_br_ufpr_c3sl_sapos_models_people_Professor_name" required="true" z="user-managed"/> -->
<field:input field="shortName" id="c_br_ufpr_c3sl_sapos_models_people_Professor_shortName" z="user-managed"/>
<field:select field="gender" id="c_br_ufpr_c3sl_sapos_models_people_Professor_gender" items="${genders}" path="genders" z="user-managed"/>
......
......@@ -2,10 +2,13 @@
<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:directive.page contentType="text/html;charset=UTF-8"/>
<jsp:output omit-xml-declaration="yes"/>
<form:create id="fc_br_ufpr_c3sl_sapos_models_people_Staff" modelAttribute="staff" path="/staffs" render="${empty dependencies}" z="HxkYlyPVfFyiZavs5v/a75glVwQ=">
<b>Informacoes pessoais</b>
<p/>
<field:input field="name" id="c_br_ufpr_c3sl_sapos_models_people_Staff_name" required="true" z="xkG7d3oVk5+5SbEG5yaui2kw1TY="/>
<field:select field="name" id="c_br_ufpr_c3sl_sapos_models_people_Staff_name" comboboxform="true" items="${staffscombobox}" path="staffscombobox" z="user-managed" disableFormBinding="true" required="true" />
<!-- <field:input field="name" id="c_br_ufpr_c3sl_sapos_models_people_Staff_name" required="true" z="xkG7d3oVk5+5SbEG5yaui2kw1TY="/> -->
<field:input field="shortName" id="c_br_ufpr_c3sl_sapos_models_people_Staff_shortName" z="0/hFxnzFTRW++pePFVY7Ibezjv0="/>
<field:select field="gender" id="c_br_ufpr_c3sl_sapos_models_people_Staff_gender" items="${genderkinds}" path="genderkinds" z="gzJT64yas88tIAKR4SuuOgDDj0U="/>
<field:select field="maritalStatus" id="c_br_ufpr_c3sl_sapos_models_people_Staff_maritalStatus" items="${maritalstatuses}" path="maritalstatuses" z="Lyma7vtKjrCuEt8M4XMEtzMtbUA="/>
......
......@@ -2,13 +2,17 @@
<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:directive.page contentType="text/html;charset=UTF-8"/>
<jsp:output omit-xml-declaration="yes"/>
<form:create id="fc_br_ufpr_c3sl_sapos_models_people_Student" modelAttribute="student" path="/students" render="${empty dependencies}" z="pT9DFc0OcoQUfkKXMmvXOutDxdE=">
<form:create id="fc_br_ufpr_c3sl_sapos_models_people_Student" modelAttribute="student" path="/students" render="${empty dependencies}" z="pT9DFc0OcoQUfkKXMmvXOutDxdE=">
<b>Informacoes pessoais</b>
<p/>
<field:input field="name" id="c_br_ufpr_c3sl_sapos_models_people_Student_name" required="true" z="OMlwu3st4np30GQq+cVRQCe1lug="/>
<field:select field="name" id="c_br_ufpr_c3sl_sapos_models_people_Student_name" comboboxform="true" items="${studentscombobox}" path="studentscombobox" z="user-managed" disableFormBinding="true" required="true" />
<!-- <field:input field="name" id="c_br_ufpr_c3sl_sapos_models_people_Student_name" required="true" z="OMlwu3st4np30GQq+cVRQCe1lug=" /> -->
<field:input field="shortName" id="c_br_ufpr_c3sl_sapos_models_people_Student_shortName" z="7xTzyBkB6bJnQWGVP5gUYZbK6No="/>
<field:select field="gender" id="c_br_ufpr_c3sl_sapos_models_people_Student_gender" items="${genders}" path="genders" z="user-managed"/>
<field:select field="gender" id="c_br_ufpr_c3sl_sapos_models_people_Student_gender" items="${genders}" path="genders" z="user-managed" />
<field:select field="maritalStatus" id="c_br_ufpr_c3sl_sapos_models_people_Student_maritalStatus" items="${maritalstatuses}" path="maritalstatuses" z="BYEIXExA0EB9G+nH4JyDAT0x9P8="/>
<field:datetime dateTimePattern="${student_dateofbirth_date_format}" field="dateOfBirth" id="c_br_ufpr_c3sl_sapos_models_people_Student_dateOfBirth" z="user-managed"/>
<field:input field="fatherName" id="c_br_ufpr_c3sl_sapos_models_people_Student_fatherName" z="XiYcRlcqxCVZbBXjHwLoBdPQto4="/>
......
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