| Index
» Projekty
» phpMyEdit
» Fórum
» How to set a standard filter? |
 |
mucmuc
Založený: 11.07.2010
Príspevky: 3
Zaslal: 2010-07-14 09:47
Návrat hore
Odpovedať s citátom
|
Hi,
i just created an action item list whith status like open, closed and in progress. As i am not so interessted in items with status "closed" I'd like to set a standard filter which displays item with status open and in progress only. However, if I open the filter, it should be possible to filter closed items too. Can I somehow preset the filters?
Thx
Mucmuc
|
doug
Založený: 10.02.2003
Príspevky: 1013
Bydlisko: Denver, Colorado (USA)
Zaslal: 2010-07-14 23:42
Návrat hore
Odpovedať s citátom
|
I have a complex example with lots of "stuff" going on in it, including some filters to add a column to the current List mode. In my situation, I had 6 columns which I did not need to display all the time in List mode, so I've been working on displaying links below the form which pass the appropriate state and form variables and reload the form to include another column. There is a lot going on in this form which is probably of no interest.
http://www.phpvs.com/misc/filter-example-2010-07.txt
The toggle settings begin with the following. See the above link for A HREF tags created below the form.
| Kód: |
// $tgl[number] the display of a particular column
$tgl0 = intval(get_cgi_var('tgl0'));
$tgl1 = intval(get_cgi_var('tgl1'));
$tgl2 = intval(get_cgi_var('tgl2'));
$tgl3 = intval(get_cgi_var('tgl3'));
$tgl4 = intval(get_cgi_var('tgl4'));
$tgl5 = intval(get_cgi_var('tgl5'));
// Persist the CMS page ID marker ($s) as well as optional (tgld) columns
$opts['cgi']['persist'] = array(
's' => $s,
'tgl0' => $tgl0,
'tgl1' => $tgl1,
'tgl2' => $tgl2,
'tgl3' => $tgl3,
'tgl4' => $tgl4,
'tgl5' => $tgl5
);
// Column 25 $tgl4 named `deleted` is used by the trigger function to flag records as deleted
// instead of deleting a record. Normally we don't include `deleted` records.
if(empty($tgl4)){
$opts['filters'] = 'PMEtable0.deleted = "0"';
} |
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|