NEW Add into about page, a sample text to use to promote new version
release (visible only if version is last stable)
This commit is contained in:
parent
8306d93286
commit
9a1ec900bd
@ -25,11 +25,15 @@
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("help");
|
||||
$langs->load("members");
|
||||
|
||||
$youuselaststable = 0;
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
@ -42,9 +46,54 @@ print load_fiche_titre("Dolibarr",'','title_setup');
|
||||
|
||||
print '<div style="padding-left: 30px;">'.img_picto_common('', 'dolibarr_box.png','height="120"').'</div>';
|
||||
|
||||
|
||||
|
||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||
|
||||
print $langs->trans("Version").' / '.$langs->trans("DolibarrLicense").':';
|
||||
print '<ul>';
|
||||
print '<li>'.DOL_VERSION.' / <a href="http://www.gnu.org/copyleft/gpl.html">GNU-GPL v3+</a></li>';
|
||||
print '<li><strong>'.DOL_VERSION.'</strong>';
|
||||
|
||||
$result = getURLContent('http://sourceforge.net/projects/dolibarr/rss');
|
||||
//var_dump($result['content']);
|
||||
$sfurl = simplexml_load_string($result['content']);
|
||||
if ($sfurl)
|
||||
{
|
||||
$title=$sfurl->channel[0]->item[0]->title;
|
||||
|
||||
function word_limiter($text, $limit = 30, $chars = '0123456789.')
|
||||
{
|
||||
if (strlen( $text ) > $limit)
|
||||
{
|
||||
$words = str_word_count($text, 2, $chars);
|
||||
$words = array_reverse($words, TRUE);
|
||||
foreach($words as $length => $word) {
|
||||
if ($length + strlen( $word ) >= $limit)
|
||||
{
|
||||
array_shift($words);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
$words = array_reverse($words);
|
||||
$text = implode(" ", $words) . '';
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
|
||||
$str = word_limiter($title);
|
||||
$str = preg_replace('/[^0-9\.]/', '', $str);
|
||||
print ' ('.$langs->trans("LastStableVersion").': <b>'.$str.'</b>';
|
||||
if (DOL_VERSION == $str)
|
||||
{
|
||||
$youuselaststable=1;
|
||||
print $langs->trans("YouUseLastStableVersion");
|
||||
}
|
||||
print ')';
|
||||
print ' / <a href="http://www.gnu.org/copyleft/gpl.html">GNU-GPL v3+</a></li>';
|
||||
}
|
||||
|
||||
|
||||
print '</ul>';
|
||||
|
||||
//print "<br>\n";
|
||||
@ -114,6 +163,9 @@ print '</li>';
|
||||
print '</ul>';
|
||||
|
||||
|
||||
print '</div><div class="fichehalfright">';
|
||||
|
||||
|
||||
print $langs->trans("HelpCenter").':';
|
||||
print '<ul>';
|
||||
print '<li>';
|
||||
@ -122,6 +174,7 @@ print '<a target="_blank" href="'.DOL_URL_ROOT.'/support/index.php" data-ajax="f
|
||||
print '</li>';
|
||||
print '</ul>';
|
||||
|
||||
|
||||
print $langs->trans("Foundation").':';
|
||||
|
||||
print '<ul>';
|
||||
@ -153,6 +206,33 @@ print '</li>';
|
||||
|
||||
print '</ul>';
|
||||
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
print '<div class="clearboth"></div>';
|
||||
|
||||
|
||||
if ($youuselaststable)
|
||||
{
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
$tmp=versiondolibarrarray();
|
||||
if ((empty($tmp[2]) && (strpos($tmp[1], '0') === 0)) || (strpos($tmp[2], '0') === 0))
|
||||
{
|
||||
print $langs->trans("TitleExampleForMajorRelease").':<br>';
|
||||
print '<textarea style="width:80%; min-height: 60px">';
|
||||
print $langs->trans("ExampleOfNewsMessageForMajorRelease", DOL_VERSION, DOL_VERSION);
|
||||
print '</textarea>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("TitleExampleForMaintenanceRelease").':<br>';
|
||||
print '<textarea style="width:80%; min-height: 60px">';
|
||||
print $langs->trans("ExampleOfNewsMessageForMaintenanceRelease", DOL_VERSION, DOL_VERSION);
|
||||
print '</textarea>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
|
||||
@ -1693,4 +1693,10 @@ MailToSendSupplierRequestForQuotation=To send quotation request to supplier
|
||||
MailToSendSupplierOrder=To send supplier order
|
||||
MailToSendSupplierInvoice=To send supplier invoice
|
||||
MailToThirdparty=To send email from thirdparty page
|
||||
ByDefaultInList=Show by default on list view
|
||||
ByDefaultInList=Show by default on list view
|
||||
YouUseLastStableVersion=You use the last stable version
|
||||
TitleExampleForMajorRelease=Example of message you can use to announce this major release (feel free to use it on your web sites)
|
||||
TitleExampleForMaintenanceRelease=Example of message you can use to announce this maintenance release (feel free to use it on your web sites)
|
||||
ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version %s is a major release with a lot of new features for both users and developers. You can download it from the download area of http://www.dolibarr.org portal (subdirectory Stable versions). You can read <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a> for complete list of changes.
|
||||
ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so it contains only fixes of bugs. We recommend everybody using an older version to upgrade to this one. As any maintenance release, no new features, nor data structure change is present into this version. You can download it from the download area of http://www.dolibarr.org portal (subdirectory Stable versions). You can read <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a> for complete list of changes.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user