Added mountable class to edit buttons

This commit is contained in:
Eduard Urbach 2018-03-15 17:01:00 +01:00
parent a06130973c
commit 3ddfb73e88

View File

@ -43,12 +43,12 @@ func Render(obj interface{}, title string, user *arn.User) string {
isDraft := v.FieldByName("IsDraft").Interface().(bool)
if isDraft {
b.WriteString(`<div class="buttons"><button class="action" data-action="publish" data-trigger="click">` + utils.Icon("share-alt") + `Publish</button></div>`)
b.WriteString(`<div class="buttons"><button class="mountable action" data-action="publish" data-trigger="click">` + utils.Icon("share-alt") + `Publish</button></div>`)
}
}
if user.Role == "editor" || user.Role == "admin" {
b.WriteString(`<button class="action" data-action="deleteObject" data-trigger="click" data-return-path="/` + lowerCaseTypeName + "s" + `" data-confirm-type="` + lowerCaseTypeName + `">` + utils.Icon("trash") + `Delete</button>`)
b.WriteString(`<button class="mountable action" data-action="deleteObject" data-trigger="click" data-return-path="/` + lowerCaseTypeName + "s" + `" data-confirm-type="` + lowerCaseTypeName + `">` + utils.Icon("trash") + `Delete</button>`)
}
b.WriteString(`</div>`)