Skip to content

Commit

Permalink
#8184 change nominal url add redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
sekmiller committed Oct 16, 2024
1 parent 94a8942 commit 8084bc6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class PrivateUrl {

public PrivateUrl(RoleAssignment roleAssignment, Dataset dataset, String dataverseSiteUrl) {
this.token = roleAssignment.getPrivateUrlToken();
this.link = dataverseSiteUrl + "/privateurl.xhtml?token=" + token;
this.link = dataverseSiteUrl + "/previewurl.xhtml?token=" + token;
this.dataset = dataset;
this.roleAssignment = roleAssignment;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/dataset.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@

<p>
<p>
<h:outputText styleClass="highlightBold" value="#{bundle['dataset.privateurl.general.title']}"></h:outputText></p>
<h:outputText styleClass="highlightBold" value="#{bundle['dataset.privateurl.general.title']}"></h:outputText></p>
<p>#{bundle['dataset.privateurl.general.description']}</p>
<p:commandButton styleClass="btn btn-default"
value="#{bundle['dataset.privateurl.general.button.label']}"
Expand Down
24 changes: 24 additions & 0 deletions src/main/webapp/previewurl.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:jsf="http://xmlns.jcp.org/jsf"
xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>

<h:body>
<ui:composition template="/dataverse_template.xhtml">
<ui:param name="pageTitle" value="#{bundle['dataset.privateurl.header']}"/>
<ui:param name="showDataverseHeader" value="false"/>
<ui:define name="body">
<f:metadata>
<f:viewParam name="token" value="#{PrivateUrlPage.token}"/>
<f:viewAction action="#{dataverseSession.updateLocaleInViewRoot}"/>
<f:viewAction action="#{PrivateUrlPage.init}" />
</f:metadata>
</ui:define>
</ui:composition>
</h:body>
</html>

0 comments on commit 8084bc6

Please sign in to comment.