Commit 32e1b280 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

Merge branch 'v4.3-dev' into 'v4.x-master'

Item view improved

See merge request !49
parents 47161d81 ae92a191
Pipeline #27036 passed with stages
in 4 minutes and 35 seconds
......@@ -9,7 +9,7 @@ allprojects {
apply plugin: 'eclipse'
group = 'eu.dariah.de.minfba'
version = '4.3.15-SNAPSHOT'
version = '4.3.17-SNAPSHOT'
repositories {
mavenLocal()
......@@ -19,8 +19,8 @@ allprojects {
}
ext {
coreVersion = "6.5.4-SNAPSHOT"
gtfVersion = "2.3.4-SNAPSHOT"
processingVersion = "4.3.6-SNAPSHOT"
gtfVersion = "2.3.6-SNAPSHOT"
processingVersion = "4.3.9-SNAPSHOT"
colregModelVersion = "4.5.10-SNAPSHOT"
dariahSpVersion = "2.1.7-RELEASE"
......
......@@ -195,9 +195,13 @@ public class CollectionEditorController extends BaseController {
List<String> clearCrawlIds = new ArrayList<>();
crawls = crawlService.findCrawls(epId, dmId, CrawlOnlineFlag.Offline, CrawlCompleteFlag.Both, CrawlErrorFlag.Both, 0);
Crawl lastOfflineCrawl = null;
for (Crawl c : crawls) {
if (lastOnlineCrawl==null || c.getModified().isBefore(lastOnlineCrawl.getModified())) {
if (lastOnlineCrawl==null || c.getModified().isBefore(lastOnlineCrawl.getModified()) || lastOfflineCrawl!=null) {
clearCrawlIds.add(c.getId());
} else if (lastOfflineCrawl==null) {
lastOfflineCrawl = c;
}
}
this.addCrawlId(clearCrawlIds, crawlService.findCrawls(epId, dmId, CrawlOnlineFlag.Both, CrawlCompleteFlag.Incomplete, CrawlErrorFlag.Both, 0));
......
......@@ -131,19 +131,40 @@ public class ItemController extends BaseController {
}
List<Resource> video = ResourceHelper.findRecursive(res, "MultimediaContent.Video");
if (!audio.isEmpty()) {
if (!video.isEmpty()) {
contentElements.put("Video", video);
}
List<Resource> info = ResourceHelper.findRecursive(res, "PrimaryInfo");
if (!audio.isEmpty()) {
contentElements.put("Info", info);
List<Resource> infos = ResourceHelper.findRecursive(res, "PrimaryInfo");
if (!infos.isEmpty()) {
String queryMessageCode;
String label;
for (Resource info : infos) {
if (info.getChildResources()!=null) {
// Check for available translations
for (Resource c : info.getChildResources()) {
if (c.getKey().equals("Type") && c.getValue()!=null) {
queryMessageCode = "~eu.dariah.de.minfba.search.view.item.presentation_metadata.primary_info_types." + c.getValue().toString().toLowerCase();
label = messageSource.getMessage(queryMessageCode, null, locale);
if (!label.equals(queryMessageCode)) {
c.setValue(label);
}
}
}
}
}
contentElements.put("Info", infos);
}
List<Resource> frames = ResourceHelper.findRecursive(res, "EmbeddedFrame");
if (!frames.isEmpty()) {
contentElements.put("Frame", frames);
}
List<Resource> keywords = ResourceHelper.findRecursive(res, "Keyword");
if (!keywords.isEmpty()) {
model.addAttribute("keywords", keywords);
}
model.addAttribute("titles", titles);
model.addAttribute("links", links);
model.addAttribute("images", images);
......
......@@ -78,8 +78,10 @@ public abstract class BaseSearchController extends BaseController {
if (strSourceId.length()>1) {
strSourceId.append(",");
}
if (collectionIdMap.containsKey(sourceIds.get(i))) {
if (collectionIdMap.containsValue(sourceIds.get(i))) {
strSourceId.append("\"").append(sourceIds.get(i)).append("\"");
} else if (collectionIdMap.containsKey(sourceIds.get(i))) {
strSourceId.append("\"").append(collectionIdMap.get(sourceIds.get(i))).append("\"");
} else {
strSourceId.append("\"").append("cid:" + sourceIds.get(i)).append("\"");
......
......@@ -29,6 +29,7 @@ import de.unibamberg.minf.gtf.extensions.file.dispatcher.FileCommandsDispatcher;
import de.unibamberg.minf.gtf.extensions.geo.commands.GeoCommandsDispatcher;
import de.unibamberg.minf.gtf.extensions.geo.commands.SimpleGeoCommands;
import de.unibamberg.minf.gtf.extensions.person.commands.PersonCommandsDispatcher;
import de.unibamberg.minf.gtf.extensions.tika.commands.PdfCommands;
import de.unibamberg.minf.gtf.extensions.vocabulary.commands.SimpleVocabularyCommands;
import de.unibamberg.minf.gtf.extensions.vocabulary.commands.VocabularyCommandsDispatcher;
import de.unibamberg.minf.gtf.extensions.wiki.commands.WikiCommandsDispatcher;
......@@ -111,7 +112,9 @@ public class ProcessingConfig extends ProcessingConfigProperties {
OnlineFileCommands onlineFileCommands = new OnlineFileCommands();
onlineFileCommands.setBaseDownloadDirectory(mainConfig.getPaths().getDownloads());
onlineFileCommands.setDisabled(this.getFile().isDownloadsDisabled());
fileCommandsDispatcher.setCommands(onlineFileCommands);
fileCommandsDispatcher.setPdfCommands(new PdfCommands());
return fileCommandsDispatcher;
}
......
Subproject commit cab8358d7ef4525e5d79ce56a58b2ffc4e3aac8e
Subproject commit 19f2b3cfa0b844dff45eb23e4fa0ebb8e4858617
Subproject commit 70bf0de987331734a4d17199655e4f8658a5a25c
Subproject commit 48b394b5c9577e324192bdf751a123ff486c1ee8
......@@ -36,12 +36,14 @@
<put-attribute name="content" value="/WEB-INF/view/jsp/_search-commons/item/view.jsp" />
<put-attribute name="smallLogo" cascade="true" value="true" />
<put-list-attribute name="genericStyles" inherit="true">
<add-attribute type="string" value="videojs/video-js.min.css" />
<add-attribute type="string" value="venobox/venobox.css" />
</put-list-attribute>
<put-list-attribute name="genericScripts" inherit="true">
<add-attribute type="string" value="_lib/venobox/venobox.js" />
<add-attribute type="string" value="_lib/blob/blob.js" />
<add-attribute type="string" value="_lib/fileSaver/fileSaver.js" />
<add-attribute type="string" value="_lib/videojs/video.min.js" />
<add-attribute type="string" value="item/item.js" />
</put-list-attribute>
</definition>
......
Subproject commit a761a6234188333500aecf32bb0dabe946e2705c
Subproject commit a86cb5d2f3e86747d08a27cf8a83bdb452e80dd2
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