diff --git a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/ProjectActivitiesAction.java b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/ProjectActivitiesAction.java index db61807774..e152fd054e 100644 --- a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/ProjectActivitiesAction.java +++ b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/ProjectActivitiesAction.java @@ -642,8 +642,7 @@ public String save() { List activitiesDB = new ArrayList(); try { activitiesDB = - this.activityManager.getActiveActivitiesByProject(projectBD.getId(), this.getActualPhase().getId()).stream() - .filter(a -> a.isActive() && a.getPhase().equals(this.getActualPhase())).collect(Collectors.toList()); + this.activityManager.getActiveActivitiesByProject(projectBD.getId(), this.getActualPhase().getId()); } catch (Exception e) { logger.info(" unable to get activities from the BD in save function "); } diff --git a/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl b/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl index 0b7213383c..f74ecb0fd8 100644 --- a/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl +++ b/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl @@ -3,11 +3,13 @@ [#assign currentSectionString = "project-${actionName?replace('/','-')}-${projectID}-phase-${(actualPhase.id)!}" /] [#assign pageLibs = [ "datatables.net", "datatables.net-bs"] /] [#assign customJS = [ - "${baseUrlMedia}/js/projects/projectInnovationsList.js?20230306", - "${baseUrlCdn}/global/js/autoSave.js", + "${baseUrlMedia}/js/projects/projectInnovationsList.js?20241218", + [#-- "${baseUrlCdn}/global/js/autoSave.js", --] "${baseUrlCdn}/global/js/fieldsValidation.js" ] /] -[#assign customCSS = ["${baseUrlMedia}/css/projects/projectInnovations.css?20240517"] /] +[#assign customCSS = [ + "${baseUrlMedia}/css/projects/projectInnovations.css?20240517" + ] /] [#assign currentSection = "projects" /] [#assign currentStage = "innovations" /] [#assign isListSection = true /] @@ -36,30 +38,33 @@ [#-- Section Messages --] [#include "/WEB-INF/crp/views/projects/messages-projects.ftl" /] - [#-- Innovations List --] -

[@s.text name="projectInnovations" /]

-
- [@innovationsTableMacro list=(projectInnovations)![] /] -
- - [#-- Add Innovation Button --] - [#if canEdit] -
-
- -
+ [@s.form action=actionName method="POST" enctype="multipart/form-data" cssClass=""] + [#-- Innovations List --] +

[@s.text name="projectInnovations" /]

+
+ [@innovationsTableMacro list=(projectInnovations)![] /]
-
- [/#if] + + [#-- Add Innovation Button --] + [#if canEdit] + + [/#if] - [#-- Previous Innovations List --] -
-

Previous [@s.text name="projectInnovations" /]

-
- [@innovationsTableMacro list=(projectOldInnovations)![] currentTable=false/] -
+ [#-- Previous Innovations List --] +
+

Previous [@s.text name="projectInnovations" /]

+
+ [@innovationsTableMacro list=(projectOldInnovations)![] currentTable=false/] +
+ + [/@s.form]
@@ -76,20 +81,20 @@ ID - [@s.text name="projectInnovations.table.title" /] - [@s.text name="projectInnovations.table.type" /] - [@s.text name="projectInnovations.table.stage" /] + [@s.text name="projectInnovations.table.title" /] + [@s.text name="projectInnovations.table.type" /] + [@s.text name="projectInnovations.table.stage" /] [@s.text name="projectInnovations.table.year" /] [#if action.hasSpecificities('feedback_active') ] Feedback Status [/#if] - Owner + Owner [#if currentTable] - + [/#if] - + [#if currentTable] - + [/#if] diff --git a/marlo-web/src/main/webapp/crp/css/projects/projectInnovations.css b/marlo-web/src/main/webapp/crp/css/projects/projectInnovations.css index 2000ef5844..be6fe32858 100644 --- a/marlo-web/src/main/webapp/crp/css/projects/projectInnovations.css +++ b/marlo-web/src/main/webapp/crp/css/projects/projectInnovations.css @@ -133,13 +133,11 @@ table ul { /** MARLO Responsibe Tables */ .table-responsive table { - min-width: 1500px; margin-bottom: 0; } .table-responsive { border: 1px solid #ddd; - max-height: 500px; } .table > thead > tr > th { diff --git a/marlo-web/src/main/webapp/crp/js/projects/projectInnovationsList.js b/marlo-web/src/main/webapp/crp/js/projects/projectInnovationsList.js index c267ce075d..f1b49810ad 100644 --- a/marlo-web/src/main/webapp/crp/js/projects/projectInnovationsList.js +++ b/marlo-web/src/main/webapp/crp/js/projects/projectInnovationsList.js @@ -2,6 +2,12 @@ $(document).ready(function() { // Add Data Table addDataTable(); + + // Add click event to tsURL links + $('a[href*="/projects"]').on('click', function() { + const loadingElement = $('.container_page_load'); + loadingElement.show(); + }); }); function addDataTable() {