forked from stefankeidel/collectiveaccess
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcollectiveaccess-search.tpl.php
More file actions
39 lines (29 loc) · 1.2 KB
/
collectiveaccess-search.tpl.php
File metadata and controls
39 lines (29 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
if(sizeof($active_criteria)>0){
print "<h2>Active restrictions:</h2>";
foreach($active_criteria as $facet){
print "<div><b>".$facet['label_singular'].": </b>"; // this has to be handled differently for "has" facets which have no real value
foreach($facet['criteria'] as $criterion){
print l($criterion['label'],COLLECTIVEACCESS_DEFAULT_SEARCH_MENU_PATH."/".$entity."/".$criterion['url_part_without_this']);
}
print "</div>";
}
}
?>
<?php foreach($available_facets as $facet_name => $facet): ?>
<h2><?php print $facet["label_plural"]; ?></h2>
<?php
if($facet['group_mode'] == "none" || !$facet['group_mode']){
foreach($facet['content'] as $term){
print "<h4>".l($term['label'],COLLECTIVEACCESS_DEFAULT_SEARCH_MENU_PATH."/".$entity."/".$active_criteria_url_part."/".$facet_name."\\".$term['id'])."</h4>";
}
} else if ($facet['group_mode'] == 'alphabetical') {
foreach($facet['content'] as $group => $group_content){
print "<h3>".$group."</h3>";
foreach($group_content as $term){
print "<h4>".l($term['label'],COLLECTIVEACCESS_DEFAULT_SEARCH_MENU_PATH."/".$entity."/".$active_criteria_url_part."/".$facet_name."\\".$term['id'])."</h4>";
}
}
}
?>
<?php endforeach; ?>