mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-01 14:37:20 +00:00
json decoding is now done in SeedDMS_ExtensionMgr, show images in repository list
This commit is contained in:
parent
0ad2303511
commit
e9d93860b9
|
@ -82,7 +82,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Bootstrap_Style {
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span4">
|
<div class="span4">
|
||||||
<?php
|
<?php
|
||||||
if($extmgr->isWritableExitDir()) {
|
if($extmgr->isWritableExtDir()) {
|
||||||
?>
|
?>
|
||||||
<form class="form-horizontal" method="post" enctype="multipart/form-data" action="../op/op.ExtensionMgr.php">
|
<form class="form-horizontal" method="post" enctype="multipart/form-data" action="../op/op.ExtensionMgr.php">
|
||||||
<?= createHiddenFieldWithKey('extensionmgr') ?>
|
<?= createHiddenFieldWithKey('extensionmgr') ?>
|
||||||
|
@ -135,9 +135,9 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Bootstrap_Style {
|
||||||
echo "<tr class=\"success\">";
|
echo "<tr class=\"success\">";
|
||||||
} else
|
} else
|
||||||
echo "<tr class=\"warning\">";
|
echo "<tr class=\"warning\">";
|
||||||
echo "<td>";
|
echo "<td width=\"32\">";
|
||||||
if($extconf['icon'])
|
if($extconf['icon'])
|
||||||
echo "<img src=\"".$httproot."ext/".$extname."/".$extconf['icon']."\" alt=\"".$extname."\" title=\"".$extname."\">";
|
echo "<img width=\"32\" height=\"32\" src=\"".$httproot."ext/".$extname."/".$extconf['icon']."\" alt=\"".$extname."\" title=\"".$extname."\">";
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
echo "<td>".$extconf['title'];
|
echo "<td>".$extconf['title'];
|
||||||
if(!empty($extconf['changelog']) && file_exists($extdir."/".$extname."/".$extconf['changelog'])) {
|
if(!empty($extconf['changelog']) && file_exists($extdir."/".$extname."/".$extconf['changelog'])) {
|
||||||
|
@ -183,35 +183,32 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Bootstrap_Style {
|
||||||
print "<th></th>\n";
|
print "<th></th>\n";
|
||||||
print "</tr></thead><tbody>\n";
|
print "</tr></thead><tbody>\n";
|
||||||
$list = $extmgr->getExtensionList();
|
$list = $extmgr->getExtensionList();
|
||||||
foreach($list as $e) {
|
foreach($list as $re) {
|
||||||
if($e[0] != '#') {
|
$extmgr->checkExtension($re);
|
||||||
$re = json_decode($e, true);
|
$checkmsgs = $extmgr->getErrorMsgs();
|
||||||
$extmgr->checkExtension($re);
|
$needsupdate = !isset($GLOBALS['EXT_CONF'][$re['name']]) || SeedDMS_Extension_Mgr::cmpVersion($re['version'], $GLOBALS['EXT_CONF'][$re['name']]['version']) > 0;
|
||||||
$checkmsgs = $extmgr->getErrorMsgs();
|
echo "<tr";
|
||||||
$needsupdate = !isset($GLOBALS['EXT_CONF'][$re['name']]) || SeedDMS_Extension_Mgr::cmpVersion($re['version'], $GLOBALS['EXT_CONF'][$re['name']]['version']) > 0;
|
if(isset($GLOBALS['EXT_CONF'][$re['name']])) {
|
||||||
echo "<tr";
|
if($needsupdate)
|
||||||
if(isset($GLOBALS['EXT_CONF'][$re['name']])) {
|
echo " class=\"warning\"";
|
||||||
if($needsupdate)
|
else
|
||||||
echo " class=\"warning\"";
|
echo " class=\"success\"";
|
||||||
else
|
|
||||||
echo " class=\"success\"";
|
|
||||||
}
|
|
||||||
echo ">";
|
|
||||||
echo "<td></td>";
|
|
||||||
echo "<td>".$re['title']."<br /><small>".$re['description']."</small>";
|
|
||||||
if($checkmsgs)
|
|
||||||
echo "<div><img src=\"".$this->getImgPath("attention.gif")."\"> ".implode('<br /><img src="'.$this->getImgPath("attention.gif").'"> ', $checkmsgs)."</div>";
|
|
||||||
echo "</td>";
|
|
||||||
echo "<td nowrap>".$re['version']."<br /><small>".$re['releasedate']."</small></td>";
|
|
||||||
echo "<td nowrap>".$re['author']['name']."<br /><small>".$re['author']['company']."</small></td>";
|
|
||||||
echo "<td nowrap>";
|
|
||||||
echo "<div class=\"list-action\">";
|
|
||||||
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>";
|
|
||||||
echo "</td>";
|
|
||||||
echo "</tr>";
|
|
||||||
}
|
}
|
||||||
|
echo ">";
|
||||||
|
echo "<td width=\"32\">".($re['icon-data'] ? '<img width="32" height="32" alt="'.$re['name'].'" title="'.$re['name'].'" src="'.$re['icon-data'].'">' : '')."</td>";
|
||||||
|
echo "<td>".$re['title']."<br /><small>".$re['description']."</small>";
|
||||||
|
if($checkmsgs)
|
||||||
|
echo "<div><img src=\"".$this->getImgPath("attention.gif")."\"> ".implode('<br /><img src="'.$this->getImgPath("attention.gif").'"> ', $checkmsgs)."</div>";
|
||||||
|
echo "</td>";
|
||||||
|
echo "<td nowrap>".$re['version']."<br /><small>".$re['releasedate']."</small></td>";
|
||||||
|
echo "<td nowrap>".$re['author']['name']."<br /><small>".$re['author']['company']."</small></td>";
|
||||||
|
echo "<td nowrap>";
|
||||||
|
echo "<div class=\"list-action\">";
|
||||||
|
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>";
|
||||||
|
echo "</td>";
|
||||||
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
echo "</tbody></table>\n";
|
echo "</tbody></table>\n";
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user