Mercurial > hg > fapweb
changeset 921:6234816c1e43
Add number of entries to compo header tabs.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 27 Nov 2014 14:04:59 +0200 |
parents | 054b612df423 |
children | b92549a3372d |
files | admajax.php |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/admajax.php Thu Nov 27 14:04:45 2014 +0200 +++ b/admajax.php Thu Nov 27 14:04:59 2014 +0200 @@ -1559,8 +1559,11 @@ $index = 0; foreach (stExecSQL("SELECT * FROM compos") as $compo) { + $ne = stFetchSQLColumn("SELECT COUNT(*) FROM entries WHERE compo_id=".$compo["id"]); if ($index++ > 0) echo ","; - echo "\"".$compo["id"]."\":\"".chentities($compo["name"])."\""; + echo + "\"".$compo["id"]."\":\"".chentities($compo["name"]). + (($ne !== false && $ne > 0) ? " <span class='cnotice'>(".$ne.")</span>" : "")."\""; } break;