Skip to content

Commit

Permalink
UBO-282 Include mycore2orcid.js inresponse.xsl (was accidentally remo… (
Browse files Browse the repository at this point in the history
#339)

* UBO-282 Include mycore2orcid.js inresponse.xsl (was accidentally removed recently)

* UBO-282 Moved invocation of template notification-dialog to if-block
  • Loading branch information
Possommi authored Dec 5, 2023
1 parent 4f39688 commit b7f25e0
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions ubo-common/src/main/resources/xsl/response.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,24 @@
<html id="dozbib.search">
<head>
<xsl:call-template name="page.title" />
<xsl:if test="not(mcrxml:isCurrentUserGuestUser()) and string-length($MCR.ORCID2.OAuth.ClientSecret) &gt; 0 and contains($MCR.ORCID2.OAuth.Scope,'update')">

<xsl:call-template name="notification-dialog">
<xsl:with-param name="id" select="'success'"/>
<xsl:with-param name="title" select="'⚠'"/>
<xsl:with-param name="message" select="i18n:translate('orcid.publication.action.confirmation')"/>
</xsl:call-template>
<xsl:call-template name="notification-dialog">
<xsl:with-param name="id" select="'fail'"/>
<xsl:with-param name="title" select="'⚠'"/>
<xsl:with-param name="message" select="i18n:translate('upload.failed')"/>
</xsl:call-template>
<xsl:if test="string-length($MCR.ORCID2.OAuth.ClientSecret) &gt; 0 and contains($MCR.ORCID2.OAuth.Scope,'update')">

<xsl:if test="not(mcrxml:isCurrentUserGuestUser())">
<script src="{$WebApplicationBaseURL}modules/orcid2/js/orcid-auth.js"/>
<script src="{$WebApplicationBaseURL}js/mycore2orcid.js" />

<xsl:call-template name="notification-dialog">
<xsl:with-param name="id" select="'success'"/>
<xsl:with-param name="title" select="'⚠'"/>
<xsl:with-param name="message" select="i18n:translate('orcid.publication.action.confirmation')"/>
</xsl:call-template>

<xsl:call-template name="notification-dialog">
<xsl:with-param name="id" select="'fail'"/>
<xsl:with-param name="title" select="'⚠'"/>
<xsl:with-param name="message" select="i18n:translate('upload.failed')"/>
</xsl:call-template>
</xsl:if>
</xsl:if>
</head>
<body>
Expand Down

0 comments on commit b7f25e0

Please sign in to comment.