Compare commits
No commits in common. "34d1285e4b0fbae4e43b0692c9b39c61ec39cf51" and "53502a27abba3a694671836b671a870f3ebdab30" have entirely different histories.
34d1285e4b
...
53502a27ab
4 changed files with 2 additions and 40 deletions
|
|
@ -56,7 +56,6 @@
|
||||||
"canExportAnnotations": {"member": true, "staff": true, "admin": true},
|
"canExportAnnotations": {"member": true, "staff": true, "admin": true},
|
||||||
"canImportAnnotations": {"member": true, "staff": true, "admin": true},
|
"canImportAnnotations": {"member": true, "staff": true, "admin": true},
|
||||||
"canImportItems": {"member": true, "staff": true, "admin": true},
|
"canImportItems": {"member": true, "staff": true, "admin": true},
|
||||||
"canTranscribeAudio": {"staff": true, "admin": true},
|
|
||||||
"canManageDocuments": {"member": true, "staff": true, "admin": true},
|
"canManageDocuments": {"member": true, "staff": true, "admin": true},
|
||||||
"canManageEntities": {"member": true, "staff": true, "admin": true},
|
"canManageEntities": {"member": true, "staff": true, "admin": true},
|
||||||
"canManageHome": {"staff": true, "admin": true},
|
"canManageHome": {"staff": true, "admin": true},
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,6 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
|
||||||
"canExportAnnotations": {"member": true, "staff": true, "admin": true},
|
"canExportAnnotations": {"member": true, "staff": true, "admin": true},
|
||||||
"canImportAnnotations": {"member": true, "staff": true, "admin": true},
|
"canImportAnnotations": {"member": true, "staff": true, "admin": true},
|
||||||
"canImportItems": {"member": true, "staff": true, "admin": true},
|
"canImportItems": {"member": true, "staff": true, "admin": true},
|
||||||
"canTranscribeAudio": {},
|
|
||||||
"canManageDocuments": {"member": true, "staff": true, "admin": true},
|
"canManageDocuments": {"member": true, "staff": true, "admin": true},
|
||||||
"canManageEntities": {"member": true, "staff": true, "admin": true},
|
"canManageEntities": {"member": true, "staff": true, "admin": true},
|
||||||
"canManageHome": {"staff": true, "admin": true},
|
"canManageHome": {"staff": true, "admin": true},
|
||||||
|
|
|
||||||
|
|
@ -436,7 +436,8 @@ def has_capability(user, capability):
|
||||||
level = 'guest'
|
level = 'guest'
|
||||||
else:
|
else:
|
||||||
level = user.profile.get_level()
|
level = user.profile.get_level()
|
||||||
return settings.CONFIG['capabilities'].get(capability, {}).get(level)
|
return level in settings.CONFIG['capabilities'][capability] \
|
||||||
|
and settings.CONFIG['capabilities'][capability][level]
|
||||||
|
|
||||||
def merge_users(old, new):
|
def merge_users(old, new):
|
||||||
old.annotations.all().update(user=new)
|
old.annotations.all().update(user=new)
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ pandora.ui.editor = function(data) {
|
||||||
enableDownload: pandora.hasCapability('canDownloadVideo') >= data.rightslevel || data.editable,
|
enableDownload: pandora.hasCapability('canDownloadVideo') >= data.rightslevel || data.editable,
|
||||||
enableExport: pandora.hasCapability('canExportAnnotations') || data.editable,
|
enableExport: pandora.hasCapability('canExportAnnotations') || data.editable,
|
||||||
enableImport: pandora.hasCapability('canImportAnnotations') || data.editable,
|
enableImport: pandora.hasCapability('canImportAnnotations') || data.editable,
|
||||||
enableTranscribe: pandora.hasCapability('canTranscribeAudio') && data.editable,
|
|
||||||
enableSetPosterFrame: !pandora.site.media.importFrames && data.editable,
|
enableSetPosterFrame: !pandora.site.media.importFrames && data.editable,
|
||||||
enableSubtitles: ui.videoSubtitles,
|
enableSubtitles: ui.videoSubtitles,
|
||||||
find: ui.itemFind,
|
find: ui.itemFind,
|
||||||
|
|
@ -433,42 +432,6 @@ pandora.ui.editor = function(data) {
|
||||||
togglesize: function(data) {
|
togglesize: function(data) {
|
||||||
pandora.UI.set({videoSize: data.size});
|
pandora.UI.set({videoSize: data.size});
|
||||||
},
|
},
|
||||||
transcribeaudio: function() {
|
|
||||||
const $dialog = pandora.ui.iconDialog({
|
|
||||||
buttons: [
|
|
||||||
Ox.Button({
|
|
||||||
id: 'cancel',
|
|
||||||
title: Ox._('Cancel')
|
|
||||||
})
|
|
||||||
.bindEvent({
|
|
||||||
click: function() {
|
|
||||||
$dialog.close();
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
Ox.Button({
|
|
||||||
id: 'transcribe',
|
|
||||||
title: Ox._('Transcribe Audio')
|
|
||||||
})
|
|
||||||
.bindEvent({
|
|
||||||
click: function() {
|
|
||||||
$dialog.close();
|
|
||||||
pandora.api.transcribeAudio({
|
|
||||||
item: pandora.user.ui.item
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
],
|
|
||||||
content: Ox._(
|
|
||||||
'Are you sure you want to add automated transcription to "{0}"',
|
|
||||||
[data.title]
|
|
||||||
),
|
|
||||||
keys: {enter: 'transcribe', escape: 'cancel'},
|
|
||||||
title: Ox._(
|
|
||||||
'Transcribe {0} {1}', [data.title]
|
|
||||||
)
|
|
||||||
});
|
|
||||||
$dialog.open()
|
|
||||||
},
|
|
||||||
pandora_showannotations: function(data) {
|
pandora_showannotations: function(data) {
|
||||||
that.options({showAnnotations: data.value});
|
that.options({showAnnotations: data.value});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue