Miglioramento informazioni su Aggiornamento
This commit is contained in:
parent
9d5fc20583
commit
b1cc2102a1
|
@ -10,10 +10,12 @@ $id = post('id');
|
|||
switch (filter('op')) {
|
||||
case 'check':
|
||||
$result = UpdateHook::isAvailable();
|
||||
$versione = $result[0].' ('.$result[1].')';
|
||||
|
||||
Cache::get('Ultima versione di OpenSTAManager disponibile')->set($result[0].' ('.$result[1].')');
|
||||
// Salvataggio della versione nella cache
|
||||
Cache::get('Ultima versione di OpenSTAManager disponibile')->set($versione);
|
||||
|
||||
echo $result[0];
|
||||
echo $versione;
|
||||
|
||||
break;
|
||||
|
||||
|
|
|
@ -125,10 +125,11 @@ function search(button) {
|
|||
op: "check",
|
||||
},
|
||||
success: function(data){
|
||||
if (data == "none" || data == "" ) {
|
||||
if (data === "none" || !data) {
|
||||
$("#update-search").html("'.tr('Nessun aggiornamento disponibile').'.");
|
||||
} else {
|
||||
$("#update-search").html("'.tr("E' stato individuato un nuovo aggiornamento").': " + data + ".<br>'.tr('Scaricalo ora: _LINK_', [
|
||||
let beta_warning = data.includes("beta") ? "<br><b>'.tr('Attenzione: la versione individuata è in fase sperimentale, e pertanto può presentare diversi bug e malfunzionamenti').'.</b>" : "";
|
||||
$("#update-search").html("'.tr("E' stato individuato un nuovo aggiornamento").': " + data + "." + beta_warning + "<br>'.tr('Scaricalo ora: _LINK_', [
|
||||
'_LINK_' => "<a target='_blank' href='https://github.com/devcode-it/openstamanager/releases'>https://github.com/devcode-it/openstamanager/releases</a>",
|
||||
]).'");
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ class UpdateHook extends CachedManager
|
|||
|
||||
if (!$api['prerelease'] or setting('Abilita canale pre-release per aggiornamenti')) {
|
||||
$version[0] = ltrim($api['tag_name'], 'v');
|
||||
$version[1] = (($api['prerelease']) ? 'prerelease' : 'stable');
|
||||
$version[1] = !empty($api['prerelease']) ? 'beta' : 'stabile';
|
||||
$current = Update::getVersion();
|
||||
|
||||
if (version_compare($current, $version[0]) < 0) {
|
||||
|
|
|
@ -174,7 +174,7 @@ switch (post('op')) {
|
|||
break;
|
||||
|
||||
case 'copy-bulk':
|
||||
$list = array();
|
||||
$list = [];
|
||||
foreach ($id_records as $id) {
|
||||
$fattura = Fattura::find($id);
|
||||
array_push($list, $fattura->numero_esterno);
|
||||
|
|
|
@ -83,8 +83,6 @@ UNION
|
|||
SELECT `co_promemoria`.`idtipointervento`, idcontratto AS id, numero, data_richiesta AS data, "Promemoria contratto" AS tipo_documento FROM `co_promemoria` LEFT JOIN co_contratti ON co_promemoria.idcontratto=co_contratti.id WHERE `co_promemoria`.`idtipointervento` = '.prepare($id_record).'
|
||||
ORDER BY `idtipointervento`');
|
||||
|
||||
|
||||
|
||||
if (!empty($elementi)) {
|
||||
echo '
|
||||
<div class="box box-warning collapsable collapsed-box">
|
||||
|
@ -108,17 +106,17 @@ if (!empty($elementi)) {
|
|||
|
||||
if (in_array($elemento['tipo_documento'], ['Intervento'])) {
|
||||
$modulo = 'Interventi';
|
||||
}
|
||||
if (in_array($elemento['tipo_documento'], ['Sessione intervento'])) {
|
||||
}
|
||||
if (in_array($elemento['tipo_documento'], ['Sessione intervento'])) {
|
||||
$modulo = 'Interventi';
|
||||
}
|
||||
}
|
||||
if (in_array($elemento['tipo_documento'], ['Anagrafica'])) {
|
||||
$modulo = 'Anagrafiche';
|
||||
}
|
||||
}
|
||||
if (in_array($elemento['tipo_documento'], ['Preventivo'])) {
|
||||
$modulo = 'Preventivi';
|
||||
}
|
||||
if (in_array($elemento['tipo_documento'], ['Promemoria contratto'])) {
|
||||
}
|
||||
if (in_array($elemento['tipo_documento'], ['Promemoria contratto'])) {
|
||||
$modulo = 'Contratti';
|
||||
}
|
||||
$id = $elemento['id'];
|
||||
|
|
Loading…
Reference in New Issue