';
// 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
ob_start();
include Modules::filepath($id_module, 'buttons.php');
$buttons = ob_get_clean();
if (!empty($buttons)) {
echo '
'.$buttons.'
';
}
// Contenuti del modulo
echo '
';
include $element['edit_file'];
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');
foreach ($operations as $operation) {
$description = $operation['op'];
$icon = 'pencil-square-o';
$color = null;
$timeline = 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="timeline-inverted"';
break;
}
echo '
-
'.$description.'
'.Translator::timestampToLocale($operation['created_at']).'
'.tr('Utente: _USER_', [
'_USER_' => $operation['username'],
]).'
';
}
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 '