fix: open public folder files in new tab
This commit is contained in:
@@ -585,7 +585,11 @@ func (h *NodeHandler) renderPublicFolder(w http.ResponseWriter, r *http.Request,
|
|||||||
href = h.publicOfficeURL(token, child.ID, officeID)
|
href = h.publicOfficeURL(token, child.ID, officeID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
b.WriteString(`<a class="item" href="` + html.EscapeString(href) + `">`)
|
target := ""
|
||||||
|
if child.NodeType != model.NodeTypeFolder {
|
||||||
|
target = ` target="_blank" rel="noopener noreferrer"`
|
||||||
|
}
|
||||||
|
b.WriteString(`<a class="item" href="` + html.EscapeString(href) + `"` + target + `>`)
|
||||||
b.WriteString(`<span class="badge">` + html.EscapeString(kind) + `</span>`)
|
b.WriteString(`<span class="badge">` + html.EscapeString(kind) + `</span>`)
|
||||||
b.WriteString(`<span class="title">` + html.EscapeString(title) + `</span>`)
|
b.WriteString(`<span class="title">` + html.EscapeString(title) + `</span>`)
|
||||||
if child.NodeType != model.NodeTypeFolder {
|
if child.NodeType != model.NodeTypeFolder {
|
||||||
|
|||||||
Reference in New Issue
Block a user