Skip to content

Commit

Permalink
Merge pull request #55 in ESPD/espd from hotfix_alpha to develop
Browse files Browse the repository at this point in the history
* commit 'a8abd7812e7ca2de604342f375e023d14b8d9404':
  #160 #169 release date update
  #160 #169 release notes for 2017.03.03
  # WARNING: head commit changed in the meantime
  #169 add 3rd case for alpha
  #169 add alpha and no-alpha cases
  • Loading branch information
dg-grow-alexey-lukashov committed May 17, 2017
2 parents 2260943 + a8abd78 commit c0f6dd5
Show file tree
Hide file tree
Showing 44 changed files with 368 additions and 172 deletions.
2 changes: 1 addition & 1 deletion espd-docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<parent>
<artifactId>espd</artifactId>
<groupId>eu.europa.ec.grow.espd</groupId>
<version>2017.03.02</version>
<version>2017.03.03</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion espd-docs/src/main/asciidoc/configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:homepage: https://ec.europa.eu/espd[ESPD]
:espd: https://ec.europa.eu/espd[ESPD]
:edm: https://github.com/ESPD/ESPD-EDM[ESPD-EDM]
:appVersion: 2017.03.02
:appVersion: 2017.03.03
:maven: https://maven.apache.org[Maven]
:tomcat: https://tomcat.apache.org[Tomcat]
:springBoot: http://projects.spring.io/spring-boot/[Spring Boot]
Expand Down
4 changes: 2 additions & 2 deletions espd-docs/src/main/asciidoc/espd.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
Alexey Lukashov +
Virgiliu Ratoi

v2017.03.02, 04-05-2017
v2017.03.03, 17-05-2017

:sourcedir: ../java/eu/europa/ec/grow/espd
:homepage: https://ec.europa.eu/espd[ESPD]
:espd: https://ec.europa.eu/espd[ESPD]
:appVersion: 2017.03.02
:appVersion: 2017.03.03
:maven: https://maven.apache.org[Maven 3]
:tomcat: https://tomcat.apache.org[Tomcat 7+]
:springBoot: http://projects.spring.io/spring-boot/[Spring Boot]
Expand Down
2 changes: 1 addition & 1 deletion espd-docs/src/main/asciidoc/installation.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:sourcedir: ../java/eu/europa/ec/grow/espd
:homepage: https://ec.europa.eu/espd[ESPD]
:espd: https://ec.europa.eu/espd[ESPD]
:appVersion: 2017.03.02
:appVersion: 2017.03.03
:maven: https://maven.apache.org[Maven]
:tomcat: https://tomcat.apache.org[Tomcat]
:springBoot: http://projects.spring.io/spring-boot/[Spring Boot]
Expand Down
8 changes: 8 additions & 0 deletions espd-docs/src/main/asciidoc/releaseNotes.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
== Release notes

=== 2017.03.03 (17th of May 2017)

==== Enhancement

* https://github.com/ESPD/ESPD-Service/issues/160[EO can only 'alpha' criterion when CA selects 'alpha']
* https://github.com/ESPD/ESPD-Service/issues/169[shows the YES if selecting NO in part IV Selection Criteria]


=== 2017.03.02 (5th of May 2017)

