[%# This template can be passed the following variables: session_info => { username, session_id, superuser, fullname, etc } editor => 1, or 0 or undefined descriptions => { issues => { A1 => blah, A2 => ... }, constit => { A2 => blah } } filters => [ { issues => [ A1, A2, A2 ] } ] categories => [ { description => "blah", code => "A1", cnt => 4 }] total_count => 4023 browsetype => "issues" or "constit" (only one term) page => 'remove' or 'reject' %] [% username = session_info.username %] CALF | Browsing Group by [% type_defs.$browseby %] [% INCLUDE groupshead %] [% INCLUDE groupsmenu %] [% INCLUDE groupsearch %] [% INCLUDE editorsmenu IF editor == 1 %] Filtering items by: [% FOREACH type = filters.keys; codes = filters.$type; FOREACH code = codes; descriptions.$type.$code; ", " IF loop.size > loop.count; END; ", " IF loop.size > loop.count; END %]  ([% total_count %])
[% INCLUDE colorbar color = "ff0000" height = "8" percent = "98%" %] by [% type_defs.$browseby %]

[% FOREACH category = categories %] [% category.description %] ([% category.cnt %])
[% IF loop.count >= (categories.size / 2) %] [% NEXT IF broken == 1 %]
[% broken = 1 %] [% END %] [% END %]

[% IF total_count < 22 %] [% IF total_count == 2; "Show both of these"; ELSE; "See all "; total_count; END; %] items. [% END %]

[% INCLUDE colorbar color = "ff0000" height = "8" percent = "98%" %] [% INCLUDE footer %] [% BLOCK filters_url %] [% FOREACH type = filters.keys; codes = filters.$type; FOREACH code = codes; "$type=$code"; "&" UNLESS loop.size == loop.count; END; "&" UNLESS loop.size == loop.count; END; %] [% END %]