Editors can now refresh audio downloads

This commit is contained in:
2018-10-31 05:24:12 +09:00
parent 3a6cd6b3bc
commit 000f04025b
11 changed files with 107 additions and 2 deletions

View File

@ -49,6 +49,13 @@ func Render(obj interface{}, title string, user *arn.User) string {
}
}
// Redownload button
track, isSoundTrack := obj.(*arn.SoundTrack)
if isSoundTrack && !track.IsDraft && track.HasMediaByService("Youtube") && track.File == "" && (user.Role == "editor" || user.Role == "admin") {
b.WriteString(`<button class="mountable action" data-action="downloadSoundTrackFile" data-trigger="click" data-id="` + track.ID + `">` + utils.Icon("refresh") + `Redownload</button>`)
}
// Delete button
_, isDeletable := obj.(api.Deletable)