* [task#129965,done,2h] Add effor action.
This commit is contained in:
@@ -347,6 +347,7 @@ const actionsMap =
|
||||
const moreItems = [];
|
||||
if(canMoveDoc(doc)) moreItems.push({icon: 'folder-move', text: lang.moveDoc, command: `moveDoc/${doc.id}`});
|
||||
if(hasPriv('delete')) moreItems.push({icon: 'trash', text: lang.delete, command: `deleteDoc/${doc.id}`});
|
||||
if(hasPriv('effort')) moreItems.push({icon: 'time', text: lang.effort, command: `effortDoc/${doc.id}`});
|
||||
if(hasPriv('exportDoc')) moreItems.push({icon: 'export', text: lang.export, command: 'exportDoc'});
|
||||
|
||||
return [
|
||||
@@ -691,6 +692,14 @@ const commands =
|
||||
}
|
||||
});
|
||||
},
|
||||
effortDoc: function(_,args)
|
||||
{
|
||||
const docApp = getDocApp();
|
||||
const docID = args[0] || docApp.docID;
|
||||
const url = $.createLink('effort', 'createForObject', `objectType=doc&objectID=${docID}`);
|
||||
|
||||
zui.Modal.open({url: url, size: 'sm'});
|
||||
},
|
||||
exportDoc: function(_, args)
|
||||
{
|
||||
const docApp = getDocApp();
|
||||
|
||||
@@ -178,6 +178,7 @@ $lang->doc->createAB = 'Create';
|
||||
$lang->doc->create = 'Dokument hinzufügen';
|
||||
$lang->doc->createOrUpload = 'Create/Upload Document';
|
||||
$lang->doc->edit = 'Bearbeiten';
|
||||
$lang->doc->effort = 'Effort';
|
||||
$lang->doc->delete = 'Löschen';
|
||||
$lang->doc->createBook = 'Create Book';
|
||||
$lang->doc->browse = 'Liste';
|
||||
|
||||
@@ -178,6 +178,7 @@ $lang->doc->createAB = 'Create';
|
||||
$lang->doc->create = 'Create Document';
|
||||
$lang->doc->createOrUpload = 'Create/Import Document';
|
||||
$lang->doc->edit = 'Edit Document';
|
||||
$lang->doc->effort = 'Effort';
|
||||
$lang->doc->delete = 'Delete Document';
|
||||
$lang->doc->createBook = 'Create Book';
|
||||
$lang->doc->browse = 'Document List';
|
||||
|
||||
@@ -178,6 +178,7 @@ $lang->doc->createAB = 'Create';
|
||||
$lang->doc->create = 'Ajouter Document';
|
||||
$lang->doc->createOrUpload = 'Create/Upload Document';
|
||||
$lang->doc->edit = 'Editer Document';
|
||||
$lang->doc->effort = 'Effort';
|
||||
$lang->doc->delete = 'Supprimer Document';
|
||||
$lang->doc->createBook = 'Create Book';
|
||||
$lang->doc->browse = 'Liste Documents';
|
||||
|
||||
@@ -178,6 +178,7 @@ $lang->doc->createAB = '创建';
|
||||
$lang->doc->create = '创建文档';
|
||||
$lang->doc->createOrUpload = '创建/导入文档';
|
||||
$lang->doc->edit = '编辑文档';
|
||||
$lang->doc->effort = '日志';
|
||||
$lang->doc->delete = '删除文档';
|
||||
$lang->doc->createBook = '创建手册';
|
||||
$lang->doc->browse = '文档列表';
|
||||
|
||||
@@ -39,6 +39,7 @@ $privs = array();
|
||||
$privs['create'] = hasPriv('doc', 'create');
|
||||
$privs['edit'] = hasPriv('doc', 'edit');
|
||||
$privs['delete'] = hasPriv('doc', 'delete');
|
||||
$privs['effort'] = hasPriv('effort', 'createForObject');
|
||||
$privs['exportDoc'] = $this->config->edition != 'open' && hasPriv('doc', $type . '2export');
|
||||
$privs['moveDoc'] = hasPriv('doc', 'moveDoc');
|
||||
$privs['collect'] = hasPriv('doc', 'collect');
|
||||
@@ -85,6 +86,7 @@ $langData->moveTo = $lang->doc->moveTo;
|
||||
$langData->create = $lang->doc->createAB;
|
||||
$langData->createDoc = $lang->doc->create;
|
||||
$langData->editDoc = $lang->doc->edit;
|
||||
$langData->effort = $lang->doc->effort;
|
||||
$langData->deleteDoc = $lang->doc->delete;
|
||||
$langData->uploadDoc = $lang->doc->uploadDoc;
|
||||
$langData->createList = $lang->doc->createList;
|
||||
|
||||
Reference in New Issue
Block a user