Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIR-1352 Use mycore text editor for editing xml documents #1059

Draft
wants to merge 1 commit into
base: 2023.06.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mir-module/src/main/resources/actionmappings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<when condition="(group = admin) or (group = editor)" url="/servlets/MCRLockServlet?url=/editor/editor-admins.xed" />
</action>
<action action="update-xml">
<when condition="(group = admin)" url="/servlets/MCRLockServlet?url=/editor/editor-xml.xed" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D.h. das Objekt wird dann nicht mehr gelockt und kann somit gleichzeitig bearbeitet werden?
... ausserdem sollten wir dringend eine ACL auf die URL setzen um die Bearbeitung durch nicht-Admins zu vermeiden

<when condition="(group = admin)" url="/modules/webtools/texteditor/objects/" />
</action>
</collection>
<collection name="lecture">
Expand All @@ -49,4 +49,4 @@
<when condition="true" url="/servlets/MCRLoginServlet?url=MCRActionMappingServlet/lecture/create-child" />
</action>
</collection>
</actionmappings>
</actionmappings>
15 changes: 5 additions & 10 deletions mir-module/src/main/resources/xsl/modsdetails-external.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,6 @@
<xsl:variable name="adminEditURL">
<xsl:value-of select="actionmapping:getURLforID('update-admin',$id,true())" xmlns:actionmapping="xalan://org.mycore.wfc.actionmapping.MCRURLRetriever" />
</xsl:variable>
<xsl:variable name="editURL_allMods">
<xsl:call-template name="mods.getObjectEditURL">
<xsl:with-param name="id" select="$id" />
<xsl:with-param name="layout" select="'all'" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="copyURL">
<xsl:value-of select="actionmapping:getURLforID('create-copy',$id,true())" xmlns:actionmapping="xalan://org.mycore.wfc.actionmapping.MCRURLRetriever" />
</xsl:variable>
Expand All @@ -423,8 +417,7 @@
</xsl:when>
<xsl:otherwise>
<a class="btn btn-primary btn-sm w-100"
href="{$ServletsBaseURL}MCRBasketServlet{$HttpSession}?type={$basketType}&amp;action=add&amp;redirect={encoder:encode($RequestURL)}&amp;id={/mycoreobject/@ID}&amp;uri=mcrobject:{/mycoreobject/@ID}"
>
href="{$ServletsBaseURL}MCRBasketServlet{$HttpSession}?type={$basketType}&amp;action=add&amp;redirect={encoder:encode($RequestURL)}&amp;id={/mycoreobject/@ID}&amp;uri=mcrobject:{/mycoreobject/@ID}">
<i class="fas fa-plus">
<xsl:value-of select="' '" />
</i>
Expand Down Expand Up @@ -572,9 +565,11 @@
</xsl:choose>
</li>
</xsl:if>
<xsl:if test="string-length($editURL_allMods) &gt; 0">

<xsl:variable name="edit-all-mods-url" select="actionmapping:getURLforID('update-xml', $id, true())" xmlns:actionmapping="xalan://org.mycore.wfc.actionmapping.MCRURLRetriever"/>
<xsl:if test="string-length($edit-all-mods-url) &gt; 0">
<li>
<a href="{$editURL_allMods}" class="dropdown-item">
<a href="{$edit-all-mods-url}{$id}" class="dropdown-item">
<xsl:value-of select="i18n:translate('component.mods.object.editAllModsXML')" />
</a>
</li>
Expand Down
Loading