summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/pkg_mgr.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-10-21 10:15:29 -0400
committerStephen Beaver <sbeaver@netgate.com>2015-10-21 10:16:03 -0400
commit98dfca1878f94d528ab8ee44663f6c601c953bb7 (patch)
tree7be8d1dc6a3c3c5730fca58af7bbd7ea4c81aa7e /src/usr/local/www/pkg_mgr.php
parent41f7b662932422f176151532a97858e683f50abd (diff)
downloadpfsense-98dfca1878f94d528ab8ee44663f6c601c953bb7.zip
pfsense-98dfca1878f94d528ab8ee44663f6c601c953bb7.tar.gz
Added search panel. (Not yet functional though)
Diffstat (limited to 'src/usr/local/www/pkg_mgr.php')
-rw-r--r--src/usr/local/www/pkg_mgr.php108
1 files changed, 74 insertions, 34 deletions
diff --git a/src/usr/local/www/pkg_mgr.php b/src/usr/local/www/pkg_mgr.php
index 84dd058..5889099 100644
--- a/src/usr/local/www/pkg_mgr.php
+++ b/src/usr/local/www/pkg_mgr.php
@@ -130,28 +130,54 @@ if($pkg_info) {
}
$tab_array[] = array(gettext("Other Categories"), $menu_category=="Other" ? true : false, "pkg_mgr.php?category=Other");
- if (count($categories) > 1)
- display_top_tabs($tab_array);
+
+// if (count($categories) > 1)
+// display_top_tabs($tab_array);
}
if(!$pkg_info || !is_array($pkg_info)):?>
- <div class="alert alert-warning">
- <?=gettext("There are currently no packages available for installation.")?>
- </div>
+<div class="alert alert-warning">
+ <?=gettext("There are currently no packages available for installation.")?>
+</div>
<?php else: ?>
- <div class="table-responsive">
- <table class="table table-striped table-hover">
- <thead>
- <tr>
- <th><?=gettext("Name")?></th>
+
+<div class="panel panel-default" id="search-panel">
+ <div class="panel-heading"><?=gettext('Search')?>
+ <span class="icons pull-right">
+ <a data-toggle="collapse" href="#search-panel .panel-body" name="search-panel">
+ <i class="icon-white icon-plus-sign"></i>
+ </a>
+ </span>
+ </div>
+ <div class="panel-body collapse out">
+ <div class="form-group">
+ <label class="col-sm-2 control-label">
+ Search term
+ </label>
+ <div class="col-sm-5"><input class="form-control" name="searchstr" id="searchstr" type="text"/></div>
+ <div class="col-sm-5"><a id="btnsearch" type="button" title="<?=gettext("Search")?>" class="btn btn-default btn-sm"><?=gettext("Search")?></a></div>
+ <div class="col-sm-10 col-sm-offset-2">
+ <span class="help-block">Enter a search string or *nix regular expression to seach package names and descriptions.</span>
+ </div>
+ </div>
+ </div>
+</div>
+
+<div class="panel panel-default">
+ <div class="panel-heading"><h2 class="panel-title"><?=gettext('Packages')?></h2></div>
+ <div class="panel-body table-responsive">
+ <table class="table table-striped table-hover">
+ <thead>
+ <tr>
+ <th><?=gettext("Name")?></th>
<?php if (!$g['disablepackagehistory']):?>
- <th><?=gettext("Version")?></th>
+ <th><?=gettext("Version")?></th>
<?php endif;?>
- <th><?=gettext("Description")?></th>
- </tr>
- </thead>
- <tbody>
+ <th><?=gettext("Description")?></th>
+ </tr>
+ </thead>
+ <tbody>
<?php
foreach($pkg_info as $index):
@@ -167,44 +193,58 @@ if(!$pkg_info || !is_array($pkg_info)):?>
}
?>
- <tr>
- <td>
+ <tr>
+ <td>
<?php if ($index['www']):?>
- <a title="<?=gettext("Visit official website")?>" target="_blank" href="<?=htmlspecialchars($index['www'])?>">
+ <a title="<?=gettext("Visit official website")?>" target="_blank" href="<?=htmlspecialchars($index['www'])?>">
<?php endif; ?>
- <?=htmlspecialchars($shortname)?>
- </a>
- </td>
+ <?=htmlspecialchars($shortname)?>
+ </a>
+ </td>
<?php
if (!$g['disablepackagehistory']):?>
- <td>
+ <td>
<!-- We no longer have a package revision history URL
$changeloglink is undefined
<a target="_blank" title="<?=gettext("View changelog")?>" href="<?=htmlspecialchars($changeloglink)?>">
-->
- <?=htmlspecialchars($index['version'])?>
+ <?=htmlspecialchars($index['version'])?>
<!--
</a>
-->
- </td>
+ </td>
<?php
endif;
?>
- <td>
- <?=$index['desc']?>
- </td>
- <td>
- <a title="<?=gettext("Click to install")?>" href="pkg_mgr_install.php?id=<?=$index['name']?>" class="btn btn-success btn-sm">install</a>
+ <td>
+ <?=$index['desc']?>
+ </td>
+ <td>
+ <a title="<?=gettext("Click to install")?>" href="pkg_mgr_install.php?id=<?=$index['name']?>" class="btn btn-success btn-sm">install</a>
<?php if(!$g['disablepackageinfo'] && $index['pkginfolink'] && $index['pkginfolink'] != $index['www']):?>
- <a target="_blank" title="<?=gettext("View more information")?>" href="<?=htmlspecialchars($index['pkginfolink'])?>" class="btn btn-default btn-sm">info</a>
+ <a target="_blank" title="<?=gettext("View more information")?>" href="<?=htmlspecialchars($index['pkginfolink'])?>" class="btn btn-default btn-sm">info</a>
<?php endif;?>
- </td>
- </tr>
+ </td>
+ </tr>
<?php
endforeach;
endif;?>
- </tbody>
- </table>
+ </tbody>
+ </table>
</div>
+</div>
+
+<script>
+//<![CDATA[
+events.push(function(){
+ $("#btnsearch").prop('type' ,'button');
+
+ $("#btnsearch").click(function() {
+ alert("Sorry, this is not yet functional.\n\n\"" + $("#searchstr").val() + "\" may exist, or it may not!");
+ });
+});
+//]]>
+</script>
+
<?php include("foot.inc")?>
OpenPOWER on IntegriCloud