Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added short name to degree type. #Resolves ACDM-786 #759

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/dml/fenixedu-academic.dml
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ valueType org.fenixedu.academic.domain.accounting.EventTypes as EventTypes {

public class degree.DegreeType {
public LocalizedString name (REQUIRED);
public LocalizedString shortName;
public boolean empty;
public boolean bolonha;
public boolean degreeType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,14 @@
*/
public class DegreeType extends DegreeType_Base implements Comparable<DegreeType> {

public DegreeType(LocalizedString name) {
public DegreeType(final LocalizedString name) {
this(name, null);
}

public DegreeType(final LocalizedString name, final LocalizedString shortName) {
setBennu(Bennu.getInstance());
setName(name);
setShortName(shortName);
setCycles(new CycleTypes());
setCyclesToEnrol(new CycleTypes());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ public static class DegreeTypeBean implements Serializable {
private static final long serialVersionUID = 387599179531038042L;

private LocalizedString name;
private LocalizedString shortName;
private DegreeType selected;
private boolean empty;
private boolean bolonha = true;
Expand All @@ -291,6 +292,7 @@ public DegreeTypeBean() {
public DegreeTypeBean(DegreeType type) {
this.selected = type;
this.name = type.getName();
this.shortName = type.getShortName();
this.empty = type.getEmpty();
this.bolonha = type.getBolonha();
this.degree = type.getDegreeType();
Expand All @@ -309,6 +311,14 @@ public void setName(LocalizedString name) {
this.name = name;
}

public LocalizedString getShortName() {
return shortName;
}

public void setShortName(LocalizedString shortName) {
this.shortName = shortName;
}

public DegreeType getSelected() {
return selected;
}
Expand Down Expand Up @@ -415,6 +425,7 @@ public ActionForward createDegreeType(ActionMapping mapping, ActionForm form, Ht
atomic(() -> {
DegreeType type = bean.getSelected() == null ? new DegreeType(bean.getName()) : bean.getSelected();
type.setName(bean.getName());
type.setShortName(bean.getShortName());
type.setEmpty(bean.isEmpty());
type.setBolonha(bean.isBolonha());
type.setDegreeType(bean.isDegree());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1974,6 +1974,7 @@ label.set.evaluation.type = Type
label.set.evaluations.mark.as.final = Launch Notes
label.shift = Shift
label.shiftType = Shift Type
label.shortName = Abbreviation
label.since = Since
label.socialSecurityNumber = Fiscal Number
label.special.season.enrolment = Special Season Enrollment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1974,6 +1974,7 @@ label.set.evaluation.type = Tipo
label.set.evaluations.mark.as.final = Lan�ar notas
label.shift = Turno
label.shiftType = Tipo do Turno
label.shortName = Abreviatura
label.since = Desde
label.socialSecurityNumber = N� de Contribuinte
label.special.season.enrolment = Inscri��o em �poca Especial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@page import="org.fenixedu.academic.domain.accounting.EventType"%>

<%@page import="org.fenixedu.academic.domain.degree.DegreeType"%><html:xhtml />
<html:xhtml />
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://fenix-ashes.ist.utl.pt/fenix-renderers" prefix="fr"%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@
<h3 class="panel-title">
<a data-toggle="collapse" data-parent="#cursos_acc" data-target="#collapse${degreeType.externalId}" href="#">
<bean:write name="degreeType" property="name.content" bundle="ACADEMIC_OFFICE_RESOURCES"/>
<logic:present name="degreeType" property="shortName">
(<bean:write name="degreeType" property="shortName.content"/>)
</logic:present>
</a>
</h3>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://fenix-ashes.ist.utl.pt/fenix-renderers" prefix="fr"%>
<%@page import="org.fenixedu.academic.domain.degree.DegreeType"%>
<%@page import="org.fenixedu.academic.domain.AcademicProgram"%>
<%@page import="org.fenixedu.academic.domain.ExecutionDegree"%>
<%@ taglib uri="http://fenix-ashes.ist.utl.pt/taglib/academic" prefix="academic" %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %><%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ page import="org.fenixedu.academic.ui.struts.action.resourceAllocationManager.utils.PresentationConstants" %>
<%@page import="org.fenixedu.academic.domain.degree.DegreeType"%>
<%@ taglib uri="http://fenix-ashes.ist.utl.pt/fenix-renderers" prefix="fr" %>
<html:xhtml/>

Expand Down
1 change: 0 additions & 1 deletion src/main/webapp/coordinator/simpleContext.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ page import="org.fenixedu.academic.ui.struts.action.resourceAllocationManager.utils.PresentationConstants" %>
<%@ page import="org.fenixedu.academic.domain.degree.DegreeType" %>
<table width="98%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" class="infoselected">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<%@ taglib uri="http://jakarta.apache.org/taglibs/datetime-1.0" prefix="dt"%>
<%@ taglib uri="http://fenix-ashes.ist.utl.pt/taglib/enum" prefix="e" %>
<%@ page language="java" %>
<%@page import="org.fenixedu.academic.domain.degree.DegreeType"%>
<%@page import="org.fenixedu.academic.domain.EvaluationSeason"%>
<%@page import="org.fenixedu.academic.domain.EvaluationConfiguration"%>
<%@ page import="org.fenixedu.commons.i18n.I18N"%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<%@ taglib uri="http://fenix-ashes.ist.utl.pt/fenix-renderers" prefix="fr"%>
<%@ taglib uri="http://jakarta.apache.org/taglibs/datetime-1.0" prefix="dt"%>
<%@ taglib uri="http://fenix-ashes.ist.utl.pt/taglib/enum" prefix="e" %>
<%@page import="org.fenixedu.academic.domain.degree.DegreeType"%>
<%@page import="org.fenixedu.academic.domain.EvaluationSeason"%>
<%@page import="org.fenixedu.academic.domain.EvaluationConfiguration"%>
<%@ page import="org.fenixedu.commons.i18n.I18N"%>
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/manager/createDegreeType.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<fr:schema bundle="ACADEMIC_ADMIN_OFFICE"
type="org.fenixedu.academic.ui.struts.action.manager.ManageAssociatedObjects$DegreeTypeBean">
<fr:slot name="name"/>
<fr:slot name="shortName"/>
<fr:slot name="cycleTypes" layout="option-select" key="label.cycleType">
<fr:property name="from" value="possibleCycleTypes"/>
<fr:property name="classes" value="list-unstyled"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
--%>
<%@ page language="java"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@page import="org.fenixedu.academic.domain.degree.DegreeType"%>
<html:xhtml />
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://fenix-ashes.ist.utl.pt/fenix-renderers" prefix="fr"%>

<%@ page import="org.fenixedu.academic.domain.degree.DegreeType" %>

<h2><bean:message key="label.payments.postingRules.degreeCurricularPlan.rulesFor"
bundle="MANAGER_RESOURCES" /> <bean:write name="degreeCurricularPlan"
property="degree.name" /> - <bean:write name="degreeCurricularPlan"
Expand Down
10 changes: 4 additions & 6 deletions src/main/webapp/messaging/findPerson.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,23 @@
</fr:slot>
<logic:present name="bean" property="roleType">
<logic:equal name="bean" property="roleType" value="STUDENT">
<fr:slot name="degreeType" layout="menu-postback" key="label.degree.type">
<fr:property name="excludedValues" value="EMPTY"/>
<fr:slot name="degreeType" layout="menu-select-postback" key="label.degree.type">
<fr:property name="destination" value="postback" />
<fr:property name="providerClass" value="org.fenixedu.academic.ui.renderers.providers.DegreeTypeProvider" />
<fr:property name="format" value="\${name.content}"/>
<fr:destination name="postback"
path="/findPerson.do?method=postback" />
</fr:slot>
<logic:present name="bean" property="degreeType">
<fr:slot name="degree" layout="menu-select-postback" key="label.degree.name">
<fr:property name="providerClass"
value="org.fenixedu.academic.ui.renderers.providers.person.PersonSearchDegreeProvider" />
<fr:property name="from" value="possibleDegrees" />
<fr:destination name="postback"
path="/findPerson.do?method=postback" />
<fr:property name="destination" value="postback" />
<fr:property name="format" value="\${presentationName}" />
</fr:slot>
</logic:present>
</logic:equal>


<logic:equal name="bean" property="roleType" value="TEACHER">
<fr:slot name="department" layout="menu-select-postback" key="label.teacher.finalWork.department">
<fr:property name="providerClass"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<%@ taglib uri="http://fenix-ashes.ist.utl.pt/taglib/enum" prefix="e" %>
<%@ taglib uri="http://fenix-ashes.ist.utl.pt/taglib/academic" prefix="academic" %>
<%@ page language="java" %>
<%@page import="org.fenixedu.academic.domain.degree.DegreeType"%>
<%@page import="org.fenixedu.academic.domain.EvaluationSeason"%>
<%@page import="org.fenixedu.academic.domain.EvaluationConfiguration"%>
<%@ page import="org.fenixedu.commons.i18n.I18N"%>
Expand Down