25 lines
913 B
PHP
Executable File
25 lines
913 B
PHP
Executable File
<?php
|
|
|
|
|
|
function smarty_function_sugar_document($params, &$smarty)
|
|
{
|
|
$html='';
|
|
global $current_user;
|
|
// if($current_user->is_admin==1){
|
|
include_once 'include/ECM/EcmDeleteDocument/EcmDeleteDocument.php';
|
|
$test= new EcmDeleteDocument($params['module'],$params['id']);
|
|
$html.=' <script src="include/ECM/EcmDeleteDocument/EcmDeleteDocument.js"></script>';
|
|
if($test->removeIsPossible()!=false){
|
|
$html.=' <input title="Anuluj[Alt+D]" accesskey="D" class="button"
|
|
onclick="deleteDocumentAjax();" type="button" name="Delete" value="Usuń">';
|
|
}
|
|
$test2= new EcmDeleteDocument($params['module'],$params['id']);
|
|
if($test2->cancelIsPossible()!=false){
|
|
$html.='<input title="Anuluj[Alt+D]" accesskey="D" class="button"
|
|
onclick="cancelDocumentAjax();" type="button" name="Delete" value="Anuluj">';
|
|
}
|
|
|
|
// }
|
|
return $html;
|
|
|
|
} |