* [bug #58920] add doc exporting button to doc detail in quick view.
This commit is contained in:
@@ -77,3 +77,17 @@ window.docAppActions.doc = function(info)
|
||||
}
|
||||
return actions;
|
||||
};
|
||||
|
||||
window.docAppCommands.exportWord = function(_, args)
|
||||
{
|
||||
const docApp = getDocApp();
|
||||
const docID = args[2] || docApp.docID;
|
||||
const doc = docID ? docApp.getDoc(docID) : null;
|
||||
if(!doc || !doc.objectType) return;
|
||||
|
||||
const moduleID = args[1] || docApp.moduleID;
|
||||
const libID = doc.libInfo ? doc.libInfo.id : (args[0] || docApp.libID);
|
||||
const type = doc.objectType || doc.object.type;
|
||||
const url = $.createLink('doc', `${type}2export`, `libID=${libID}&moduleID=${moduleID}&docID=${docID}`);
|
||||
window.open(url, '_self');
|
||||
};
|
||||
|
||||
@@ -17,6 +17,8 @@ $privs['moveDoc'] = hasPriv('doc', 'moveDoc');
|
||||
$privs['collect'] = hasPriv('doc', 'collect');
|
||||
$privs['batchMoveDoc'] = hasPriv('doc', 'batchMoveDoc');
|
||||
$privs['view'] = hasPriv('doc', 'view');
|
||||
$privs['exportDoc'] = $this->config->edition != 'open' && hasPriv('doc', $type . '2export');
|
||||
$privs['exportApi'] = $this->config->edition != 'open' && hasPriv('api', 'export');
|
||||
|
||||
$spaceID = 1;
|
||||
$libID = $menu['id'];
|
||||
|
||||
Reference in New Issue
Block a user