[#294] - Embed TEI edition and XML source in viewer tabs - #311
Open
sebhofmann wants to merge 6 commits into
Open
[#294] - Embed TEI edition and XML source in viewer tabs#311sebhofmann wants to merge 6 commits into
sebhofmann wants to merge 6 commits into
Conversation
The object viewer now shows one tab per readable derivate, titled by the derivate_types classification label. The rendering is chosen by the main file extension, not the derivate type: - xml/tei main files are rendered as a TEI text edition (XSLT 3.0/Saxon, loaded lazily via MCRDerivateContentTransformerServlet) and get an extra "<label> (XML)" tab showing the pretty printed, syntax highlighted source. - everything else (pdf, images) uses the mycore image viewer as before. Derivates without a main file no longer produce an empty tab. Also improves the upload boxes: uploading into an existing filespace is now visually separated from creating a new filespace.
Render title/desc metadata, seriesStmt editors, witness sigla, metDecl prosody and blockLyrics text; resolve cross-object links; add critical apparatus with annotation popover. Move all UI labels to messages (de/en/tr) via mcri18n and fix apparatus link spacing.
sebhofmann
changed the base branch from
main
to
milestones/17-tei-praesentationsschicht
August 11, 2026 14:18
sebhofmann
added a commit
that referenced
this pull request
Aug 11, 2026
Seed commit so the milestone integration branch can host a merge PR into main. Milestone PRs (e.g. #311) target this branch and merge here first.
1 task
- Drop duplicated title/shelfmark from the edition header - Mirror the printed edition in the verse block: centred lines, bold main text, regular terennüm, italic performance directions, even-only line numbers, per-line @real scansion in a popup - Bracket <supplied> as [..] and resolve @reason/@resp, resolve editor @ROLE and rdg @type, split genre into music/text genre and text form - Move all edition popups (metre, supplied, editors, catalogue, reading types and the annotation apparatus preview) onto Bootstrap popovers sharing one .cmo-tei-bs-popover theme - Add de/en/tr messages for the new labels, roles, reasons and reading types taken from the editors' translation table
Popovers in the TEI edition viewer are now opened by click instead of hover, so they stay open and links inside them remain clickable. Only one popover is open at a time; a click outside closes it. Real links keep their hover tooltip so the click still navigates. Readings with a @wit attribute now get a popover listing the witness sigla resolved from the listWit.
Drop the custom single-open tracking and outside-click handling in the TEI viewer and rely on Bootstrap's native click toggle instead. Nested triggers (a supplied span wrapping an annotation) now open both popovers on one click and close again on re-click. Each click popover gets a small close button in its top right corner.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #294
What
The object viewer now shows one tab per readable derivate, with the tab title taken from the
derivate_typesclassification label. What a tab renders is decided by the main file extension, not the derivate type (the type is only used for the title):TEI-cmoedition.xsl, executed with Saxon, loaded lazily viaMCRDerivateContentTransformerServlet) and additionally get a<label> (XML)tab showing the raw source, pretty printed and syntax highlighted (TEI-cmosource.xsl).The XML source view walks the tree and emits themed
<span>classes for tags, attributes, values, text and comments (colours in_tei.scss); no external JS highlighter is needed. Mixed content is kept on one line so significant whitespace is preserved.Also included
Upload boxes: "add to an existing filespace" is now visually separated from "create a new filespace" so it is clear what an upload will do (
metadataLayout.xsl,_metadata.scss, new i18n keys).Notes
MCR.SASS.DeveloperMode), the cmo-module ships in the WAR.TEI-cmoedition/TEI-cmosourceare configured inmycore.properties(Saxon, XSLT 3.0).cmo-modulebuilds cleanly (mvn -pl cmo-module install, tests green).Test
TEI-cmosource.xslagainst the real edition file ofcmo_mods_00000602(Saxon-HE 9.8): well-formed output, balanced spans, namespaces and mixed content correct.