show changelog file of extensions

This commit is contained in:
Uwe Steinmann 2018-03-16 11:19:12 +01:00
parent 6c16c52426
commit dce83545b8
3 changed files with 10 additions and 2 deletions

View File

@ -3,6 +3,7 @@
--------------------------------------------------------------------------------
- PLEASE READ doc/README.Dist-Layout WHEN UPGRADING!!!!
- support for upload/import/download of extensions
- extension can have a changelog file
- remove ancient code to upgrade from old config file
- place all log files in contentDir/log
- add readme for new dist layout

View File

@ -48,6 +48,7 @@ else
if($view) {
$view->setParam('httproot', $settings->_httpRoot);
$view->setParam('extdir', $settings->_rootDir."/ext");
$view->setParam('version', $v);
$view->setParam('extmgr', $extmgr);
$view->setParam('currenttab', $currenttab);

View File

@ -67,6 +67,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Bootstrap_Style {
$dms = $this->params['dms'];
$user = $this->params['user'];
$httproot = $this->params['httproot'];
$extdir = $this->params['extdir'];
$version = $this->params['version'];
$extmgr = $this->params['extmgr'];
$currenttab = $this->params['currenttab'];
@ -138,11 +139,16 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Bootstrap_Style {
if($extconf['icon'])
echo "<img src=\"".$httproot."ext/".$extname."/".$extconf['icon']."\" alt=\"".$extname."\" title=\"".$extname."\">";
echo "</td>";
echo "<td>".$extconf['title']."<br /><small>".$extconf['description']."</small>";
echo "<td>".$extconf['title'];
if($extconf['changelog'] && file_exists($extdir."/".$extname."/".$extconf['changelog'])) {
echo $this->printPopupBox("<i class=\"icon-reorder\"></i>", '<div style="white-space: pre-wrap; font-family: monospace; padding: 0px;">'.file_get_contents($extdir."/".$extname."/".$extconf['changelog'])."</div>", true);
}
echo "<br /><small>".$extconf['description']."</small>";
if($errmsgs)
echo "<div><img src=\"".$this->getImgPath("attention.gif")."\"> ".implode('<br /><img src="'.$this->getImgPath("attention.gif").'"> ', $errmsgs)."</div>";
echo "</td>";
echo "<td nowrap>".$extconf['version']."<br /><small>".$extconf['releasedate']."</small>";
echo "<td nowrap>".$extconf['version'];
echo "<br /><small>".$extconf['releasedate']."</small>";
echo "</td>";
echo "<td nowrap><a href=\"mailto:".$extconf['author']['email']."\">".$extconf['author']['name']."</a><br /><small>".$extconf['author']['company']."</small></td>";
echo "<td nowrap>";