Skip to content

Commit

Permalink
Merge branch 'aiccra-staging' into aiccra-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjitm committed Nov 1, 2023
2 parents 8b47089 + 482f2ef commit e014d76
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public final class APConstants {
public static final String CRP_FPM_ROLE = "crp_fpm_rol";
public static final String CRP_REPORT_DELIVERABLE_PPA_FILTER = "crp_report_deliverable_ppa_filter";
public static final String CRP_PROJECT_BUDGET_ZERO = "crp_project_budget_zero";
public static final String CRP_LOGIN_HEADER_TEXT = "crp_login_header_text";
public static final String CRP_AICCRA_AF_START_PHASE = "crp_aiccra_af_start_phase";

public static final String CRP_HAS_REGIONS = "crp_has_regions";
public static final String CRP_ID = "crpID";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2628,26 +2628,6 @@ public String getCrpSession() {
}
return this.crpSession;
}

/**
* Get the Custom text from parameters table that for the testing banner
*
* @return the custom text header from parameters table
*/
public String getCustomTextHeader() {
try {
if (APConstants.CRP_LOGIN_HEADER_TEXT != null) {
customTextHeader = (String) this.getSession().get(APConstants.CRP_LOGIN_HEADER_TEXT);
}
} catch (Exception e) {
LOG.error("error getting custom text header " + e);
}
return customTextHeader;
}

public void setCustomTextHeader(String customTextHeader) {
this.customTextHeader = customTextHeader;
}

/**
* ************************ CENTER METHOD ******************************
Expand Down Expand Up @@ -2768,6 +2748,23 @@ public User getCurrentUser() {
return u;
}

/**
* Get the Custom text from parameters table that for the testing banner
*
* @return the custom text header from parameters table
*/
public String getCustomTextHeader() {
try {
if (APConstants.CRP_LOGIN_HEADER_TEXT != null
&& this.getSession().get(APConstants.CRP_LOGIN_HEADER_TEXT) != null) {
customTextHeader = (String) this.getSession().get(APConstants.CRP_LOGIN_HEADER_TEXT);
}
} catch (Exception e) {
LOG.error("error getting custom text header " + e);
}
return customTextHeader;
}

/**
* This method return the Date Format from APConstants class
*
Expand Down Expand Up @@ -5128,6 +5125,27 @@ public Map<String, Object> getSession() {
return this.session;
}

/**
* This method return the first AF AICCRA ID Phase
*
* @return ID value of first AICCRA AF phase
*/
public long getStartAFPhase() {
long startAFPhase = 423;

if (APConstants.CRP_AICCRA_AF_START_PHASE != null
&& this.getSession().get(APConstants.CRP_AICCRA_AF_START_PHASE) != null) {
try {
startAFPhase = Long.parseLong((String) this.getSession().get(APConstants.CRP_AICCRA_AF_START_PHASE));
} catch (NumberFormatException e) {
LOG.error("Error parsing start AF phase to long: " + e);
}
} else {
LOG.error("CRP_AICCRA_AF_START_PHASE is null or not found in session.");
}
return startAFPhase;
}

