Commit a9ba51d3 authored by Matija Obreza's avatar Matija Obreza

Display country ITPGRFA status

parent fb5a5b12
......@@ -96,4 +96,6 @@ public interface GeoService {
*/
ITPGRFAStatus updateITPGRFA(Country country, String contractingParty, String membership, String membershipBy, String nameOfNFP);
ITPGRFAStatus getITPGRFAStatus(Country country);
}
......@@ -362,6 +362,11 @@ public class GeoServiceImpl implements GeoService {
return jsonArray;
}
@Override
public ITPGRFAStatus getITPGRFAStatus(Country country) {
return itpgrfaRepository.findByCountry(country);
}
@Override
@Transactional(readOnly = false)
public ITPGRFAStatus updateITPGRFA(Country country, String contractingParty, String membership, String membershipBy, String nameOfNFP) {
......
......@@ -77,6 +77,7 @@ public class CountryController extends BaseController {
throw new ResourceNotFoundException();
}
model.addAttribute("country", country);
model.addAttribute("itpgrfa", geoService.getITPGRFAStatus(country));
model.addAttribute("blurp", contentService.getArticle(country, "blurp", getLocale()));
......
......@@ -108,6 +108,7 @@ country.statistics=Country statistics
country.accessions.from=Accessions collected in {0}
country.more-information=More information:
country.replaced-by=Country code is replaced by: {0}
country.is-itpgrfa-contractingParty={0} is signatory to the International Treaty on Plant Genetic Resources for Food and Agriculture (ITPGRFA).
select-country=Select country
faoInstitutes.page.list.title=WIEWS Institutes
......
......@@ -40,6 +40,12 @@
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
<c:if test="${itpgrfa != null and itpgrfa.contractingParty=='Yes'}">
<div class="alert alert-info">
<spring:message code="country.is-itpgrfa-contractingParty" arguments="${country.getName(pageContext.response.locale)}" argumentSeparator="|" />
</div>
</c:if>
<div>
ISO-3166 3-alpha:
<c:out value="${country.code3}" />
......@@ -52,7 +58,7 @@
<a target="_blank" rel="nofollow" href="<c:out value="${country.wikiLink}" />"><c:out value="${country.wikiLink}" /></a>
</div>
</c:if>
<%-- <h3>
<spring:message code="country.statistics" />
</h3>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment