Commit d4e9d562 authored by Matija Obreza's avatar Matija Obreza
Browse files

Use case insensitive WIEWS and ISO3 codes

parent 962bbbcd
...@@ -61,6 +61,11 @@ public class CountryController extends BaseController { ...@@ -61,6 +61,11 @@ public class CountryController extends BaseController {
@RequestMapping("/{country}") @RequestMapping("/{country}")
public String view(ModelMap model, @PathVariable(value = "country") String countryStr) { public String view(ModelMap model, @PathVariable(value = "country") String countryStr) {
_logger.debug("Viewing country " + countryStr); _logger.debug("Viewing country " + countryStr);
if (!countryStr.toUpperCase().equals(countryStr)) {
return "redirect:/geo/" + countryStr.toUpperCase();
}
Country country = geoService.getCountry(countryStr); Country country = geoService.getCountry(countryStr);
if (country == null) { if (country == null) {
throw new ResourceNotFoundException(); throw new ResourceNotFoundException();
...@@ -111,7 +116,7 @@ public class CountryController extends BaseController { ...@@ -111,7 +116,7 @@ public class CountryController extends BaseController {
geoService.updateBlurp(country, blurp, getLocale()); geoService.updateBlurp(country, blurp, getLocale());
return "redirect:/geo/" + country.getCode3().toLowerCase(); return "redirect:/geo/" + country.getCode3();
} }
@RequestMapping("/{country}/data") @RequestMapping("/{country}/data")
......
...@@ -92,6 +92,11 @@ public class WiewsController extends BaseController { ...@@ -92,6 +92,11 @@ public class WiewsController extends BaseController {
@RequestMapping("/{wiewsCode}") @RequestMapping("/{wiewsCode}")
public String view(ModelMap model, @PathVariable(value = "wiewsCode") String wiewsCode) { public String view(ModelMap model, @PathVariable(value = "wiewsCode") String wiewsCode) {
_logger.debug("Viewing institute " + wiewsCode); _logger.debug("Viewing institute " + wiewsCode);
if (!wiewsCode.toUpperCase().equals(wiewsCode)) {
return "redirect:/wiews/" + wiewsCode.toUpperCase();
}
FaoInstitute faoInstitute = instituteService.getInstitute(wiewsCode); FaoInstitute faoInstitute = instituteService.getInstitute(wiewsCode);
if (faoInstitute == null) { if (faoInstitute == null) {
throw new ResourceNotFoundException(); throw new ResourceNotFoundException();
......
...@@ -44,10 +44,10 @@ ...@@ -44,10 +44,10 @@
<a href="<c:url value="/c/${filters[by].shortName}" />">${filters[by].getName(pageContext.response.locale)}</a> <a href="<c:url value="/c/${filters[by].shortName}" />">${filters[by].getName(pageContext.response.locale)}</a>
</c:when> </c:when>
<c:when test="${clazz eq 'Country'}"> <c:when test="${clazz eq 'Country'}">
<a href="<c:url value="/geo/${filters[by].code3.toLowerCase()}" />"><c:out value="${filters[by].getName(pageContext.response.locale)}" /></a> <a href="<c:url value="/geo/${filters[by].code3}" />"><c:out value="${filters[by].getName(pageContext.response.locale)}" /></a>
</c:when> </c:when>
<c:when test="${clazz eq 'FaoInstitute'}"> <c:when test="${clazz eq 'FaoInstitute'}">
<a href="<c:url value="/wiews/${filters[by].code.toLowerCase()}" />"><c:out value="${filters[by].fullName}" /></a> <a href="<c:url value="/wiews/${filters[by].code}" />"><c:out value="${filters[by].fullName}" /></a>
</c:when> </c:when>
<c:when test="${clazz eq 'Organization'}"> <c:when test="${clazz eq 'Organization'}">
<a href="<c:url value="/org/${filters[by].slug}" />"><c:out value="${filters[by].title}" /></a> <a href="<c:url value="/org/${filters[by].slug}" />"><c:out value="${filters[by].title}" /></a>
...@@ -86,11 +86,11 @@ ...@@ -86,11 +86,11 @@
<td><a href="<c:url value="/acn/id/${accession.id}" />"><b><c:out value="${accession.accessionName}" /></b></a></td> <td><a href="<c:url value="/acn/id/${accession.id}" />"><b><c:out value="${accession.accessionName}" /></b></a></td>
<%-- <td><a href="<c:url value="/acn/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />"><c:out value="${accession.taxonomy.taxonName}" /></a></td> --%> <%-- <td><a href="<c:url value="/acn/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />"><c:out value="${accession.taxonomy.taxonName}" /></a></td> --%>
<td><c:out value="${accession.taxonomy.taxonName}" /></td> <td><c:out value="${accession.taxonomy.taxonName}" /></td>
<%-- <td class="notimportant"><a href="<c:url value="/geo/${accession.origin.toLowerCase()}" />"><c:out value="${accession.countryOfOrigin.name}" /></a></td> --%> <%-- <td class="notimportant"><a href="<c:url value="/geo/${accession.origin}" />"><c:out value="${accession.countryOfOrigin.name}" /></a></td> --%>
<td class="notimportant"><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></td> <td class="notimportant"><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></td>
<td class="notimportant"><spring:message code="accession.sampleStatus.${accession.sampleStatus}" /></td> <td class="notimportant"><spring:message code="accession.sampleStatus.${accession.sampleStatus}" /></td>
<td class="notimportant"><a href="<c:url value="/wiews/${accession.institute.code.toLowerCase()}" />"><c:out value="${accession.institute.code}" /></a></td> <td class="notimportant"><a href="<c:url value="/wiews/${accession.institute.code}" />"><c:out value="${accession.institute.code}" /></a></td>
<%-- <td><a href="<c:url value="/geo/${accession.institute.country.code3.toLowerCase()}" />"><c:out value="${accession.institute.country.name}" /></a></td> <%-- <td><a href="<c:url value="/geo/${accession.institute.country.code3}" />"><c:out value="${accession.institute.country.name}" /></a></td>
--%> --%>
</tr> </tr>
</c:forEach> </c:forEach>
......
...@@ -76,12 +76,12 @@ ...@@ -76,12 +76,12 @@
<tbody> <tbody>
<tr> <tr>
<td><spring:message code="accession.holdingInstitute" /></td> <td><spring:message code="accession.holdingInstitute" /></td>
<td><a property="dwc:instituteId" href="<c:url value="/wiews/${accession.instituteCode.toLowerCase()}" />"> <c:out value="${accession.institute.fullName}" /> <td><a property="dwc:instituteId" href="<c:url value="/wiews/${accession.instituteCode}" />"> <c:out value="${accession.institute.fullName}" />
</a></td> </a></td>
</tr> </tr>
<tr> <tr>
<td><spring:message code="accession.holdingCountry" /></td> <td><spring:message code="accession.holdingCountry" /></td>
<td><a href="<c:url value="/geo/${accession.institute.country.code3.toLowerCase()}" />"><c:out value="${accession.institute.country.getName(pageContext.response.locale)}" /></a></td> <td><a href="<c:url value="/geo/${accession.institute.country.code3}" />"><c:out value="${accession.institute.country.getName(pageContext.response.locale)}" /></a></td>
</tr> </tr>
<tr> <tr>
<td><spring:message code="accession.accessionName" /></td> <td><spring:message code="accession.accessionName" /></td>
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<c:if test="${accession.countryOfOrigin ne null}"> <c:if test="${accession.countryOfOrigin ne null}">
<tr> <tr>
<td><spring:message code="accession.origin" /></td> <td><spring:message code="accession.origin" /></td>
<td><img src="<c:url value="${cdnFlagsUrl}" />/${accession.origin.toUpperCase()}.png" /> <a href="<c:url value="/geo/${accession.origin.toLowerCase()}" />"> <c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /> <td><img src="<c:url value="${cdnFlagsUrl}" />/${accession.origin.toUpperCase()}.png" /> <a href="<c:url value="/geo/${accession.origin}" />"> <c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" />
</a></td> </a></td>
</tr> </tr>
</c:if> </c:if>
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
<td><spring:message code="taxonomy.species" /></td> <td><spring:message code="taxonomy.species" /></td>
<td><a href="<c:url value="/acn/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />"><c:out value="${accession.taxonomy.genus} ${accession.taxonomy.species}" /></a> <td><a href="<c:url value="/acn/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />"><c:out value="${accession.taxonomy.genus} ${accession.taxonomy.species}" /></a>
<br /> <br />
<a href="<c:url value="/wiews/${accession.institute.code.toLowerCase()}/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />"><spring:message code="accession.taxonomy-at-institute" arguments="${accession.taxonomy.genus} ${accession.taxonomy.species}|||${accession.institute.code}" argumentSeparator="|||" /></a> <a href="<c:url value="/wiews/${accession.institute.code}/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />"><spring:message code="accession.taxonomy-at-institute" arguments="${accession.taxonomy.genus} ${accession.taxonomy.species}|||${accession.institute.code}" argumentSeparator="|||" /></a>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
<div> <div>
<c:out value="${accessionAlias.name}" /> <c:out value="${accessionAlias.name}" />
<c:if test="${accessionAlias.instCode != ''}"> <c:if test="${accessionAlias.instCode != ''}">
<a href="<c:url value="/wiews/${accessionAlias.instCode.toLowerCase()}" />"> <a href="<c:url value="/wiews/${accessionAlias.instCode}" />">
${accessionAlias.instCode} ${accessionAlias.instCode}
</a> </a>
</c:if> </c:if>
......
...@@ -238,11 +238,11 @@ ...@@ -238,11 +238,11 @@
<td><a href="<c:url value="/acn/id/${accession.id}" />"><b><c:out value="${accession.accessionName}" /></b></a></td> <td><a href="<c:url value="/acn/id/${accession.id}" />"><b><c:out value="${accession.accessionName}" /></b></a></td>
<%-- <td><a href="<c:url value="/acn/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />"><c:out value="${accession.taxonomy.taxonName}" /></a></td> --%> <%-- <td><a href="<c:url value="/acn/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />"><c:out value="${accession.taxonomy.taxonName}" /></a></td> --%>
<td><c:out value="${accession.taxonomy.taxonName}" /></td> <td><c:out value="${accession.taxonomy.taxonName}" /></td>
<%-- <td class="notimportant"><a href="<c:url value="/geo/${accession.origin.toLowerCase()}" />"><c:out value="${accession.countryOfOrigin.name}" /></a></td> --%> <%-- <td class="notimportant"><a href="<c:url value="/geo/${accession.origin}" />"><c:out value="${accession.countryOfOrigin.name}" /></a></td> --%>
<td class="notimportant"><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></td> <td class="notimportant"><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></td>
<td class="notimportant"><spring:message code="accession.sampleStatus.${accession.sampleStatus}" /></td> <td class="notimportant"><spring:message code="accession.sampleStatus.${accession.sampleStatus}" /></td>
<td class="notimportant"><a href="<c:url value="/wiews/${accession.institute.code.toLowerCase()}" />"><c:out value="${accession.institute.code}" /></a></td> <td class="notimportant"><a href="<c:url value="/wiews/${accession.institute.code}" />"><c:out value="${accession.institute.code}" /></a></td>
<%-- <td><a href="<c:url value="/geo/${accession.institute.country.code3.toLowerCase()}" />"><c:out value="${accession.institute.country.name}" /></a></td> <%-- <td><a href="<c:url value="/geo/${accession.institute.country.code3}" />"><c:out value="${accession.institute.country.name}" /></a></td>
--%> --%>
</tr> </tr>
</c:forEach> </c:forEach>
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<td><a href="<c:url value="/acn/id/${accession.id}" />"><b><c:out value="${accession.accessionName}" /></b></a></td> <td><a href="<c:url value="/acn/id/${accession.id}" />"><b><c:out value="${accession.accessionName}" /></b></a></td>
<td><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></td> <td><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></td>
<td><c:out value="${accession.taxonomy.taxonName}" /></td> <td><c:out value="${accession.taxonomy.taxonName}" /></td>
<td><a href="<c:url value="/wiews/${accession.institute.code.toLowerCase()}" />"><c:out value="${accession.institute.code}" /></a></td> <td><a href="<c:url value="/wiews/${accession.institute.code}" />"><c:out value="${accession.institute.code}" /></a></td>
<td><a href="<c:url value="/geo/${accession.institute.country.code3.toLowerCase()}" />"><c:out value="${accession.institute.country.getName(pageContext.response.locale)}" /></a></td> <td><a href="<c:url value="/geo/${accession.institute.country.code3}" />"><c:out value="${accession.institute.country.getName(pageContext.response.locale)}" /></a></td>
</tr> </tr>
</c:forEach> </c:forEach>
</tbody> </tbody>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</div> </div>
<input type="submit" value="<spring:message code="blurp.update-blurp"/>" class="btn btn-primary" /> <input type="submit" value="<spring:message code="blurp.update-blurp"/>" class="btn btn-primary" />
<a href="<c:url value="/geo/${country.code3.toLowerCase()}" />" class="btn btn-default"> <spring:message code="cancel" /> <a href="<c:url value="/geo/${country.code3}" />" class="btn btn-default"> <spring:message code="cancel" />
</a> </a>
<!-- CSRF protection --> <!-- CSRF protection -->
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/> <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<spring:message code="country.page.not-current" /> <spring:message code="country.page.not-current" />
<c:if test="${country.replacedBy != null}"> <c:if test="${country.replacedBy != null}">
<spring:message code="country.replaced-by" arguments="${country.replacedBy.code3}" /> <spring:message code="country.replaced-by" arguments="${country.replacedBy.code3}" />
<a href="${country.replacedBy.code3.toLowerCase()}"><c:out value="${country.replacedBy.getName(pageContext.response.locale)}" /></a> <a href="${country.replacedBy.code3}"><c:out value="${country.replacedBy.getName(pageContext.response.locale)}" /></a>
</c:if> </c:if>
</div> </div>
</c:if> </c:if>
...@@ -25,12 +25,12 @@ ...@@ -25,12 +25,12 @@
<div class="jumbotron"> <div class="jumbotron">
<spring:message code="country.stat.countByOrigin" arguments="${countByOrigin}" /> <spring:message code="country.stat.countByOrigin" arguments="${countByOrigin}" />
<c:if test="${countByOrigin gt 0}"> <c:if test="${countByOrigin gt 0}">
<a href="<c:url value="/geo/${country.code3.toLowerCase()}/data" />"><spring:message code="view.accessions" /></a> <a href="<c:url value="/geo/${country.code3}/data" />"><spring:message code="view.accessions" /></a>
</c:if> </c:if>
</div> </div>
<security:authorize access="hasRole('ADMINISTRATOR')"> <security:authorize access="hasRole('ADMINISTRATOR')">
<a href="<c:url value="/geo/${country.code3.toLowerCase()}/edit" />" class="close"> <spring:message code="edit" /> <a href="<c:url value="/geo/${country.code3}/edit" />" class="close"> <spring:message code="edit" />
</a> </a>
</security:authorize> </security:authorize>
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
</h3> </h3>
<ul class="funny-list"> <ul class="funny-list">
<c:forEach items="${genesysInstitutes}" var="faoInstitute" varStatus="status"> <c:forEach items="${genesysInstitutes}" var="faoInstitute" varStatus="status">
<li class="clearfix ${status.count % 2 == 0 ? 'even' : 'odd'}"><a class="show pull-left" href="<c:url value="/wiews/${faoInstitute.code.toLowerCase()}" />"><b><c:out value="${faoInstitute.code}" /></b> <c:out value="${faoInstitute.fullName}" /></a> <li class="clearfix ${status.count % 2 == 0 ? 'even' : 'odd'}"><a class="show pull-left" href="<c:url value="/wiews/${faoInstitute.code}" />"><b><c:out value="${faoInstitute.code}" /></b> <c:out value="${faoInstitute.fullName}" /></a>
<div class="pull-right"> <div class="pull-right">
<spring:message code="faoInstitute.accessionCount" arguments="${faoInstitute.accessionCount}" /> <spring:message code="faoInstitute.accessionCount" arguments="${faoInstitute.accessionCount}" />
</div></li> </div></li>
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<ul class="funny-list"> <ul class="funny-list">
<c:forEach items="${faoInstitutes}" var="faoInstitute" varStatus="status"> <c:forEach items="${faoInstitutes}" var="faoInstitute" varStatus="status">
<li class="${status.count % 2 == 0 ? 'even' : 'odd'}"><a class="show" href="<c:url value="/wiews/${faoInstitute.code.toLowerCase()}" />"><b><c:out value="${faoInstitute.code}" /></b> <c:out value="${faoInstitute.fullName}" /></a></li> <li class="${status.count % 2 == 0 ? 'even' : 'odd'}"><a class="show" href="<c:url value="/wiews/${faoInstitute.code}" />"><b><c:out value="${faoInstitute.code}" /></b> <c:out value="${faoInstitute.fullName}" /></a></li>
</c:forEach> </c:forEach>
</ul> </ul>
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<c:forEach items="${genesysInstitutes}" var="faoInstitute" varStatus="status"> <c:forEach items="${genesysInstitutes}" var="faoInstitute" varStatus="status">
<c:if test="${faoInstitute.latitude ne null and faoInstitute.longitude ne null}"> <c:if test="${faoInstitute.latitude ne null and faoInstitute.longitude ne null}">
marker = L.marker([${faoInstitute.latitude}, ${faoInstitute.longitude}]).addTo(map); marker = L.marker([${faoInstitute.latitude}, ${faoInstitute.longitude}]).addTo(map);
marker.bindPopup("<a href='<c:url value="/wiews/${faoInstitute.code.toLowerCase()}" />'>${faoInstitute.fullName}</a>"); marker.bindPopup("<a href='<c:url value="/wiews/${faoInstitute.code}" />'>${faoInstitute.fullName}</a>");
bounds.add([${faoInstitute.latitude}, ${faoInstitute.longitude}]); bounds.add([${faoInstitute.latitude}, ${faoInstitute.longitude}]);
</c:if> </c:if>
</c:forEach> </c:forEach>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<img class="country-flag bigger" src="<c:url value="${cdnFlagsUrl}" />/${country.code3.toUpperCase()}.png" /> <img class="country-flag bigger" src="<c:url value="${cdnFlagsUrl}" />/${country.code3.toUpperCase()}.png" />
</h1> </h1>
<form role="form" class="" action="<c:url value="/geo/${country.code3.toLowerCase()}/update" />" method="post"> <form role="form" class="" action="<c:url value="/geo/${country.code3}/update" />" method="post">
<div class="form-group"> <div class="form-group">
<label for="blurp-body" class="control-label"><spring:message code="blurp.blurp-body" /></label> <label for="blurp-body" class="control-label"><spring:message code="blurp.blurp-body" /></label>
<div class="controls"> <div class="controls">
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</div> </div>
<input type="submit" value="<spring:message code="blurp.update-blurp"/>" class="btn btn-primary" /> <input type="submit" value="<spring:message code="blurp.update-blurp"/>" class="btn btn-primary" />
<a href="<c:url value="/geo/${country.code3.toLowerCase()}" />" class="btn btn-default"> <spring:message code="cancel" /> <a href="<c:url value="/geo/${country.code3}" />" class="btn btn-default"> <spring:message code="cancel" />
</a> </a>
<!-- CSRF protection --> <!-- CSRF protection -->
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/> <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<small><a href="#letter-top"><spring:message code="jump-to-top" /></a></small> <small><a href="#letter-top"><spring:message code="jump-to-top" /></a></small>
</li> </li>
</c:if> </c:if>
<li class="${status.count % 2 == 0 ? 'even' : 'odd'}"><a class="show ${not country.current ? 'disabled' : ''}" href="<c:url value="/geo/${country.code3.toLowerCase()}" />"><c:out value="${country.getName(pageContext.response.locale)}" /></a></li> <li class="${status.count % 2 == 0 ? 'even' : 'odd'}"><a class="show ${not country.current ? 'disabled' : ''}" href="<c:url value="/geo/${country.code3}" />"><c:out value="${country.getName(pageContext.response.locale)}" /></a></li>
</c:forEach> </c:forEach>
</ul> </ul>
<c:remove var="hoofdleter" /> <c:remove var="hoofdleter" />
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</h1> </h1>
<div class="main-col-header"> <div class="main-col-header">
<a href="<c:url value="/geo/${country.code3.toLowerCase()}" />"><c:out value="${country.getName(pageContext.response.locale)}" /></a> <a href="<c:url value="/geo/${country.code3}" />"><c:out value="${country.getName(pageContext.response.locale)}" /></a>
</div> </div>
<c:if test="${jsonInstitutes ne null}"> <c:if test="${jsonInstitutes ne null}">
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
var jsonInstitutes=${jsonInstitutes}; var jsonInstitutes=${jsonInstitutes};
jsonInstitutes.forEach(function(inst) { jsonInstitutes.forEach(function(inst) {
var marker = L.marker([inst.lat, inst.lng]).addTo(map); var marker = L.marker([inst.lat, inst.lng]).addTo(map);
marker.bindPopup("<a href='<c:url value="/wiews/" />" + inst.code.toLowerCase() +"'>"+inst.title+"</a>"); marker.bindPopup("<a href='<c:url value="/wiews/" />" + inst.code +"'>"+inst.title+"</a>");
}); });
map.fitBounds(GenesysMaps.boundingBox(jsonInstitutes)); map.fitBounds(GenesysMaps.boundingBox(jsonInstitutes));
}); });
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<small><a href="#letter-top"><spring:message code="jump-to-top" /></a></small> <small><a href="#letter-top"><spring:message code="jump-to-top" /></a></small>
</li> </li>
</c:if> </c:if>
<li class="${status.count % 2 == 0 ? 'even' : 'odd'}"><a class="show ${not country.current ? 'disabled' : ''}" href="<c:url value="/geo/${country.code3.toLowerCase()}" />"><c:out value="${country.getName(pageContext.response.locale)}" /></a></li> <li class="${status.count % 2 == 0 ? 'even' : 'odd'}"><a class="show ${not country.current ? 'disabled' : ''}" href="<c:url value="/geo/${country.code3}" />"><c:out value="${country.getName(pageContext.response.locale)}" /></a></li>
</c:forEach> </c:forEach>
</ul> </ul>
<c:remove var="hoofdleter" /> <c:remove var="hoofdleter" />
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<c:if test="${faoInstitute ne null}"> <c:if test="${faoInstitute ne null}">
<p> <p>
<a class="" href="<c:url value="/wiews/${faoInstitute.code.toLowerCase()}" />"><b><c:out value="${faoInstitute.code}" /></b> <c:out value="${faoInstitute.fullName}" /></a> <a class="" href="<c:url value="/wiews/${faoInstitute.code}" />"><b><c:out value="${faoInstitute.code}" /></b> <c:out value="${faoInstitute.fullName}" /></a>
</p> </p>
</c:if> </c:if>
...@@ -102,11 +102,11 @@ ...@@ -102,11 +102,11 @@
<td class="idx-col">${status.count + pagedData.size * pagedData.number}</td> <td class="idx-col">${status.count + pagedData.size * pagedData.number}</td>
<td class="sel" x-aid="${accession.id}"></td> <td class="sel" x-aid="${accession.id}"></td>
<td><a href="<c:url value="/acn/id/${accession.id}" />"><b><c:out value="${accession.accessionName}" /></b></a></td> <td><a href="<c:url value="/acn/id/${accession.id}" />"><b><c:out value="${accession.accessionName}" /></b></a></td>
<%-- <td><a href="<c:url value="/geo/${accession.origin.toLowerCase()}" />"><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></a></td> <%-- <td><a href="<c:url value="/geo/${accession.origin}" />"><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></a></td>
--%> --%>
<td><c:out value="${accession.taxonomy.taxonName}" /></td> <td><c:out value="${accession.taxonomy.taxonName}" /></td>
<%-- <td><a href="<c:url value="/wiews/${accession.institute.code.toLowerCase()}" />"><c:out value="${accession.institute.code}" /></a></td> <%-- <td><a href="<c:url value="/wiews/${accession.institute.code}" />"><c:out value="${accession.institute.code}" /></a></td>
<td><a href="<c:url value="/geo/${accession.institute.country.code3.toLowerCase()}" />"><c:out value="${accession.institute.country.getName(pageContext.response.locale)}" /></a></td> <td><a href="<c:url value="/geo/${accession.institute.country.code3}" />"><c:out value="${accession.institute.country.getName(pageContext.response.locale)}" /></a></td>
--%> --%>
<c:set value="${accessionMethods[accession.id]}" var="methodValues" /> <c:set value="${accessionMethods[accession.id]}" var="methodValues" />
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<c:set var="countryName" value="${faoInstitute.country.getName(pageContext.response.locale)}" /> <c:set var="countryName" value="${faoInstitute.country.getName(pageContext.response.locale)}" />
<li class="hoofdleter" id="nav-${faoInstitute.country.code3}"><c:out value="${countryName}" /> <small><a href="#"><spring:message code="jump-to-top" /></a></small></li> <li class="hoofdleter" id="nav-${faoInstitute.country.code3}"><c:out value="${countryName}" /> <small><a href="#"><spring:message code="jump-to-top" /></a></small></li>
</c:if> </c:if>
<li class="clearfix ${status.count % 2 == 0 ? 'even' : 'odd'}"><a class="show pull-left" href="<c:url value="/wiews/${faoInstitute.code.toLowerCase()}" />"><b><c:out value="${faoInstitute.code}" /></b> <c:out value="${faoInstitute.fullName}" /></a> <li class="clearfix ${status.count % 2 == 0 ? 'even' : 'odd'}"><a class="show pull-left" href="<c:url value="/wiews/${faoInstitute.code}" />"><b><c:out value="${faoInstitute.code}" /></b> <c:out value="${faoInstitute.fullName}" /></a>
<div class="pull-right"> <div class="pull-right">
<spring:message code="faoInstitute.accessionCount" arguments="${faoInstitute.accessionCount}" /> <spring:message code="faoInstitute.accessionCount" arguments="${faoInstitute.accessionCount}" />
</div></li> </div></li>
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
var jsonInstitutes=${jsonInstitutes}; var jsonInstitutes=${jsonInstitutes};
jsonInstitutes.forEach(function(inst) { jsonInstitutes.forEach(function(inst) {
var marker = L.marker([inst.lat, inst.lng]).addTo(map); var marker = L.marker([inst.lat, inst.lng]).addTo(map);
marker.bindPopup('<a href="<c:url value="/wiews/" />' + inst.code.toLowerCase() + '">' + inst.title + '</a>'); marker.bindPopup('<a href="<c:url value="/wiews/" />' + inst.code + '">' + inst.title + '</a>');
}); });
map.fitBounds(GenesysMaps.boundingBox(jsonInstitutes)); map.fitBounds(GenesysMaps.boundingBox(jsonInstitutes));
}); });
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<td><a href="<c:url value="/acn/id/${accession.id}" />"><b><c:out value="${accession.accessionName}" /></b></a></td> <td><a href="<c:url value="/acn/id/${accession.id}" />"><b><c:out value="${accession.accessionName}" /></b></a></td>
<td class="notimportant"><c:out value="${accession.taxonomy.taxonName}" /></td> <td class="notimportant"><c:out value="${accession.taxonomy.taxonName}" /></td>
<%-- <td class="notimportant"><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></td> --%> <%-- <td class="notimportant"><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></td> --%>
<td class="notimportant"><a href="<c:url value="/wiews/${accession.institute.code.toLowerCase()}" />"><c:out value="${accession.institute.code}" /></a></td> <td class="notimportant"><a href="<c:url value="/wiews/${accession.institute.code}" />"><c:out value="${accession.institute.code}" /></a></td>
</tr> </tr>
</c:forEach> </c:forEach>
</tbody> </tbody>
......
...@@ -73,10 +73,10 @@ ...@@ -73,10 +73,10 @@
<td><c:out value="${name}" /></td> <td><c:out value="${name}" /></td>
<%-- <td><a href="<c:url value="/acn/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />"><c:out value="${accession.taxonomy.taxonName}" /></a></td> --%> <%-- <td><a href="<c:url value="/acn/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />"><c:out value="${accession.taxonomy.taxonName}" /></a></td> --%>
<td><c:out value="${accession.taxonomy.taxonName}" /></td> <td><c:out value="${accession.taxonomy.taxonName}" /></td>
<%-- <td class="notimportant"><a href="<c:url value="/geo/${accession.origin.toLowerCase()}" />"><c:out value="${accession.countryOfOrigin.name}" /></a></td> --%> <%-- <td class="notimportant"><a href="<c:url value="/geo/${accession.origin}" />"><c:out value="${accession.countryOfOrigin.name}" /></a></td> --%>
<td class="notimportant"><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></td> <td class="notimportant"><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></td>
<td class="notimportant"><spring:message code="accession.sampleStatus.${accession.sampleStatus}" /></td> <td class="notimportant"><spring:message code="accession.sampleStatus.${accession.sampleStatus}" /></td>
<td class="notimportant"><a href="<c:url value="/wiews/${accession.institute.code.toLowerCase()}" />"><c:out value="${accession.institute.code}" /></a></td> <td class="notimportant"><a href="<c:url value="/wiews/${accession.institute.code}" />"><c:out value="${accession.institute.code}" /></a></td>
</tr> </tr>
</c:forEach> </c:forEach>
</tbody> </tbody>
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<a href="<c:url value="/c/${searchResult.shortName}/data" />">${searchResult.name}</a> <a href="<c:url value="/c/${searchResult.shortName}/data" />">${searchResult.name}</a>
</c:when> </c:when>
<c:when test="${clazz eq 'FaoInstitute'}"> <c:when test="${clazz eq 'FaoInstitute'}">
<a href="<c:url value="/wiews/${searchResult.code.toLowerCase()}" />">${searchResult.fullName}</a> <a href="<c:url value="/wiews/${searchResult.code}" />">${searchResult.fullName}</a>
${searchResult.code} ${searchResult.country.getName(pageContext.response.locale)} ${searchResult.code} ${searchResult.country.getName(pageContext.response.locale)}
</c:when> </c:when>
<c:when test="${clazz eq 'Metadata'}"> <c:when test="${clazz eq 'Metadata'}">
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
${searchResult.title} ${searchResult.title}
</c:when> </c:when>
<c:when test="${clazz eq 'Country'}"> <c:when test="${clazz eq 'Country'}">
<a href="<c:url value="/geo/${searchResult.code3.toLowerCase()}" />">${searchResult.getName(pageContext.response.locale)}</a> <a href="<c:url value="/geo/${searchResult.code3}" />">${searchResult.getName(pageContext.response.locale)}</a>
</c:when> </c:when>
<c:when test="${clazz eq 'Article'}"> <c:when test="${clazz eq 'Article'}">
<a href="<c:url value="/content/${searchResult.slug}" />">${searchResult.title}</a> <a href="<c:url value="/content/${searchResult.slug}" />">${searchResult.title}</a>
......
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
<td><a href="<c:url value="/acn/id/${accession.id}" />"><b><c:out value="${accession.accessionName}" /></b></a></td> <td><a href="<c:url value="/acn/id/${accession.id}" />"><b><c:out value="${accession.accessionName}" /></b></a></td>
<td><c:out value="${accession.taxonomy.taxonName}" /></td> <td><c:out value="${accession.taxonomy.taxonName}" /></td>
<td class="notimportant"><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></td> <td class="notimportant"><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></td>
<td class="notimportant"><a href="<c:url value="/wiews/${accession.institute.code.toLowerCase()}" />"><c:out value="${accession.institute.code}" /></a></td> <td class="notimportant"><a href="<c:url value="/wiews/${accession.institute.code}" />"><c:out value="${accession.institute.code}" /></a></td>
<%-- <td class="notimportant"><a href="<c:url value="/geo/${accession.institute.country.code3.toLowerCase()}" />"><c:out value="${accession.institute.country.getName(pageContext.response.locale)}" /></a></td> --%> <%-- <td class="notimportant"><a href="<c:url value="/geo/${accession.institute.country.code3}" />"><c:out value="${accession.institute.country.getName(pageContext.response.locale)}" /></a></td> --%>
</tr> </tr>
</c:forEach> </c:forEach>
</tbody> </tbody>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<c:if test="${not faoInstitute.current}"> <c:if test="${not faoInstitute.current}">
<div class="alert alert-warning"> <div class="alert alert-warning">
<spring:message code="faoInstitute.institute-not-current" /> <spring:message code="faoInstitute.institute-not-current" />
<a href="<c:url value="/wiews/${faoInstitute.vCode.toLowerCase()}" />"><spring:message code="faoInstitute.view-current-institute" arguments="${faoInstitute.vCode}" /></a> <a href="<c:url value="/wiews/${faoInstitute.vCode}" />"><spring:message code="faoInstitute.view-current-institute" arguments="${faoInstitute.vCode}" /></a>
</div> </div>
</c:if> </c:if>
...@@ -29,18 +29,18 @@ ...@@ -29,18 +29,18 @@
<div class="jumbotron"> <div class="jumbotron">
<spring:message code="faoInstitutes.stat.accessionCount" arguments="${countByInstitute}" /> <spring:message code="faoInstitutes.stat.accessionCount" arguments="${countByInstitute}" />
<c:if test="${countByInstitute gt 0}"> <c:if test="${countByInstitute gt 0}">
<a href="<c:url value="/wiews/${faoInstitute.code.toLowerCase()}/data" />"><spring:message code="view.accessions" /></a> <a href="<c:url value="/wiews/${faoInstitute.code}/data" />"><spring:message code="view.accessions" /></a>
</c:if> </c:if>
<spring:message code="faoInstitutes.stat.datasetCount" arguments="${datasetCount}" /> <spring:message code="faoInstitutes.stat.datasetCount" arguments="${datasetCount}" />
<c:if test="${datasetCount gt 0}"> <c:if test="${datasetCount gt 0}">
<a href="<c:url value="/wiews/${faoInstitute.code.toLowerCase()}/datasets" />"><spring:message code="view.datasets" /></a> <a href="<c:url value="/wiews/${faoInstitute.code}/datasets" />"><spring:message code="view.datasets" /></a>
</c:if> </c:if>
</div> </div>
<div class=""> <div class="">
<security:authorize access="hasRole('ADMINISTRATOR') or hasPermission(#faoInstitute, 'ADMINISTRATION')"> <security:authorize access="hasRole('ADMINISTRATOR') or hasPermission(#faoInstitute, 'ADMINISTRATION')">
<a href="<c:url value="/acl/${faoInstitute.class.name}/${faoInstitute.id}/permissions"><c:param name="back">/wiews/${faoInstitute.code.toLowerCase()}</c:param></c:url>" class="close"> <spring:message code="edit-acl" /></a> <a href="<c:url value="/acl/${faoInstitute.class.name}/${faoInstitute.id}/permissions"><c:param name="back">/wiews/${faoInstitute.code}</c:param></c:url>" class="close"> <spring:message code="edit-acl" /></a>
<a href="<c:url value="/wiews/${faoInstitute.code.toLowerCase()}/edit" />" class="close"> <a href="<c:url value="/wiews/${faoInstitute.code}/edit" />" class="close">
<spring:message code="edit" />