';
if(!empty($record['deleted_at'])){
echo '
'.tr('Ripristinare il record?').'
'.tr('Ripristina').'
';
}
// Pulsanti di default
echo '
'.tr("Torna all'elenco").'
{( "name": "button", "type": "print", "id_module": "'.$id_module.'", "id_record": "'.$id_record.'" )}
{( "name": "button", "type": "email", "id_module": "'.$id_module.'", "id_record": "'.$id_record.'" )}
'.tr('Salva').'
';
// Pulsanti personalizzati
$buttons = $structure->filepath('buttons.php');
if (!empty($buttons)) {
ob_start();
include $buttons;
$buttons = ob_get_clean();
echo '
'.$buttons.'
';
}
// Contenuti del modulo
echo '
';
include $structure->getEditFile();
echo '
';
// Campi personalizzati
echo '
{( "name": "custom_fields", "id_module": "'.$id_module.'", "id_record": "'.$id_record.'", "position": "top" )}
{( "name": "custom_fields", "id_module": "'.$id_module.'", "id_record": "'.$id_record.'" )}
';
// Informazioni sulle operazioni
if (Auth::admin()) {
echo '
';
$operations = $dbo->fetchArray('SELECT `zz_operations`.*, `zz_users`.`username` FROM `zz_operations` JOIN `zz_users` ON `zz_operations`.`id_utente` = `zz_users`.`id` WHERE id_module = '.prepare($id_module).' AND id_record = '.prepare($id_record).' ORDER BY `created_at` ASC LIMIT 200');
if (!empty($operations)) {
echo '
';
foreach ($operations as $operation) {
$description = $operation['op'];
$icon = 'pencil-square-o';
$color = null;
$timeline_class = null;
switch ($operation['op']) {
case 'add':
$description = tr('Creazione');
$icon = 'plus';
$color = 'success';
break;
case 'update':
$description = tr('Modifica');
$icon = 'pencil';
$color = 'info';
break;
case 'delete':
$description = tr('Eliminazione');
$icon = 'times';
$color = 'danger';
break;
default:
$timeline_class = ' class="timeline-inverted"';
break;
}
echo '
-
'.$description.'
'.Carbon::parse($operation['created_at'])->diffForHumans().'
'.tr('_USER_', [
'_USER_' => $operation['username'],
]).
'
';
}
echo '
';
} else {
echo '
'.tr('Informazione:').' '.tr('Nessun log disponibile per questa scheda').'.
';
}
echo '
';
}
// Plugin
$module_record = $record;
foreach ($plugins as $plugin) {
$record = $module_record;
echo '
';
$id_plugin = $plugin['id'];
include DOCROOT.'/include/manager.php';
echo '
';
}
$record = $module_record;
echo '