. */ include_once __DIR__.'/../../core.php'; echo ' '; $widgets = $dbo->fetchArray('SELECT `zz_widgets`.*, `zz_widgets_lang`.`title` as name, `zz_modules_lang`.`title` AS modulo FROM zz_widgets LEFT JOIN `zz_widgets_lang` ON (`zz_widgets`.`id` = `zz_widgets_lang`.`id_record` AND `zz_widgets_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') INNER JOIN `zz_modules` ON `zz_widgets`.`id_module` = `zz_modules`.`id` LEFT JOIN `zz_modules_lang` ON (`zz_modules`.`id` = `zz_modules_lang`.`id_record` AND `zz_modules_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') ORDER BY `id_module` ASC, `zz_widgets`.`order` ASC'); $gruppi = collect($widgets)->groupBy('modulo'); foreach ($gruppi as $modulo => $widgets) { echo ' '; foreach ($widgets as $widget) { $class = $widget['enabled'] ? 'success' : 'warning'; $nome_tipo = 'widget'; echo ' '; } echo ' '; } echo '
'.tr('Nome').' '.tr('Dimensione').' '.tr('Ubicazione').' '.tr('Stato').' '.tr('Posizione').'
'.$modulo.'
'.$widget['name'].(!empty($widget['help']) ? ' ' : '').' {[ "type": "select", "name": "dimensione[]", "class": "widgets", "value": "'.$widget['class'].'", "values": "list=\"0\": \"'.tr('Da impostazioni').'\", \"col-md-3\": \"'.tr('Piccolo').'\", \"col-md-4\": \"'.tr('Medio').'\", \"col-md-6\": \"'.tr('Grande').'\", \"col-md-12\": \"'.tr('Molto grande').'\"", "extra": "data-id=\"'.$widget['id'].'\"" ]} '.( string_starts_with($widget['location'], 'controller') ? tr('Schermata modulo') : tr('Schermata dettagli') ).' '; // Possibilità di disabilitare o abilitare il widget if ($widget['enabled']) { echo '
'; } else { echo '
'; } echo '
'; // Possibilità di spostare il widget if (string_ends_with($widget['location'], 'top')) { echo '
'; } else { echo '
'; } echo '
';