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

Organization map with hyperlinked marker, Sideblurp and only 6 news items on entry page

parent f694d462
......@@ -75,7 +75,7 @@ public class ContentServiceImpl implements ContentService {
@Override
@Cacheable(value = "contentcache", key = "#root.methodName")
public List<ActivityPost> lastNews() {
PageRequest page = new PageRequest(0, 10, Direction.DESC, "postDate");
PageRequest page = new PageRequest(0, 6, Direction.DESC, "postDate");
return postRepository.findAll(page).getContent();
}
......
......@@ -87,6 +87,7 @@ public class HtmlController extends BaseController {
model.addAttribute("cropList", cropService.list(getLocale()));
model.addAttribute("lastNews", contentService.lastNews());
model.addAttribute("welcomeBlurp", contentService.getGlobalArticle("welcome", getLocale()));
model.addAttribute("sideBlurp", contentService.getGlobalArticle("sideBlurp", getLocale()));
model.addAttribute("numberOfCountries", statisticsService.numberOfCountries());
model.addAttribute("numberOfInstitutes", statisticsService.numberOfInstitutes());
......
......@@ -85,8 +85,19 @@
<div class="one-stat"><a href="<c:url value="/explore" />"><spring:message code="stats.number-of-accessions" arguments="${numberOfAccessions}" /></a></div>
</div>
</div>
</div>
<c:if test="${sideBlurp ne null}">
<div class="content-block">
<h2>${sideBlurp.title}</h2>
<div class="blurp">
<c:set var="blurp" value="${sideBlurp}" />
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
<c:remove var="blurp" />
</div>
</div>
</c:if>
</div>
</div>
<content tag="javascript">
......
......@@ -37,7 +37,7 @@
var jsonInstitutes=${jsonInstitutes};
jsonInstitutes.forEach(function(inst) {
var marker = L.marker([inst.lat, inst.lng]).addTo(map);
marker.bindPopup(inst.title);
marker.bindPopup('<a href="<c:url value="/wiews/" />' + inst.code.toLowerCase() + '">' + inst.title + '</a>');
});
map.fitBounds(GenesysMaps.boundingBox(jsonInstitutes));
});
......
......@@ -842,6 +842,15 @@ html[dir="rtl"] #country-in-genesys table .alignleft {
padding-bottom:10px;
}
#right-col .content-block {
margin-bottom: 1em;
}
#right-col > .content-block > .blurp {
background-color: White;
padding: 10px;
}
#right-col #my-profile {
background:#fff;
font-size:12px;
......
Supports Markdown
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