public Submission getSubmission() {
return this.submission;
}
Expand Down Expand Up @@ -5697,16 +5715,17 @@ public boolean isAdmin() {
* @return Boolean object with the value
*/
public boolean isAFPhase(long phaseID) {
long startAFPhase = 423;

try {
Phase phase;
phase = phaseManager.getPhaseById(phaseID);
if (phase != null && phase.getYear() > 2023) {
return true;
} else {
return false;
}
} catch (Exception e) {
LOG.error("error getting phase " + e);
startAFPhase = this.getStartAFPhase();
} catch (NumberFormatException e) {
LOG.error("Error parsing start AF phase to long: " + e);
}

if (startAFPhase != 0 && phaseID != 0 && phaseID >= startAFPhase) {
return true;
} else {
return false;
}
}
Expand Down Expand Up @@ -7902,6 +7921,10 @@ public void setCurrentCenter(GlobalUnit currentCenter) {
this.currentCenter = currentCenter;
}

public void setCustomTextHeader(String customTextHeader) {
this.customTextHeader = customTextHeader;
}

public void setDataSaved(boolean dataSaved) {
this.dataSaved = dataSaved;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,9 @@ public String save() {
if (projectDB.getProjectInfo().getAcronym() != null) {
project.getProjectInfo().setAcronym(projectDB.getProjectInfo().getAcronym());
}
if (projectDB.getAcronym() != null) {
project.setAcronym(projectDB.getAcronym());
}
project.getProjectInfo().setPhase(this.getActualPhase());
project.getProjectInfo().setProject(project);
project.getProjectInfo().setReporting(projectDB.getProjectInfo().getReporting());
Expand Down Expand Up @@ -1180,7 +1183,6 @@ public String save() {
for (String key : keys) {
this.addActionMessage(key + ": " + this.getInvalidFields().get(key));
}

} else {
this.addActionMessage("message:" + this.getText("saving.saved"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public final class APConstants {
public static final String CRP_REPORT_DELIVERABLE_PPA_FILTER = "crp_report_deliverable_ppa_filter";
public static final String CRP_PROJECT_BUDGET_ZERO = "crp_project_budget_zero";
public static final String CRP_LOGIN_HEADER_TEXT = "crp_login_header_text";
public static final String CRP_AICCRA_AF_START_PHASE = "crp_aiccra_af_start_phase";

public static final String CRP_HAS_REGIONS = "crp_has_regions";
public static final String CRP_ID = "crpID";
Expand Down
3 changes: 2 additions & 1 deletion marlo-web/src/main/resources/custom/aicrra.properties
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ projectDeliverable.otherContactContributing=Other contact person(s) that will co
projectDeliverable.otherContactContributing.readText=Other contact person(s) that will contribute to this deliverable
project.deliverable.dissemination.alreadyDisseminatedSubQ=Is the deliverable already uploaded to a public repository?
project.deliverable.dissemination.involveParticipantsSub=For those deliverables related to Capacity development events and/or IPI 2.3, this option will be Yes by default. <br>In case you change those parameters you should select NO first and save
project.deliverable.dissemination.involveParticipantsSub.AF=For those deliverables related to Capacity development events and/or IPI 2.5, this option will be Yes by default. <br>In case you change those parameters you should select NO first and save
project.deliverable.dissemination.alreadyDisseminatedQuestion=Is this deliverable already disseminated?
project.deliverable.dissemination.channelInfo=MARLO is continuously working to have interoperability with other more platforms.
project.deliverable.dissemination.selectChannelLabel=Select a dissemination channel
Expand Down Expand Up @@ -2779,7 +2780,7 @@ email.newUser.part1=Welcome to <b>MARLO</b> - <b>M</b>anaging <b>A</b>gricultura
email.newUser.part2=Welcome to <b>MARLO</b> - <b>M</b>anaging <b>A</b>gricultural <b>R</b>esearch for <b>L</b>earning and <b>O</b>utcomes. MARLO is an online platform designed to assist CRPs, Platforms and CIAT in their strategic, results-based program planning and reporting of research. MARLO covers the entire cluster cycle from planning to reporting. Features are built into the system to support learning and synthesis at the level of component, {0}, and cross-cutting area. Outcome-focused programmatic reports can be generated from the information entered into MARLO.<br><br> We have created an account for you. Please use the following credentials to access MARLO\: <br><br><b>Link</b>\: {1} <br><b>Select {2} CRP</b> <br><b>Email</b>\: {3}<br><b>Password</b>\: {4}<br><br>In addition, kindly find attached a short user manual that describes MARLO\u2019s main functionalities, user roles and responsibilities, and a brief explanation of the workflow.<br><br>{5}
email.newUser.subject=[AICCRA] Welcome to MARLO - {0}
email.newUser.listRoles=Project Management Committee, Theme leaders, Theme Managers, cluster Leaders, and cluster Coordinators
email.project.assigned=You have been assigned a role in AICCRA as {0} of the cluster ["{2}" ({3})].<br><br>
email.project.assigned=You have been assigned a role in AICCRA as {0} of the cluster "{2}" ({3}).<br><br>
email.project.leader.responsabilities=Clusters leaders are responsible for the following tasks:<ul><li>Entering detailed information about clusters during planning and reporting and submitting them for review. </li></ul><br>
email.project.coordinator.responsabilities=Cluster coordinators are responsible for supporting the cluster leader in entering detailed information related to their respective clusters during planning and reporting.<br><br>Note: Only the cluster leader can submit the cluster information for review.<br><br>
email.region.assigned=You have been assigned a role in AICCRA as Regional Program Leader for {0} - {1} in {2}.<br><br>Regional program leaders may be responsible for the following tasks: <ul><li>Provide strategic directions and coordinate actions at the regional level in collaboration with Thematic and Country Leaders.</li><li>Build on the existing strong strategic partnerships developed in the regions to facilitate effective key partnerships that are crucial for successful project implementation and delivery in the region.</li><li>Support country teams implementing AICCRA in a coordinated manner and with relevant Africa-wide and regional partnerships.</li><li>Review detailed cluster information submitted by cluster leaders at the planning and reporting stages and liaise with the cluster leader for edits if necessary.</li></ul><br>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
INSERT INTO parameters (global_unit_type_id, `key`, `description`, `format`, default_value, category)
VALUES ( '1', 'crp_aiccra_af_start_phase', 'Phase where AICCRA AF starts', '4', '423', '3');
INSERT INTO parameters (global_unit_type_id, `key`, `description`, `format`, default_value, category)
VALUES ( '3', 'crp_aiccra_af_start_phase', 'Phase where AICCRA AF starts', '4', '423', '3');
INSERT INTO parameters (global_unit_type_id, `key`, `description`, `format`, default_value, category)
VALUES ( '4', 'crp_aiccra_af_start_phase', 'Phase where AICCRA AF starts', '4', '423', '3');
1 change: 1 addition & 0 deletions marlo-web/src/main/resources/global.properties
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,7 @@ projectDeliverable.otherContactContributing=Other contact person(s) that will co
projectDeliverable.otherContactContributing.readText=Other contact person(s) that will contribute to this deliverable
project.deliverable.dissemination.alreadyDisseminatedSubQ=Is the deliverable already uploaded to a public repository?
project.deliverable.dissemination.involveParticipantsSub=For those deliverables related to Capacity development events and/or IPI 2.3, this option will be Yes by default. <br>In case you change those parameters you should select NO first and save
project.deliverable.dissemination.involveParticipantsSub.AF=For those deliverables related to Capacity development events and/or IPI 2.5, this option will be Yes by default. <br>In case you change those parameters you should select NO first and save
project.deliverable.dissemination.alreadyDisseminatedQuestion=Is this deliverable already disseminated?
project.deliverable.dissemination.channelInfo=MARLO is continuously working to have interoperability with other more platforms.
project.deliverable.dissemination.selectChannelLabel=Select a dissemination channel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@
<div class="form-group row yesNoInputDeliverable yesNoTrainees">
<span class="col-md-9">
<label class="yesNoLabel" for="">[@s.text name="deliverable.involveParticipants.title" /] [@customForm.req required=(reportingActive) /]</label>
<p><small>[@s.text name="project.deliverable.dissemination.involveParticipantsSub" /] </small></p>
[#if (action.isAFPhase(actualPhase.id))!false]
<p><small>[@s.text name="project.deliverable.dissemination.involveParticipantsSub.AF" /] </small></p>
[#else]
<p><small>[@s.text name="project.deliverable.dissemination.involveParticipantsSub" /] </small></p>
[/#if]
</span>
[#if capacityEventType]
<div class="col-md-3">[@customForm.yesNoInputDeliverableParticipants name="${customName}.hasParticipants" editable=editable inverse=false cssClass="type-involveParticipants text-center" value = "true" /] </div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<div class="simpleBox">
<p>This privacy policy describes how <strong>Personal Data</strong> is being collected, stored and used by MARLO through its online resource. &nbsp;<strong>Personal Data</strong> is any information relating to an identified or identifiable natural person; an identifiable natural person is one who can be identified, directly or indirectly, in particular by reference to an identifier such as name, an identification number, location data, an online identifier, or to one or more factors specific to the physical, psychological, genetic, mental, economic, cultural, or social identify of that natural person.</p>
<p>Please read our privacy policy carefully to get a clear understanding of how we collect, use, protect or otherwise handle your Personally Identifiable Information in our website.</p>
<p>The International Center for Tropical Agriculture (CIAT) on behalf of the Alliance of Bioversity International and the International Center for Tropical Agriculture (CIAT) (hereinafter “The Alliance”) is an international organization with headquarters in Colombia, and the legal entity administering MARLO. As such, it accepts and complies with the personal data protection norms contained in Colombian law and laws of other countries or regions such as the General Data Protection Regulation (GDPR) of the European Union by guaranteeing the protection of personal information provided by you and making every reasonable effort to handle collected information appropriately. Further, all information collected will be handled with care in accordance with Alliance&rsquo;s standards for integrity, transparency and equity.</p>
<p>The International Center for Tropical Agriculture (CIAT) on behalf of the Alliance of Bioversity International and the International Center for Tropical Agriculture (CIAT) (hereinafter “The Alliance”) is an international organization with headquarters in Km 17, recta Cali-Palmira, Valle del Cauca, Colombia, and the legal entity administering MARLO. As such, it accepts and complies with the personal data protection norms contained in Colombian law and laws of other countries or regions such as the General Data Protection Regulation (GDPR) of the European Union by guaranteeing the protection of personal information provided by you and making every reasonable effort to handle collected information appropriately. Further, all information collected will be handled with care in accordance with Alliance&rsquo;s standards for integrity, transparency and equity.</p>

<p><strong>What personal information do we collect from the people who visit our blog, website or app?</strong></p>
<p>When registering or logging in on our site, as appropriate, you may be asked to enter your email address or other details, such as your name and institutional affiliation, ORCID number to help you with your experience. If you provide such information, you should do it voluntarily.</p>
Expand Down Expand Up @@ -125,12 +125,13 @@
<p><a href="mailto:MARLOSupport@cgiar.org">MARLOSupport@cgiar.org</a></p>
<p><br /> <strong>Availability of the privacy policy and updates </strong></p>

<p>This privacy policy is effective as of 20 June 2018, latest amended on 7 October 2021. It is available to you through our website at the URL <a href="https://aiccra.marlo.cgiar.org/legalInformation.do">https://aiccra.marlo.cgiar.org/legalInformation.do</a> for viewing, printing or downloading.</p>
<p>This privacy policy is effective as of 20 June 2018, latest amended on September, 2023. It is available to you through our website at the URL <a href="https://aiccra.marlo.cgiar.org/legalInformation.do">https://aiccra.marlo.cgiar.org/legalInformation.do</a> for viewing, printing or downloading.</p>
<p>The Alliance reserves the right to amend the terms of this policy at any time. We will post a note informing about any updates or amendments to our policy at our website.</p>

<p>First edition: 2018-02-14</p>
<p>Previous edit 2018-06-20</p>
<p>Latest edit on 2021-10-07</p>
<p>Second edition: 2018-06-20</p>
<p>Previous edit on 2021-10-07</p>
<p>Latest edit: 2023-09-15</p>
</div>

<h3 id="termsConditions">Terms and Conditions</h3>
Expand Down Expand Up @@ -163,7 +164,7 @@
<ol>
<li>use it for personal, educational, institutional or commercial purposes;</li>
<li>copy, use, redistribute, modify, and/or sell as long as you use the GNU General Public License as published by the Free Software Foundation; and</li>
<li>install it in as many computers as you wish.</li>
<li>install it on as many computers as you wish.</li>
</ol>

<p>In addition, according to this license, you must:</p>
Expand Down Expand Up @@ -209,7 +210,7 @@

<ol start="7">
<li><strong>Links</strong>
<p>The Alliance may link MARLO website to material hosted by third parties on independent sites and services on the internet. The Alliance is not responsible or liable for the contents or quality of such material. The Alliance has not reviewed the material on such third party sites, and makes no warranties or representations about the material, information, products, or services offered by third parties. Further, the inclusion of any links does not imply endorsement or sponsorship by The Alliance of the site. Use of any such linked website is at the user's own risk.</p>
<p>The Alliance may link MARLO website to material hosted by third parties on independent sites and services on the internet. The Alliance is not responsible or liable for the contents or quality of such material. The Alliance has not reviewed the material on such third party sites, and makes no warranties or representations about the material, information, products, or services offered by third parties. Further, the inclusion of any links does not imply endorsement or sponsorship by the Alliance of the site. Use of any such linked website is at the user's own risk.</p>
</li>
</ol>

Expand Down

0 comments on commit e014d76

Please sign in to comment.