Commit 8c7f843f authored by Matija Obreza's avatar Matija Obreza
Browse files

Allow dots in species names as PathVariable

parent 82a09912
...@@ -84,7 +84,7 @@ public class AccessionController extends BaseController { ...@@ -84,7 +84,7 @@ public class AccessionController extends BaseController {
return "/accession/details"; return "/accession/details";
} }
@RequestMapping("/{holdingInstitute}/{accessionName}") @RequestMapping("/{holdingInstitute}/{accessionName:.+}")
public String viewInstituteAccession(ModelMap model, @PathVariable(value = "holdingInstitute") String holdingInstitute, public String viewInstituteAccession(ModelMap model, @PathVariable(value = "holdingInstitute") String holdingInstitute,
@PathVariable(value = "accessionName") String accessionName) { @PathVariable(value = "accessionName") String accessionName) {
_logger.debug("Viewing ACN " + accessionName); _logger.debug("Viewing ACN " + accessionName);
...@@ -133,7 +133,7 @@ public class AccessionController extends BaseController { ...@@ -133,7 +133,7 @@ public class AccessionController extends BaseController {
* @param page * @param page
* @return * @return
*/ */
@RequestMapping("/t/{genus}/{species}") @RequestMapping("/t/{genus}/{species:.+}")
public String viewDataByGenusSpecies(ModelMap model, @PathVariable(value = "genus") String genus, @PathVariable(value = "species") String species, public String viewDataByGenusSpecies(ModelMap model, @PathVariable(value = "genus") String genus, @PathVariable(value = "species") String species,
@RequestParam(value = "page", required = false, defaultValue = "1") int page) { @RequestParam(value = "page", required = false, defaultValue = "1") int page) {
......
...@@ -107,7 +107,7 @@ public class WiewsController extends BaseController { ...@@ -107,7 +107,7 @@ public class WiewsController extends BaseController {
return "/accession/data"; return "/accession/data";
} }
@RequestMapping("/{wiewsCode}/t/{genus}/{species}") @RequestMapping("/{wiewsCode}/t/{genus}/{species:.+}")
public String viewDataByGenusSpecies(ModelMap model, @PathVariable(value = "wiewsCode") String wiewsCode, @PathVariable(value = "genus") String genus, public String viewDataByGenusSpecies(ModelMap model, @PathVariable(value = "wiewsCode") String wiewsCode, @PathVariable(value = "genus") String genus,
@PathVariable(value = "species") String species, @RequestParam(value = "page", required = false, defaultValue = "1") int page) { @PathVariable(value = "species") String species, @RequestParam(value = "page", required = false, defaultValue = "1") int page) {
_logger.debug("Viewing country " + wiewsCode); _logger.debug("Viewing country " + wiewsCode);
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</tr> </tr>
<tr> <tr>
<td><spring:message code="accession.holdingCountry" /></td> <td><spring:message code="accession.holdingCountry" /></td>
<td><c:out value="${accession.institute.country.name}" /></td> <td><a href="<c:url value="/geo/${accession.institute.country.code3.toLowerCase()}" />"><c:out value="${accession.institute.country.name}" /></a></td>
</tr> </tr>
<tr> <tr>
<td><spring:message code="accession.accessionName" /></td> <td><spring:message code="accession.accessionName" /></td>
...@@ -177,9 +177,9 @@ ...@@ -177,9 +177,9 @@
<c:if test="${methods.size() gt 0}"> <c:if test="${methods.size() gt 0}">
<h2> <h4>
<spring:message code="accession.methods" /> <spring:message code="accession.methods" />
</h2> </h4>
<table> <table>
<tbody> <tbody>
<c:forEach items="${methods}" var="method" varStatus="status"> <c:forEach items="${methods}" var="method" varStatus="status">
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
<span class="uom"><c:out value="${method.unit}" /></span> <sup><a href="#metadata-${val.experimentId}"><c:out value="${val.experimentId}" /></a></sup> <span class="uom"><c:out value="${method.unit}" /></span> <sup><a href="#metadata-${val.experimentId}"><c:out value="${val.experimentId}" /></a></sup>
</div> </div>
</c:forEach></td> </c:forEach></td>
<td><c:out value="${method.method}" /></td> <td class="notimportant"><c:out value="${method.method}" /></td>
</tr> </tr>
</c:forEach> </c:forEach>
</tbody> </tbody>
...@@ -199,9 +199,9 @@ ...@@ -199,9 +199,9 @@
</c:if> </c:if>
<c:if test="${metadatas.size() gt 0}"> <c:if test="${metadatas.size() gt 0}">
<h3> <h4>
<spring:message code="accession.metadatas" /> <spring:message code="accession.metadatas" />
</h3> </h4>
<ul class="funny-list"> <ul class="funny-list">
<c:forEach items="${metadatas}" var="metadata" varStatus="status"> <c:forEach items="${metadatas}" var="metadata" varStatus="status">
<li class="clearfix targeted ${status.count % 2 == 0 ? 'even' : 'odd'}" id="metadata-${metadata.id}"> <li class="clearfix targeted ${status.count % 2 == 0 ? 'even' : 'odd'}" id="metadata-${metadata.id}">
......
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