Skip to content

Commit

Permalink
Merge branch 'aiccra-staging' into aiccra-feature-A2-1047-other-MELIA…
Browse files Browse the repository at this point in the history
…-studies
  • Loading branch information
kenjitm committed Dec 19, 2024
2 parents 98f15fc + 8b7d9d4 commit 9f8d4af
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,7 @@ public String save() {
List<Activity> activitiesDB = new ArrayList<Activity>();
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 ");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 /]
Expand Down Expand Up @@ -36,30 +38,33 @@
[#-- Section Messages --]
[#include "/WEB-INF/crp/views/projects/messages-projects.ftl" /]

[#-- Innovations List --]
<h3 class="headTitle">[@s.text name="projectInnovations" /]</h3>
<div class="simpleBox table-responsive">
[@innovationsTableMacro list=(projectInnovations)![] /]
</div>

[#-- Add Innovation Button --]
[#if canEdit]
<div class="buttons">
<div class="buttons-content">
<div class="addInnovation button-blue"><a href="[@s.url namespace="/${currentSection}" action='${(crpSession)!}/addNewInnovation'][@s.param name="projectID"]${projectID}[/@s.param][#include "/WEB-INF/global/pages/urlGlobalParams.ftl" /][/@s.url]">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> [@s.text name="form.buttons.addInnovation" /]
</a></div>
<div class="clearfix"></div>
[@s.form action=actionName method="POST" enctype="multipart/form-data" cssClass=""]
[#-- Innovations List --]
<h3 class="headTitle">[@s.text name="projectInnovations" /]</h3>
<div class="simpleBox table-responsive">
[@innovationsTableMacro list=(projectInnovations)![] /]
</div>
</div>
[/#if]

[#-- Add Innovation Button --]
[#if canEdit]
<div class="buttons">
<div class="buttons-content">
<div class="addInnovation button-blue"><a href="[@s.url namespace="/${currentSection}" action='${(crpSession)!}/addNewInnovation'][@s.param name="projectID"]${projectID}[/@s.param][#include "/WEB-INF/global/pages/urlGlobalParams.ftl" /][/@s.url]">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> [@s.text name="form.buttons.addInnovation" /]
</a></div>
<div class="clearfix"></div>
</div>
</div>
[/#if]

[#-- Previous Innovations List --]
<br />
<h3 class="headTitle">Previous [@s.text name="projectInnovations" /]</h3>
<div class="simpleBox table-responsive">
[@innovationsTableMacro list=(projectOldInnovations)![] currentTable=false/]
</div>
[#-- Previous Innovations List --]
<br />
<h3 class="headTitle">Previous [@s.text name="projectInnovations" /]</h3>
<div class="simpleBox table-responsive">
[@innovationsTableMacro list=(projectOldInnovations)![] currentTable=false/]
</div>
<input type="hidden" name="projectID" value="${projectID}" />
[/@s.form]


</div>
Expand All @@ -76,20 +81,20 @@
<thead>
<tr class="subHeader">
<th id="tb-id" width="1%">ID</th>
<th id="tb-title" width="40%">[@s.text name="projectInnovations.table.title" /]</th>
<th id="tb-type" width="22%">[@s.text name="projectInnovations.table.type" /]</th>
<th id="tb-stage" width="15%">[@s.text name="projectInnovations.table.stage" /]</th>
<th id="tb-title" width="10%">[@s.text name="projectInnovations.table.title" /]</th>
<th id="tb-type" width="10%">[@s.text name="projectInnovations.table.type" /]</th>
<th id="tb-stage" width="10%">[@s.text name="projectInnovations.table.stage" /]</th>
<th id="tb-year" width="8%">[@s.text name="projectInnovations.table.year" /]</th>
[#if action.hasSpecificities('feedback_active') ]
<th id="feedbackStatus">Feedback Status</th>
[/#if]
<th class="owner">Owner</th>
<th class="owner" width="10%">Owner</th>
[#if currentTable]
<th></th>
<th width="1%"></th>
[/#if]
<th id="projectDownload" class="no-sort"></th>
<th id="projectDownload" width="1%" class="no-sort"></th>
[#if currentTable]
<th id="tb-remove" width="4%" class="no-sort"></th>
<th id="tb-remove" width="1%" class="no-sort"></th>
[/#if]
</tr>
</thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 9f8d4af

Please sign in to comment.