# HG changeset patch # User Matti Hamalainen # Date 1425811946 -7200 # Node ID 269ecedff5182f3522371d2dbde0986a6d068cfc # Parent 5e9f8b76d4946d284e74a0414c60110ac5745d1f Various improvements to the material browser. diff -r 5e9f8b76d494 -r 269ecedff518 materials/index.php --- a/materials/index.php Sun Mar 08 10:52:33 2015 +0200 +++ b/materials/index.php Sun Mar 08 12:52:26 2015 +0200 @@ -47,11 +47,11 @@ } -function stGetURLStr($cfilters, $col, $dir, $mfilters) +function stGetURLStr($cfilters, $col, $dir, $domfilter, $mfilters) { - global $sortDirs, $hideColumns; + global $sortDirs, $hideColumns, $doMatFilter; - $str = "s=".$col."&d=".$sortDirs[$dir]; + $str = "s=".$col."&d=".$sortDirs[$dir]."&mf=".$domfilter; foreach ($cfilters as $fkey => $fval) $str .= "&f%5B".$fkey."%5D=".$fval; @@ -95,8 +95,33 @@ uasort($matTable, "stSortMatFunc"); -cmPrintPageHeader($pageTitle, - "\n"); +cmPrintPageHeader($pageTitle, " + + +"); ?>

@@ -190,8 +215,8 @@ { echo "

Material filter: ".implode(", ", array_keys($matFilters))." ". - "[".($doMatFilter ? "Deactivate" : "Activate")."]

\n"; + "[".($doMatFilter ? "Deactivate" : "Activate")."]

\n"; } ?>
@@ -207,7 +232,7 @@ "".chentities($value)."\n"; } } @@ -239,8 +264,10 @@ echo " ".stGetTC("td", $col++). - "".chentities($key)." ". - "". + "".(isset($matFilters[$key]) ? "-" : "+")."". + "".chentities($key)."". ""; foreach ($value as $kkey => $kvalue) @@ -269,7 +296,7 @@ $tmpFilters[$kkey] = $kvalue; echo "".chentities($transTable[$kkey][$kvalue]).""; } echo "";