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
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 ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired"));
print '<br>';
@ -397,18 +397,17 @@ else
}
else print "<br>\n";
print $langs->trans("InstallEasy")." ";
print $langs->trans("ChooseYourSetupMode");
print '<br>';
//print $langs->trans("InstallEasy")." ";
print '<h3><span class="soustitre">'.$langs->trans("ChooseYourSetupMode").'...</span></h3>';
$foundrecommandedchoice=0;
$available_choices = array();
$notavailable_choices = array();
// Show first install line
$choice = "\n".'<tr><td class="nowrap center"><b>'.$langs->trans("FreshInstall").'</b>';
// Show line of first install choice
$choice = '<tr class="trlineforchoice">'."\n";
$choice .= '<td class="nowrap center"><b>'.$langs->trans("FreshInstall").'</b>';
$choice .= '</td>';
$choice .= '<td class="listofchoicesdesc">';
$choice .= $langs->trans("FreshInstallDesc");
@ -429,15 +428,16 @@ else
}
else
{
$choice .= $langs->trans("InstallNotAllowed");
$choice .= ($foundrecommandedchoice ? '<span class="warning">' : '').$langs->trans("InstallNotAllowed").($foundrecommandedchoice ? '</span>' : '');
}
$choice .= '</td>';
$choice .= '</td>'."\n";
$choice .= '</tr>'."\n";
$positionkey = ($foundrecommandedchoice ? 999 : 0);
if ($allowinstall) {
$available_choices[] = $choice;
$available_choices[$positionkey] = $choice;
} else {
$notavailable_choices[] = $choice;
$notavailable_choices[$positionkey] = $choice;
}
// 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="listofchoicesdesc">';
$choice .= $langs->trans("UpgradeDesc");
@ -541,7 +542,7 @@ else
}
if ($disabled)
{
$choice .= '<span class="button">'.$langs->trans("NotAvailable").'</span>';
$choice .= '<span class="button">'.$langs->trans("NotYetAvailable").'</span>';
}
else
{
@ -556,9 +557,9 @@ else
$choice .= '</tr>'."\n";
if ($allowupgrade) {
$available_choices[] = $choice;
$available_choices[$count] = $choice;
} else {
$notavailable_choices[] = $choice;
$notavailable_choices[$count] = $choice;
}
}
@ -570,6 +571,7 @@ else
}
// Array of install choices
krsort($available_choices, SORT_NATURAL);
print"\n";
print '<table width="100%" class="listofchoices">';
foreach ($available_choices as $choice) {

View File

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