summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcello Coutinho <marcellocoutinho@gmail.com>2012-06-03 18:57:10 -0300
committerMarcello Coutinho <marcellocoutinho@gmail.com>2012-06-03 18:57:10 -0300
commit8b19e1b32fc58da71bedfce031c9d45be0fabe44 (patch)
tree950b171709601a12f3fedc59932ab4d4a39b404b
parent16aa29e41ca14470469ce555bb7a284641303e3f (diff)
downloadpfsense-8b19e1b32fc58da71bedfce031c9d45be0fabe44.zip
pfsense-8b19e1b32fc58da71bedfce031c9d45be0fabe44.tar.gz
Include github changelog link to package version when $g['disablepackagehistory'] is not set, domtt titles, remove package info column and move package info to description tab
-rwxr-xr-xusr/local/www/pkg_mgr_installed.php97
1 files changed, 66 insertions, 31 deletions
diff --git a/usr/local/www/pkg_mgr_installed.php b/usr/local/www/pkg_mgr_installed.php
index 46a095b..f2345d7 100755
--- a/usr/local/www/pkg_mgr_installed.php
+++ b/usr/local/www/pkg_mgr_installed.php
@@ -59,6 +59,17 @@ if(is_subsystem_dirty('packagelock')) {
exit;
}
+function domTT_title($title_msg, $return="echo"){
+ if (!empty($title_msg)){
+ $title_msg=preg_replace("/\s+/"," ",$title_msg);
+ $title_msg=preg_replace("/'/","\'",$title_msg);
+ $title= "onmouseout=\"this.style.color = ''; domTT_mouseout(this, event);\" onmouseover=\"domTT_activate(this, event, 'content', '{$title_msg}', 'trail', true, 'delay', 0, 'fade', 'both', 'fadeMax', 93, 'styleClass', 'niceTitle');\"";
+ if ($return =="echo")
+ echo $title;
+ else
+ return $title;
+ }
+}
if(is_array($config['installedpackages']['package'])) {
foreach($config['installedpackages']['package'] as $instpkg) {
$tocheck[] = $instpkg['name'];
@@ -70,7 +81,11 @@ $pgtitle = array(gettext("System"),gettext("Package Manager"));
include("head.inc");
?>
-
+<script type="text/javascript" src="javascript/domTT/domLib.js"></script>
+<script type="text/javascript" src="javascript/domTT/domTT.js"></script>
+<script type="text/javascript" src="javascript/domTT/behaviour.js"></script>
+<script type="text/javascript" src="javascript/domTT/fadomatic.js"></script>
+<script type="text/javascript" language="javascript" src="/javascript/row_helper_dynamic.js"></script>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
@@ -93,11 +108,11 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="10%" class="listhdrr"><?=gettext("Package Name"); ?></td>
- <td width="20%" class="listhdrr"><?=gettext("Category"); ?></td>
- <td width="10%" class="listhdrr"><?=gettext("Package Info"); ?></td>
- <td width="15%" class="listhdrr"><?=gettext("Package Version"); ?></td>
- <td width="45%" class="listhdr"><?=gettext("Description"); ?></td>
+ <td width="12%" class="listhdrr"><?=gettext("Name"); ?></td>
+ <td width="16%" class="listhdrr"><?=gettext("Category"); ?></td>
+ <td width="15%" class="listhdrr"><?=gettext("Version"); ?></td>
+ <td width="53%" class="listhdr"><?=gettext("Description"); ?></td>
+ <td width="40" >&nbsp</td>
</tr>
<?php
if(is_array($config['installedpackages']['package'])):
@@ -114,33 +129,59 @@ include("head.inc");
if(!$pkg['name'])
continue;
+ // get history/changelog git dir
+ $commit_dir=split("/",$pkg['config_file']);
+ $changeloglink ="https://github.com/bsdperimeter/pfsense-packages/commits/master/config/".$commit_dir[(count($commit_dir)-2)];
+ #check package version
$latest_package = $currentvers[$pkg['name']]['version'];
if ($latest_package) {
// we're running a newer version of the package
if(strcmp($pkg['version'], $latest_package) > 0) {
$tdclass = "listbggrey";
- $pkgver = gettext("Available") .": ". $latest_package . "<br/>";
- $pkgver .= gettext("Installed") .": ". $pkg['version'];
+ if (isset($g['disablepackagehistory']))
+ $pkgver = "<a>".gettext("Available") .": ". $latest_package . "<br/>";
+ else
+ $pkgver = "<a target='_new' href='$changeloglink'>".gettext("Available") .": ". $latest_package . "<br/>";
+ $pkgver .= gettext("Installed") .": ". $pkg['version']. "</a>";
}
// we're running an older version of the package
if(strcmp($pkg['version'], $latest_package) < 0) {
$tdclass = "listbg";
- $pkgver = "<font color='#ffffff'>" . gettext("Available") .": ". $latest_package . "<br/>";
- $pkgver .= gettext("Installed") .": ". $pkg['version'];
+ if (isset($g['disablepackagehistory']))
+ $pkgver = "<a><font color='#ffffff'>" . gettext("Available") .": ". $latest_package . "<br/>";
+ else
+ $pkgver = "<a target='_new' href='$changeloglink'><font color='#ffffff'>" . gettext("Available") .": ". $latest_package . "<br/>";
+ $pkgver .= gettext("Installed") .": ". $pkg['version']."</a>";
}
// we're running the current version
if(!strcmp($pkg['version'], $latest_package)) {
$tdclass = "listr";
- $pkgver = $pkg['version'];
+ if (isset($g['disablepackagehistory']))
+ $pkgver = "<a>{$pkg['version']}</a>";
+ else
+ $pkgver = "<a target='_new' href='$changeloglink'>{$pkg['version']}</a>";
}
} else {
// unknown available package version
$pkgver = "";
if(!strcmp($pkg['version'], $latest_package)) {
$tdclass = "listr";
- $pkgver = $pkg['version'];
- }
+ if (isset($g['disablepackagehistory']))
+ $pkgver = "<a>{$pkg['version']}</a>";
+ else
+ $pkgver = "<a target='_new' href='$changeloglink'>{$pkg['version']}</a>";
+ }
}
+ /* Check package info link */
+ if($pkg['pkginfolink']){
+ $pkginfolink = $pkg['pkginfolink'];
+ $pkginfo=gettext("Package info");
+ }
+ else{
+ $pkginfolink = "http://forum.pfsense.org/index.php/board,15.0.html";
+ $pkginfo=gettext("No package info, check the forum");
+ }
+
?>
<tr valign="top">
<td class="listlr">
@@ -149,32 +190,26 @@ include("head.inc");
<td class="listr">
<?=$pkg['category'];?>
</td>
- <td class="listr">
- <?php
- if($currentvers[$pkg['name']]['pkginfolink']) {
- $pkginfolink = $currentvers[$pkg['name']]['pkginfolink'];
- echo "<a target='_new' href='$pkginfolink'>" . gettext("Package Info") . "</a>";
- } else {
- echo gettext("No info, check the") . " <a href='http://forum.pfsense.org/index.php/board,15.0.html'>" . gettext("forum") . "</a>";
- }
+ <?php
+ if (isset($g['disablepackagehistory']))
+ echo "<td class='{$tdclass}'>{$pkgver}</td>";
+ else
+ echo "<td class='{$tdclass}' ".domTT_title(gettext("Click on ".ucfirst($pkg['name'])." version to check it's changelog."),"return").">{$pkgver}</td>";
?>
- </td>
- <td class="<?=$tdclass;?>">
- <?=$pkgver;?>
- </td>
- <td class="listbg">
- <?=$currentvers[$pkg['name']]['descr'];?>
+ <td class="listbg" style="overflow:hidden; text-align:justify;" <?=domTT_title(gettext("Click package info for more details about ".ucfirst($pkg['name'])." package."))?>>
+ <?=$currentvers[$pkg['name']]['descr'];?><br><br>
+ <a target='_new' href='<?=$pkginfolink?>' style='align:center;color:#ffffff; filter:Glow(color=#ff0000, strength=12);'><?=$pkginfo?></a>
</td>
<td valign="middle" class="list" nowrap>
- <a onclick="return confirm('<?=gettext("Do you really want to remove this package?"); ?>')" href="pkg_mgr_install.php?mode=delete&pkg=<?= $pkg['name']; ?>">
- <img title="<?=gettext("Remove this package."); ?>" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0">
+ <a onclick="return confirm('<?=gettext("Do you really want to remove {$pkg['name']} package?"); ?>')" href="pkg_mgr_install.php?mode=delete&pkg=<?= $pkg['name']; ?>">
+ <img <?=domTT_title(gettext("Remove ".ucfirst($pkg['name'])." package."))?> src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0">
</a>
<br>
<a href="pkg_mgr_install.php?mode=reinstallpkg&pkg=<?= $pkg['name']; ?>">
- <img title="<?=gettext("Reinstall this package."); ?>" src="./themes/<?= $g['theme']; ?>/images/icons/icon_reinstall_pkg.gif" width="17" height="17" border="0">
+ <img <?=domTT_title(gettext("Reinstall ".ucfirst($pkg['name'])." package."));?> src="./themes/<?= $g['theme']; ?>/images/icons/icon_reinstall_pkg.gif" width="17" height="17" border="0">
</a>
<a href="pkg_mgr_install.php?mode=reinstallxml&pkg=<?= $pkg['name']; ?>">
- <img title="<?=gettext("Reinstall this package's GUI components."); ?>" src="./themes/<?= $g['theme']; ?>/images/icons/icon_reinstall_xml.gif" width="17" height="17" border="0">
+ <img <?=domTT_title(gettext("Reinstall ".ucfirst($pkg['name'])."'s GUI components."));?> src="./themes/<?= $g['theme']; ?>/images/icons/icon_reinstall_xml.gif" width="17" height="17" border="0">
</a>
</td>
</tr>
OpenPOWER on IntegriCloud