Merge branch release/21.7.8 of zentao/zentaopms (#13118)
This commit is contained in:
@@ -1246,8 +1246,6 @@ class fileModel extends model
|
||||
*/
|
||||
public function printFile(object $file, string $method, bool $showDelete, bool $showEdit, object|null $object): string
|
||||
{
|
||||
if(!common::hasPriv('file', 'download') && !common::hasPriv('file', 'preview')) return '';
|
||||
|
||||
$html = '';
|
||||
|
||||
$sessionString = session_name() . '=' . session_id();
|
||||
@@ -1324,10 +1322,10 @@ class fileModel extends model
|
||||
if(stripos('txt|jpg|jpeg|gif|png|bmp|mp4', $file->extension) !== false) $canPreview = true;
|
||||
if(isset($this->config->file->libreOfficeTurnon) and $this->config->file->libreOfficeTurnon == 1 && $isOfficeFile) $canPreview = true;
|
||||
|
||||
if($canPreview)
|
||||
if($canPreview && common::hasPriv('file', 'preview'))
|
||||
{
|
||||
$dataToggle = $isOfficeFile ? '' : " data-toggle='modal' data-size='lg'";
|
||||
$html .= html::a(helper::createLink('file', 'download', "fileID=$file->id&mouse=left"), "<i class='icon icon-eye'></i>", $isOfficeFile ? '_blank' : '', "class='fileAction btn btn-link text-primary' title='{$this->lang->file->preview}' {$dataToggle}");
|
||||
$html .= html::a(helper::createLink('file', 'preview', "fileID=$file->id&mouse=left"), "<i class='icon icon-eye'></i>", $isOfficeFile ? '_blank' : '', "class='fileAction btn btn-link text-primary' title='{$this->lang->file->preview}' {$dataToggle}");
|
||||
}
|
||||
if(common::hasPriv('file', 'download')) $html .= html::a($downloadLink, "<i class='icon icon-download'></i>", '_blank', "class='fileAction btn btn-link text-primary' title='{$this->lang->file->downloadFile}'");
|
||||
if(common::hasPriv($objectType, 'edit', $object))
|
||||
|
||||
@@ -2976,7 +2976,7 @@ $config->group->package->file->privs['file-edit'] = array('edition' => '
|
||||
$config->group->package->file->privs['file-delete'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,lite,or', 'order' => 2, 'depend' => array(), 'recommend' => array('file-edit'));
|
||||
$config->group->package->file->privs['file-uploadImages'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,lite,or', 'order' => 3, 'depend' => array(), 'recommend' => array());
|
||||
$config->group->package->file->privs['file-setPublic'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,lite,or', 'order' => 25, 'depend' => array(), 'recommend' => array());
|
||||
$config->group->package->file->privs['file-preview'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,lite,or', 'order' => 26, 'depend' => array('file-download'), 'recommend' => array());
|
||||
$config->group->package->file->privs['file-preview'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,lite,or', 'order' => 26, 'depend' => array(), 'recommend' => array());
|
||||
|
||||
$config->group->package->commonEffort = new stdclass();
|
||||
$config->group->package->commonEffort->order = 5;
|
||||
|
||||
@@ -89,7 +89,7 @@ formBatchPanel
|
||||
set::ditto(true),
|
||||
set::defaultDitto('off')
|
||||
),
|
||||
formBatchItem
|
||||
$executionID && $execution->lifetime == 'ops' ? null : formBatchItem
|
||||
(
|
||||
set::name('story'),
|
||||
set::label($lang->task->story),
|
||||
|
||||
Reference in New Issue
Block a user