MIR-1410 show metadata when document is blocked#1087
MIR-1410 show metadata when document is blocked#1087Antoniafriedrich wants to merge 4 commits into2023.06.xfrom
Conversation
41b89a3 to
f925f03
Compare
|
looks good for me, but @yagee-de should have a final look at this |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new metadata display for blocked documents by introducing a renderMetadata template, refactoring name-printing into a shared helper, and wiring a new MIR.Blocked.Detailpage flag.
- Added
helperTemplates.xslwithprintAuthorNamefor reuse in CSV export, email events, and metadata. - Implemented
renderMetadatainmods-metadata.xsland conditionally invoke it whenMIR.Blocked.Detailpageis true. - Updated
mods2csv.xsl,e-mail-events.xsl, andmods-metadata.xslto include the shared helper and remove duplicated name-printing templates; added a new property inmycore.properties.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| xsl/mods2csv.xsl | Included name helper and replaced apply-templates with call-template |
| xsl/metadata/mods-metadata.xsl | Added MIR.Blocked.Detailpage param, conditional block, renderMetadata, and helper include |
| xsl/import/helperTemplates.xsl | New file defining shared printAuthorName template |
| xsl/e-mail-events.xsl | Included name helper and replaced apply-templates with call-template |
| config/mir/mycore.properties | Added default MIR.Blocked.Detailpage=false setting |
Comments suppressed due to low confidence (4)
mir-module/src/main/resources/xsl/import/helperTemplates.xsl:6
- [nitpick] Template name 'printAuthorName' may be misleading since it's used to print names in various contexts (e.g., CSV exports and email events). Consider renaming to a more generic name like 'printPersonName' or 'printName'.
<xsl:template name="printAuthorName">
mir-module/src/main/resources/xsl/metadata/mods-metadata.xsl:95
- [nitpick] The new conditional block and renderMetadata template are not covered by existing tests. Consider adding unit or integration tests to verify metadata rendering when MIR.Blocked.Detailpage is true.
<xsl:if test="$MIR.Blocked.Detailpage = 'true'">
mir-module/src/main/resources/config/mir/mycore.properties:769
- [nitpick] This new property controls whether metadata is displayed on blocked detail pages. Consider adding a comment above to document its purpose and acceptable values.
MIR.Blocked.Detailpage=false
mir-module/src/main/resources/xsl/metadata/mods-metadata.xsl:102
- This call to printAuthorName immediately after renderMetadata appears to duplicate author output outside of the metadata block. Consider removing or integrating author printing within renderMetadata to avoid duplication.
<xsl:call-template name="printAuthorName">
| </a> | ||
| </xsl:template> | ||
|
|
||
| <xsl:template name="renderMetadata"> |
There was a problem hiding this comment.
[nitpick] The renderMetadata template is fairly large and includes hard-coded HTML structure. Consider breaking it into smaller sub-templates or adding comments to improve readability and maintainability.
|
Please fix indentation |
7bd8232 to
3626adf
Compare
Link to jira.