Skip to content

Commit

Permalink
🔨 #33 SystemPostList update
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Feb 22, 2023
1 parent 7d257af commit e041ac0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion template/app/control/communication/SystemPostList.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class SystemPostList extends TStandardList
protected $datagrid;
protected $pageNavigation;

// trait com onReload, onSearch, onDelete...
use Adianti\Base\AdiantiStandardListTrait;

/**
* Class constructor
* Creates the page, the form and the listing
Expand Down Expand Up @@ -61,7 +64,8 @@ public function __construct($param = null)
$this->form->setData( TSession::getValue(__CLASS__.'_filter_data') );

$btn_onsearch = $this->form->addAction(_t("Search"), new TAction([$this, 'onSearch']), 'fas:search #ffffff');
$btn_onsearch->addStyleClass('btn-primary');
$btn_onsearch->addStyleClass('btn-primary');
$this->form->addActionLink(_t('Clear'), new TAction([$this, 'clear']), 'fa:eraser red');
$btn_onshow = $this->form->addAction(_t("New"), new TAction(['SystemPostForm', 'onEdit']), 'fas:plus #69aa46');

$this->datagrid = new BootstrapDatagridWrapper(new TDataGrid);
Expand Down Expand Up @@ -180,4 +184,13 @@ public function onDelete($param = null)
new TQuestion(AdiantiCoreTranslator::translate('Do you really want to delete ?'), $action);
}
}

/**
* Clear filters
*/
public function clear()
{
$this->clearFilters();
$this->onReload();
}
}

0 comments on commit e041ac0

Please sign in to comment.