Skip to content

Commit

Permalink
Merge pull request #39 from ggoffy/master
Browse files Browse the repository at this point in the history
 - fixed problem with display filter
  • Loading branch information
ggoffy authored Feb 21, 2021
2 parents 21b96ba + 64a5c53 commit 9b6bed9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion class/PackagesHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function getFormAllPackages($action = false)
* @public function getForm
* @param bool|string $action
* @param string $pkgFilterText
* @return \XoopsThemeForm
* @return \XoopsSimpleForm
*/
public function getFormFilterPackages($action = false, $pkgFilterText = '')
{
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- fixed data type bug (array/string) (goffy)
- fixed problem with display collections (goffy)
- added search to index page (goffy)
- fixed problem with display filter (goffy)

===================================================================
2020/12/13 Version 1.05 alpha
Expand Down
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
$crPackages = new \CriteriaCompo();
if ('' !== $pkgFilterText) {
$crPkgFilter = new \CriteriaCompo();
$crPkgFilter->add(new \Criteria('pkg_name', '*' . $pkgFilterText . '*', 'LIKE'));
$crPkgFilter->add(new \Criteria('pkg_desc', '*' . $pkgFilterText . '*', 'LIKE'), 'OR');
$crPkgFilter->add(new \Criteria('pkg_name', '%' . $pkgFilterText . '%', 'LIKE'));
$crPkgFilter->add(new \Criteria('pkg_desc', '%' . $pkgFilterText . '%', 'LIKE'), 'OR');
$crPackages->add($crPkgFilter);
}
$packagesCount = $packagesHandler->getCount($crPackages);
Expand Down
20 changes: 9 additions & 11 deletions templates/wgtransifex_index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,16 @@
</table>
<!-- End index list -->
<{if $pagenav|default:'' != ''}>
<div class="row wgt-filter-row">
<div class="col-sm-12">
<a id="toggleFormFilter" class='btn btn-default pull-right' href='#' title='<{$btnFormFilterLabel}>'><{$btnFormFilterLabel}></a>
</div>
<{if $formFilter|default:''}>
<div id="formFilter" class="wgt-formFilter" style="display:<{$displayFormFilter}>">
<div class="col-sm-12"><{$formFilter}></div>
</div>
<{/if}>
<div class="row wgt-filter-row">
<div class="col-sm-12">
<a id="toggleFormFilter" class='btn btn-default pull-right' href='#' title='<{$btnFormFilterLabel}>'><{$btnFormFilterLabel}></a>
</div>
<{/if}>
<{if $formFilter|default:''}>
<div id="formFilter" class="wgt-formFilter" style="display:<{$displayFormFilter}>">
<div class="col-sm-12"><{$formFilter}></div>
</div>
<{/if}>
</div>
<div class='wgtransifex-linetitle'>
<{if $pkgFilterText|default:''}>
Expand Down

0 comments on commit 9b6bed9

Please sign in to comment.