-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78b91b9
commit 6703fc7
Showing
19 changed files
with
79 additions
and
759 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
cmo-module/src/main/java/de/vzg/cmo/CMOViewerConfigurationStrategy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
cmo-module/src/main/resources/xsd/datacite/v4.1/datacite-contributorType-v4.xsd
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
cmo-module/src/main/resources/xsd/datacite/v4.1/datacite-dateType-v4.1.xsd
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
cmo-module/src/main/resources/xsd/datacite/v4.1/datacite-descriptionType-v4.xsd
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
cmo-module/src/main/resources/xsd/datacite/v4.1/datacite-funderIdentifierType-v4.xsd
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
cmo-module/src/main/resources/xsd/datacite/v4.1/datacite-nameType-v4.1.xsd
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
cmo-module/src/main/resources/xsd/datacite/v4.1/datacite-relatedIdentifierType-v4.xsd
This file was deleted.
Oops, something went wrong.
46 changes: 0 additions & 46 deletions
46
cmo-module/src/main/resources/xsd/datacite/v4.1/datacite-relationType-v4.1.xsd
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.