==== Bug
Expand Down
4 changes: 2 additions & 2 deletions espd-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<artifactId>espd</artifactId>
<groupId>eu.europa.ec.grow.espd</groupId>
<version>2017.03.02</version>
<version>2017.03.03</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>espd-web</artifactId>
Expand Down Expand Up @@ -183,7 +183,7 @@
</includes>
</bannedDependencies>
<requireMavenVersion>
<version>[3.0.3,3.5.0)</version>
<version>[3.0.3,3.5.0]</version>
</requireMavenVersion>
<requireJavaVersion>
<version>${java.version}</version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,26 @@ public class EspdDocument {

private List<CriterionType> ublCriteria;

public final boolean atLeastOneSelectionCriterionWasSelected() {
boolean atLeastOnePresent = false;
for (SelectionCriterion ccvCriterion :
SelectionCriterion.values()) {
public final boolean getAtLeastOneSelectionCriterionWasSelected() {
for (SelectionCriterion ccvCriterion : SelectionCriterion.values()) {
EspdCriterion espdCriterion = readCriterionFromEspd(ccvCriterion);
atLeastOnePresent = atLeastOnePresent | (espdCriterion != null && espdCriterion.getExists());
if(espdCriterion != null && espdCriterion.getExists()) {
return true;
}
}
return atLeastOnePresent;
return false;
}

public final boolean getAllSelectionCriterionWasSelectedExceptAlpha() {
for (SelectionCriterion ccvCriterion : SelectionCriterion.values()) {
if(!SelectionCriterion.ALL_SELECTION_CRITERIA_SATISFIED.getUuid().equals(ccvCriterion.getUuid())) {
EspdCriterion espdCriterion = readCriterionFromEspd(ccvCriterion);
if(espdCriterion == null || !espdCriterion.getExists()) {
return false;
}
}
}
return true;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ public Boolean getAnswer() {
// the satisfies all criterion has special behaviour so the default value should be null
return this.answer;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,4 @@ public CcvLegislation getLegislation() {
public CcvCriterionType getCriterionType() {
return this.criterionType;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private List<CriterionType> addExclusionCriteria(EspdDocument espdDocument) {
private List<CriterionType> addSelectionCriteria(EspdDocument espdDocument) {

List<CriterionType> criterionTypes = new ArrayList<>(SelectionCriterion.values().length + 1);
if (!espdDocument.atLeastOneSelectionCriterionWasSelected()) {
if (!espdDocument.getAtLeastOneSelectionCriterionWasSelected()) {
// Option 3:
// CA selects no selection criteria -> EO sees all selection criteria (including "All selection criteria")
for (SelectionCriterion criterion : SelectionCriterion.values()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,19 @@
<div class="checkbox criteria-row-check">
<div class="form-group" style="margin-bottom: 0px;">
<div class="col-md-12">
<label>
<c:if test="${is_always_checked}">
<form:checkbox path="${field}.exists" checked="checked" onclick="return false"/>
</c:if>
<c:if test="${!is_always_checked}">
<label class="checkbox-inline">
<c:if test="${is_always_checked}">
<form:checkbox path="${field}.exists" checked="checked" disabled="true"/>
</c:if>
<c:if test="${!is_always_checked}">
<form:checkbox path="${field}.exists"/>
</c:if>
</c:if>
<b>${span18n[title_code]}</b>
</label>
<c:if test="${not empty description_code}">
<span class="small" data-i18n="${description_code}"><s:message code='${description_code}'/></span>
<p>
<span class="small" data-i18n="${description_code}"><s:message code='${description_code}'/></span>
</p>
</c:if>
</div>
<c:if test="${hasCriterion == true}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
<tiles:importAttribute name="disableTooltips"/>
<tiles:importAttribute name="criteriaList"/>

<c:set var="atLeastOneCriterionExists" value="false"/>
<c:set var="atLeastOneCriterionExists" value="${false}"/>
<c:forEach var="criterion" items="${criteriaList}">
<c:set var="atLeastOneCriterionExists" value="${atLeastOneCriterionExists || espd[criterion.field].exists}"/>
<c:set var="atLeastOneCriterionExists" value="${atLeastOneCriterionExists || (espd[criterion.field].exists == true)}"/>
</c:forEach>
<c:if test="${agent eq 'ca'}">
<c:set var="atLeastOneCriterionExists" value="true"/>
<c:if test="${(agent eq 'ca') && printingjsp != true}">
<c:set var="atLeastOneCriterionExists" value="${true}"/>
</c:if>
<c:if test="${atLeastOneCriterionExists}">
<div class="panel panel-espd">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@

<script>
var pageLanguage = "${pageContext.response.locale}".toLowerCase();
function dataShow() {
var elems = $(this).attr("data-target-show").split(";")
for (i in elems) {
$(elems[i]).fadeIn();
}
}
function dataHide() {
var elems = $(this).attr("data-target-hide").split(";")
for (i in elems) {
$(elems[i]).hide();
}
}
$(function () {
validator(defaultValidators, "required", "${i18n['validator_required']}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,28 +307,26 @@ request.setAttribute("qualityAssuranceListEO", CriteriaTemplates.qualityAssuranc
<tiles:insertDefinition name="topLevelCriteriaTemplate">
<tiles:putAttribute name="topLevelCriteriaList" value="${exclusionEO}"/>
</tiles:insertDefinition>

<div class="panel panel-espd">
<div class="panel-heading" data-toggle="collapse" data-target="#ca-insolvency-section">
<h4 class="panel-title">${span18n['crit_top_title_purely_national']}</h4>
</div>
<div id="ca-insolvency-section" class="collapse in">
<div class="espd-panel-body panel-body">
<span data-i18n="crit_eu_main_breaching_obligations" style="font-weight: bold;">
<s:message code='crit_eu_main_purely_national'/>
</span>
<c:if test="${espd.purelyNationalGrounds != null && espd.purelyNationalGrounds.exists}">
<tiles:insertDefinition name="exclusionFormTemplate">
<tiles:putAttribute name="field" value="purelyNationalGrounds"/>
<tiles:putAttribute name="title_code" value="crit_eu_title_purely_national"/>
<tiles:putAttribute name="description_code" value="crit_eu_text_purely_national"/>
<tiles:putAttribute name="selfCleaning" value="false"/>
<tiles:putAttribute name="hasCriterion" value="false"/>
</tiles:insertDefinition>
</c:if>
</div>
</div>
</div>

<c:if test="${espd.purelyNationalGrounds != null && espd.purelyNationalGrounds.exists}">
<div class="panel panel-espd">
<div class="panel-heading" data-toggle="collapse" data-target="#ca-insolvency-section">
<h4 class="panel-title">${span18n['crit_top_title_purely_national']}</h4>
</div>
<div id="ca-insolvency-section" class="collapse in">
<div class="espd-panel-body panel-body">
<b>${span18n['crit_eu_main_purely_national']}</b>
<tiles:insertDefinition name="exclusionFormTemplate">
<tiles:putAttribute name="field" value="purelyNationalGrounds"/>
<tiles:putAttribute name="title_code" value="crit_eu_title_purely_national"/>
<tiles:putAttribute name="description_code" value="crit_eu_text_purely_national"/>
<tiles:putAttribute name="selfCleaning" value="false"/>
<tiles:putAttribute name="hasCriterion" value="false"/>
</tiles:insertDefinition>
</div>
</div>
</div>
</c:if>
</div>

<%-- SELECTION --%>
Expand All @@ -352,21 +350,29 @@ request.setAttribute("qualityAssuranceListEO", CriteriaTemplates.qualityAssuranc
<h4 class="panel-title">${span18n['all_selection_switch']}</h4>
</div>
<div id="eo-satisfies-all-section" class="collapse in">
<div class="espd-panel-body panel-body">
${span18n['crit_selection_ca_declares_that']}
<div class="checkbox">
<label>
<c:if test="${espd.selectionSatisfiesAll.exists}">
<input type="checkbox" class="checktoggle" checked="checked"/>
</c:if>
<c:if test="${!espd.selectionSatisfiesAll.exists}">
<input type="checkbox" class="checktoggle"/>
</c:if>

${span18n['crit_selection_satisfies_all_criteria']}
</label>
<div class="espd-panel-body panel-body">
<strong>${span18n['crit_selection_eo_declares_that']}</strong>
<span data-i18n="crit_selection_eo_declares_that_tooltip" data-toggle="tooltip" title="${i18n['crit_selection_eo_declares_that_tooltip']}"></span>

<div class="row criteria-row-form">
<div class="col-md-5 criteria-row-check-left">
<div class="form-group">
<div class="col-md-12">
<strong>${span18n['crit_selection_eo_satisfies_all_criteria']}</strong>
</div>
</div>
</div>
<div class="col-md-7 criteria-row-check-right">
<div class="col-md-12">
<div class="form-group">
${span18n["crit_your_answer"]}
<form:radiobutton path="selectionSatisfiesAll.answer" value="true"/>${span18n["yes"]}
<form:radiobutton path="selectionSatisfiesAll.answer" value="false"/>${span18n["no"]}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</c:if>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,8 @@
<div class="form-group">
<label class="control-label col-md-6">${span18n['createeo_if_proc_reserved']}</label>
<div class="col-md-6">
<form:radiobutton path="procurementReserved.answer" value="true"
data-target-show="#disworkers-form"/>${span18n["yes"]}
<form:radiobutton path="procurementReserved.answer" value="false"
data-target-hide="#disworkers-form"/>${span18n["no"]}
<form:radiobutton path="procurementReserved.answer" value="true" data-target-show="#disworkers-form"/>${span18n["yes"]}
<form:radiobutton path="procurementReserved.answer" value="false" data-target-hide="#disworkers-form"/>${span18n["no"]}
</div>
</div>
</div>
Expand All @@ -211,7 +209,7 @@
<form:textarea rows="1" cssClass="form-control" path="procurementReserved.doubleValue1"
number="true"/>
</div>
</div>
</div>s
<div class="form-group">
<label class="control-label col-md-6">${span18n['createeo_disworkers_details']}</label>
<div class="col-md-6">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@

<%request.setAttribute("selectionCA", eu.europa.ec.grow.espd.xml.CriteriaTemplates.selectionCA);%>

<script>
$(function () {
$("input[name='usealpha']").change(function(){
if(this.value == false || this.value == "false") {
$('#usealpha-checkbox').attr('checked', false);
}
});
});
</script>

<tiles:importAttribute name="flow"/>

<c:set var="usealpha" value="${espd.selectionSatisfiesAll != null && espd.selectionSatisfiesAll.exists}"/>
Expand All @@ -62,18 +52,11 @@
<span data-i18n="createcasel_header"><s:message code="createcasel_header"/></span>
</h2>
</div>
<div class="alert alert-espd-info-dotted"
<div class="alert alert-espd-info-dotted">
${span18n['createcasel_alert']}

<label class="control-label">${span18n['question_to_use_alpha']}</label>
<c:if test="${usealpha}">
<input name="usealpha" data-target-show="#ca-selection-criteria" data-target-hide="#alpha-criterion" type="radio" value="false">${span18n['yes']}
<input name="usealpha" data-target-show="#alpha-criterion" data-target-hide="#ca-selection-criteria" type="radio" value="true" checked="checked">${span18n['no']}
</c:if>
<c:if test="${!usealpha}">
<input name="usealpha" data-target-show="#ca-selection-criteria" data-target-hide="#alpha-criterion" type="radio" value="false" checked="checked">${span18n['yes']}
<input name="usealpha" data-target-show="#alpha-criterion" data-target-hide="#ca-selection-criteria" type="radio" value="true">${span18n['no']}
</c:if>
<form:radiobutton name="usealpha" path="selectionSatisfiesAll.exists" data-target-show="#ca-selection-criteria" data-target-hide="#alpha-criterion" value="false"/>${span18n['yes']}
<form:radiobutton name="usealpha" path="selectionSatisfiesAll.exists" data-target-show="#alpha-criterion" data-target-hide="#ca-selection-criteria" value="true"/>${span18n['no']}
</div>

<div id="alpha-criterion" class="panel panel-espd" style="${usealpha?'':'display:none'}">
Expand All @@ -86,15 +69,15 @@
<span data-i18n="crit_selection_declares_that_tooltip" data-toggle="tooltip" title="${i18n['crit_selection_declares_that_tooltip']}"></span>
<div class="checkbox">
<label>
<form:checkbox id="usealpha-checkbox" path="selectionSatisfiesAll.exists" class="checktoggle" value="true"/>
<input type="checkbox" checked="checked" disabled readonly/>
${span18n['crit_selection_satisfies_all_criteria']}
</label>
</div>
</div>
</div>
</div>

<div class="tab-pane active" id="ca-selection-criteria" style="${usealpha?'display:none':''}">
<div id="ca-selection-criteria" class="tab-pane active" style="${usealpha?'display:none':''}">
<tiles:insertDefinition name="topLevelCriteriaTemplate">
<tiles:putAttribute name="topLevelCriteriaList" value="${selectionCA}"/>
</tiles:insertDefinition>
Expand Down
Loading

0 comments on commit c0f6dd5

Please sign in to comment.