Commit 07f3a255 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

408: Help text on start page (OPENED)

Task-Url: #408
parent 6332a9ce
Pipeline #23181 failed with stage
in 10 seconds
......@@ -13,6 +13,8 @@ import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import de.unibamberg.minf.core.web.localization.MessageSource;
import eu.dariah.de.search.pojo.TagPojo;
import eu.dariah.de.search.query.execution.AggregationService;
import eu.dariah.de.search.service.CollectionService;
......@@ -22,6 +24,8 @@ import eu.dariah.de.search.service.DatamodelService;
public class HomeController extends BaseController {
@Autowired private CollectionService datasourceService;
@Autowired protected DatamodelService datamodelService;
@Autowired private MessageSource messageSource;
@Autowired protected AggregationService aggregationService;
......@@ -34,6 +38,13 @@ public class HomeController extends BaseController {
public String getHome(HttpServletRequest request, Model model, Locale locale) {
model.addAttribute("docCount", aggregationService.getDocumentCount());
model.addAttribute("providerCount", datasourceService.getCount());
if (messageSource.isResolvable("~eu.dariah.de.minfba.theme.application_descriptions.short", locale)) {
model.addAttribute("shortDesc", messageSource.getMessage("~eu.dariah.de.minfba.theme.application_descriptions.short", null, locale));
}
if (messageSource.isResolvable("~eu.dariah.de.minfba.theme.application_descriptions.extended", locale)) {
model.addAttribute("extDesc", messageSource.getMessage("~eu.dariah.de.minfba.theme.application_descriptions.extended", null, locale));
}
return "home";
}
......
......@@ -59,7 +59,7 @@ crawling:
localization:
defaultLocale: de
debug: false
debug: true
theme: tutorial-finder-theme
......
Subproject commit 15fe2e6121ce64b76e36b7d1f7429e6e50c4c17a
Subproject commit ebecd6cb2206badd33186021b1f125a966f8f5ad
Subproject commit 02eaf91524c40975403bf62985f62910f8c0d8a7
Subproject commit 475e93de97114875892a0cd03a33e510f03dddd5
Subproject commit eb9d195a165681299370597724946f59f0f9455a
Subproject commit 6d04da1c6f4f898211d49b221ab33ba74a9f549c
......@@ -29,4 +29,10 @@ includeBuild('../gtf') {
substitute module('de.unibamberg.minf.gtf:gtf-extension-vocabulary') with project(':gtf-extension-vocabulary')
substitute module('de.unibamberg.minf.gtf:gtf-extension-clariah') with project(':gtf-extension-clariah')
}
}
includeBuild('../core') {
dependencySubstitution {
substitute module('de.unibamberg.minf.core:core-web') with project(':core-web')
}
}
\ No newline at end of file
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