show latest changelog of uninstalled extensions

This commit is contained in:
Uwe Steinmann 2020-08-14 11:11:40 +02:00
parent 4a3b7ebe71
commit 65c1bccf82

View File

@ -94,7 +94,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Bootstrap_Style {
$this->printFileChooserJs();
} /* }}} */
function info() { /* {{{ */
function info_versions() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
$extmgr = $this->params['extmgr'];
@ -140,6 +140,19 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Bootstrap_Style {
echo "</tbody></table>\n";
} /* }}} */
function info_changelog() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
$extmgr = $this->params['extmgr'];
$extname = $this->params['extname'];
$extconf = $extmgr->getExtensionConfiguration();
$list = $extmgr->getExtensionListByName($extname);
/* Just show the changelog of the latest version */
$re = array_shift($list);
echo '<div style="white-space: pre-wrap; font-family: monospace; padding: 0px;">'.$re['changelog']."</div>";
} /* }}} */
function changelog() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
@ -314,7 +327,8 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Bootstrap_Style {
echo "<td nowrap>".$re['author']['name']."<br /><small>".$re['author']['company']."</small></td>";
echo "<td nowrap>";
echo "<div class=\"list-action\">";
echo "<a data-target=\"#extensionInfo\" href=\"../out/out.ExtensionMgr.php?action=info&extensionname=".$re['name']."\" data-toggle=\"modal\" title=\"".getMLText('show_extension_version_list')."\"><i class=\"icon-list-ol\"></i></a>\n";
echo "<a data-target=\"#extensionInfo\" href=\"../out/out.ExtensionMgr.php?action=info_versions&extensionname=".$re['name']."\" data-toggle=\"modal\" title=\"".getMLText('show_extension_version_list')."\"><i class=\"icon-list-ol\"></i></a>\n";
echo "<a data-target=\"#extensionChangelog\" href=\"../out/out.ExtensionMgr.php?action=info_changelog&extensionname=".$re['name']."\" data-toggle=\"modal\" title=\"".getMLText('show_extension_changelog')."\"><i class=\"icon-reorder\"></i></a>\n";
if(!$checkmsgs && $extmgr->isWritableExtDir())
echo "<form style=\"display: inline-block; margin: 0px;\" method=\"post\" action=\"../op/op.ExtensionMgr.php\" id=\"".$re['name']."-import\">".createHiddenFieldWithKey('extensionmgr')."<input type=\"hidden\" name=\"action\" value=\"import\" /><input type=\"hidden\" name=\"currenttab\" value=\"repository\" /><input type=\"hidden\" name=\"url\" value=\"".$re['filename']."\" /><a class=\"import\" data-extname=\"".$re['name']."\" title=\"".getMLText('import_extension')."\"><i class=\"icon-download\"></i></a></form>";
echo "</div>";