Last recent versions of migration at top

This commit is contained in:
Laurent Destailleur 2019-11-02 17:18:34 +01:00
parent c83a72a909
commit ec9ce1721b
2 changed files with 20 additions and 15 deletions

View File

@ -389,7 +389,7 @@ else
// Show title // Show title
if (! empty($conf->global->MAIN_VERSION_LAST_UPGRADE) || ! empty($conf->global->MAIN_VERSION_LAST_INSTALL)) if (! empty($conf->global->MAIN_VERSION_LAST_UPGRADE) || ! empty($conf->global->MAIN_VERSION_LAST_INSTALL))
{ {
print $langs->trans("VersionLastUpgrade").': <b><span class="ok">'.(empty($conf->global->MAIN_VERSION_LAST_UPGRADE)?$conf->global->MAIN_VERSION_LAST_INSTALL:$conf->global->MAIN_VERSION_LAST_UPGRADE).'</span></b><br>'; print $langs->trans("VersionLastUpgrade").': <b><span class="ok">'.(empty($conf->global->MAIN_VERSION_LAST_UPGRADE)?$conf->global->MAIN_VERSION_LAST_INSTALL:$conf->global->MAIN_VERSION_LAST_UPGRADE).'</span></b> - ';
print $langs->trans("VersionProgram").': <b><span class="ok">'.DOL_VERSION.'</span></b>'; print $langs->trans("VersionProgram").': <b><span class="ok">'.DOL_VERSION.'</span></b>';
//print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired")); //print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired"));
print '<br>'; print '<br>';
@ -397,18 +397,17 @@ else
} }
else print "<br>\n"; else print "<br>\n";
print $langs->trans("InstallEasy")." "; //print $langs->trans("InstallEasy")." ";
print $langs->trans("ChooseYourSetupMode"); print '<h3><span class="soustitre">'.$langs->trans("ChooseYourSetupMode").'...</span></h3>';
print '<br>';
$foundrecommandedchoice=0; $foundrecommandedchoice=0;
$available_choices = array(); $available_choices = array();
$notavailable_choices = array(); $notavailable_choices = array();
// Show first install line // Show line of first install choice
$choice = "\n".'<tr><td class="nowrap center"><b>'.$langs->trans("FreshInstall").'</b>'; $choice = '<tr class="trlineforchoice">'."\n";
$choice .= '<td class="nowrap center"><b>'.$langs->trans("FreshInstall").'</b>';
$choice .= '</td>'; $choice .= '</td>';
$choice .= '<td class="listofchoicesdesc">'; $choice .= '<td class="listofchoicesdesc">';
$choice .= $langs->trans("FreshInstallDesc"); $choice .= $langs->trans("FreshInstallDesc");
@ -429,15 +428,16 @@ else
} }
else else
{ {
$choice .= $langs->trans("InstallNotAllowed"); $choice .= ($foundrecommandedchoice ? '<span class="warning">' : '').$langs->trans("InstallNotAllowed").($foundrecommandedchoice ? '</span>' : '');
} }
$choice .= '</td>'; $choice .= '</td>'."\n";
$choice .= '</tr>'."\n"; $choice .= '</tr>'."\n";
$positionkey = ($foundrecommandedchoice ? 999 : 0);
if ($allowinstall) { if ($allowinstall) {
$available_choices[] = $choice; $available_choices[$positionkey] = $choice;
} else { } else {
$notavailable_choices[] = $choice; $notavailable_choices[$positionkey] = $choice;
} }
// Show upgrade lines // Show upgrade lines
@ -508,7 +508,8 @@ else
} }
} }
$choice .= "\n".'<tr'.($recommended_choice ? ' class="choiceselected"' : '').'>'; $choice .= "\n".'<!-- choice '.$count.' -->'."\n";
$choice .= '<tr'.($recommended_choice ? ' class="choiceselected"' : '').'>';
$choice .= '<td class="nowrap center"><b>'.$langs->trans("Upgrade").'<br>'.$newversionfrom.$newversionfrombis.' -> '.$newversionto.'</b></td>'; $choice .= '<td class="nowrap center"><b>'.$langs->trans("Upgrade").'<br>'.$newversionfrom.$newversionfrombis.' -> '.$newversionto.'</b></td>';
$choice .= '<td class="listofchoicesdesc">'; $choice .= '<td class="listofchoicesdesc">';
$choice .= $langs->trans("UpgradeDesc"); $choice .= $langs->trans("UpgradeDesc");
@ -541,7 +542,7 @@ else
} }
if ($disabled) if ($disabled)
{ {
$choice .= '<span class="button">'.$langs->trans("NotAvailable").'</span>'; $choice .= '<span class="button">'.$langs->trans("NotYetAvailable").'</span>';
} }
else else
{ {
@ -556,9 +557,9 @@ else
$choice .= '</tr>'."\n"; $choice .= '</tr>'."\n";
if ($allowupgrade) { if ($allowupgrade) {
$available_choices[] = $choice; $available_choices[$count] = $choice;
} else { } else {
$notavailable_choices[] = $choice; $notavailable_choices[$count] = $choice;
} }
} }
@ -570,6 +571,7 @@ else
} }
// Array of install choices // Array of install choices
krsort($available_choices, SORT_NATURAL);
print"\n"; print"\n";
print '<table width="100%" class="listofchoices">'; print '<table width="100%" class="listofchoices">';
foreach ($available_choices as $choice) { foreach ($available_choices as $choice) {

View File

@ -82,6 +82,9 @@ div.soustitre {
.minwidth400imp { min-width: 400px !important; } .minwidth400imp { min-width: 400px !important; }
.minwidth500imp { min-width: 500px !important; } .minwidth500imp { min-width: 500px !important; }
tr.trlineforchoice {
height: 4em;
}
/* Force values for small screen 570 */ /* Force values for small screen 570 */
@media only screen and (max-width: 570px) @media only screen and (max-width: 570px)