Skip to content

Commit

Permalink
makes preview link open in another window
Browse files Browse the repository at this point in the history
  • Loading branch information
richmahn committed Dec 26, 2024
1 parent fcbb44d commit 1027e8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/custom/extra_tabs.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{{$refToPreview = .BranchName}}
{{end}}
{{if $.RepoDM.ID}}
<a class="item" data-tooltip-content="Preview.Door43.org" target="_blank" href="{{Door43PreviewURL}}/u/{{.Owner.Name}}/{{.Repository.Name}}/{{$refToPreview | PathEscapeSegments}}{{if eq AppUrl "https://qa.door43.org/"}}?server=QA{{end}}{{if eq AppUrl "https://develop.door43.org/"}}?server=DEV{{end}}">
<a class="item" data-tooltip-content="Preview.Door43.org" href="{{Door43PreviewURL}}/u/{{.Owner.Name}}/{{.Repository.Name}}/{{$refToPreview | PathEscapeSegments}}{{if eq AppUrl "https://qa.door43.org/"}}?server=QA{{end}}{{if eq AppUrl "https://develop.door43.org/"}}?server=DEV{{end}}" target="_blank" rel="nofollow noopener">
{{svg "octicon-book"}} {{ctx.Locale.Tr "preview"}} / PDF
</a>
{{end}}
3 changes: 2 additions & 1 deletion templates/repo/dcs_metadata_list_item.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
</a>
{{end}}
<a class="item"
href="{{Door43PreviewURL}}/u/{{.ctxData.Repository.OwnerName}}/{{.ctxData.Repository.Name}}/{{PathEscapeSegments $dm.Ref}}">
href="{{Door43PreviewURL}}/u/{{.ctxData.Repository.OwnerName}}/{{.ctxData.Repository.Name}}/{{PathEscapeSegments $dm.Ref}}"
target="_blank" rel="nofollow noopener">
Preview / PDF
</a>
{{if or $.ctxData.Permission.IsAdmin $.ctxData.IsOrganizationOwner $.ctxData.PageIsAdmin $.ctxData.PageIsUserSettings}}
Expand Down

0 comments on commit 1027e8a

Please sign in to comment.