Skip to content

Commit

Permalink
Update project and fix #227
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhofmann committed May 26, 2021
1 parent 78b91b9 commit 6703fc7
Show file tree
Hide file tree
Showing 19 changed files with 79 additions and 759 deletions.
8 changes: 7 additions & 1 deletion cmo-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>de.vzg.cmo</groupId>
<artifactId>cmo-parent</artifactId>
<version>2019.06-SNAPSHOT</version>
<version>2020.06-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
<artifactId>cmo-cli</artifactId>
Expand Down Expand Up @@ -122,6 +122,12 @@
<artifactId>cmo-module</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<!-- required for org.mycore.common.xsl.MCRParameterCollector to work -->
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
<profiles>
<profile>
Expand Down
11 changes: 10 additions & 1 deletion cmo-module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>de.vzg.cmo</groupId>
<artifactId>cmo-parent</artifactId>
<version>2019.06-SNAPSHOT</version>
<version>2020.06-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>cmo-module</artifactId>
Expand Down Expand Up @@ -195,6 +195,15 @@
<groupId>org.mycore</groupId>
<artifactId>mycore-xeditor</artifactId>
</dependency>
<dependency>
<groupId>org.mycore</groupId>
<artifactId>mycore-viewer</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package de.vzg.cmo;

import java.util.Locale;

import javax.servlet.http.HttpServletRequest;

import org.mycore.common.xml.MCRXMLFunctions;
import org.mycore.common.xsl.MCRParameterCollector;
import org.mycore.frontend.MCRFrontendUtil;
import org.mycore.viewer.configuration.MCRViewerConfiguration;
import org.mycore.viewer.configuration.MCRViewerDefaultConfigurationStrategy;

public class CMOViewerConfigurationStrategy extends MCRViewerDefaultConfigurationStrategy {

@Override
public MCRViewerConfiguration get(HttpServletRequest request) {
MCRViewerConfiguration mcrViewerConfiguration = super.get(request);
String baseURL = MCRFrontendUtil.getBaseURL(request);
MCRParameterCollector params = new MCRParameterCollector(request);

if (!MCRXMLFunctions.isMobileDevice(request.getHeader("User-Agent"))) {
// Default Stylesheet

String cmoBootstrapCSSURL = String.format(Locale.ROOT, "%srsc/sass/scss/bootstrap-cmo.css", baseURL);
mcrViewerConfiguration.addCSS(cmoBootstrapCSSURL);


if (request.getParameter("embedded") != null) {
mcrViewerConfiguration.setProperty("permalink.updateHistory", false);
mcrViewerConfiguration.setProperty("chapter.showOnStart", false);
} else {
// Default JS
mcrViewerConfiguration
.addScript(MCRFrontendUtil.getBaseURL() + "webjars/bootstrap/4.3.1/js/bootstrap.bundle.min.js");
}
}

return mcrViewerConfiguration;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
/* ---------------------------------------------------------------------------
base structure
----------------------------------------------------------------------------*/
body {
body:not(.mycoreViewer) { // TODO: this needs to be fixed
padding-top: 210px;
min-width: 320px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ We have different approches
*/

@include media-breakpoint-up(sm) {
body {
body:not(.mycoreViewer) { // TODO: this needs to be fixed
padding-top: 140px;
}
#e_suche .switcher {
Expand All @@ -60,7 +60,7 @@ We have different approches
}

@include media-breakpoint-up(lg) {
body {
body:not(.mycoreViewer) { // TODO: this needs to be fixed
padding-top: 70px;
}
footer #nav_below > ul > li {
Expand Down
35 changes: 0 additions & 35 deletions cmo-module/src/main/resources/catalog.xml

This file was deleted.

14 changes: 12 additions & 2 deletions cmo-module/src/main/resources/config/cmo/mycore.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ MCR.PI.Service.Datacite.Generator=CMODOI
MCR.PI.Service.Datacite.MetadataService=CMOMetadataService
MCR.PI.Service.Datacite.Transformer=datacite
MCR.PI.Service.Datacite.RegisterBaseURL=https://corpus-musicae-ottomanicae.de/cmo/
MCR.PI.Service.Datacite.Schema=xsd/datacite/v4.1/metadata.xsd
MCR.PI.Service.Datacite.Schema=http://schema.datacite.org/meta/kernel-4.1/metadata.xsd
MCR.PI.Service.Datacite.Namespace=http://datacite.org/schema/kernel-4
MCR.PI.Service.Datacite.RegisterURLContext=receive/$ID
MCR.PI.Service.Datacite.JobApiUser=datacitejob
Expand Down Expand Up @@ -90,7 +90,7 @@ MCR.Access.Strategy.Class=de.vzg.cmo.CMOStrategy
MCR.Access.Strategy.SubmittedCategory=state:submitted
MCR.Access.AddDerivateDefaultRule=false
MCR.Access.AddObjectDefaultRule=false

MCR.Access.Strategy.CreatorRole=submitter

##############################################################################
# Layout, URIResolver & ContentTransformer #
Expand Down Expand Up @@ -251,3 +251,13 @@ MCR.CMO.Migrators=org.mycore.mei.migration.MEIClassificationMigrator,\
CMO.GND.Beacon.Institution=Max Weber Stiftung - Deutsche Geisteswissenschaftliche Institute im Ausland
CMO.GND.Beacon.Contact=info [at] maxweberstiftung.de
CMO.GND.Beacon.Message=Corpus Musicae Ottomanicae


##############################################################################
# GND Beacon #
##############################################################################
MCR.Viewer.configuration.strategy=de.vzg.cmo.CMOViewerConfigurationStrategy




This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 6703fc7

Please sign in to comment.