From 3583bac4e3399789ff5881c243ba03ba57f71d20 Mon Sep 17 00:00:00 2001
From: Chris Hallberg <crhallberg@gmail.com>
Date: Wed, 18 Mar 2015 15:54:23 -0400
Subject: [PATCH] Making sure all the .list-groups have valid HTML.

---
 .../templates/Recommend/ExpandFacets.phtml    |  4 ++--
 .../templates/Recommend/SideFacets.phtml      | 22 +++++++++----------
 .../templates/Recommend/SummonResults.phtml   |  8 +++----
 themes/bootstrap3/templates/admin/menu.phtml  |  4 ++--
 themes/bootstrap3/templates/browse/home.phtml | 16 +++++++-------
 .../templates/collections/list.phtml          |  4 ++--
 .../templates/search/advanced/layout.phtml    |  8 +++----
 7 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/themes/bootstrap3/templates/Recommend/ExpandFacets.phtml b/themes/bootstrap3/templates/Recommend/ExpandFacets.phtml
index 68c347d8fff..883fe089501 100644
--- a/themes/bootstrap3/templates/Recommend/ExpandFacets.phtml
+++ b/themes/bootstrap3/templates/Recommend/ExpandFacets.phtml
@@ -7,11 +7,11 @@
   <div class="sidegroup">
  <? foreach ($expandFacetSet as $title=>$cluster): ?>
     <h4><?=$this->transEsc($cluster['label']) ?></h4>
-    <ul class="list-group">
+    <div class="list-group">
       <? foreach ($cluster['list'] as $thisFacet): ?>
         <a class="list-group-item" href="<?=$this->url('search-results') . $blankResults->getUrlQuery()->addFacet($title, $thisFacet['value'])?>"><?=$this->escapeHtml($thisFacet['displayText'])?></a>
       <? endforeach; ?>
-    </ul>
+    </div>
  <? endforeach; ?>
   </div>
 <? endif; ?>
diff --git a/themes/bootstrap3/templates/Recommend/SideFacets.phtml b/themes/bootstrap3/templates/Recommend/SideFacets.phtml
index e49e792c01e..9a830e33baf 100644
--- a/themes/bootstrap3/templates/Recommend/SideFacets.phtml
+++ b/themes/bootstrap3/templates/Recommend/SideFacets.phtml
@@ -25,8 +25,8 @@
 <? $hierarchicalFacetSortOptions = $this->recommend->getHierarchicalFacetSortOptions() ?>
 <? $hierarchicalFacets = $this->recommend->getHierarchicalFacets() ?>
 <? $filterList = array_merge($results->getParams()->getFilterList(true), $extraFilters); if (!empty($filterList)): ?>
-  <ul class="list-group filters">
-    <li class="list-group-item title"><?=$this->transEsc('Remove Filters')?></li>
+  <div class="list-group filters">
+    <div class="list-group-item title"><?=$this->transEsc('Remove Filters')?></div>
     <? foreach ($filterList as $field => $filters): ?>
       <? foreach ($filters as $i => $filter): ?>
         <?
@@ -49,20 +49,20 @@
         </a>
       <? endforeach; ?>
     <? endforeach; ?>
-  </ul>
+  </div>
 <? endif; ?>
 <?= isset($this->sideFacetExtraControls) ? $this->sideFacetExtraControls : '' ?>
 <? $sideFacetSet = $this->recommend->getFacetSet(); $rangeFacets = $this->recommend->getAllRangeFacets(); ?>
 <? if (!empty($sideFacetSet) && $results->getResultTotal() > 0): ?>
   <? foreach ($sideFacetSet as $title => $cluster): ?>
     <? $allowExclude = $this->recommend->excludeAllowed($title); ?>
-    <ul class="list-group facet" id="side-panel-<?=$this->escapeHtmlAttr($title) ?>">
-      <li class="list-group-item title<? if(in_array($title, $collapsedFacets)): ?> collapsed<? endif ?>" data-toggle="collapse" href="#side-collapse-<?=$this->escapeHtmlAttr($title) ?>" >
+    <div class="list-group facet" id="side-panel-<?=$this->escapeHtmlAttr($title) ?>">
+      <div class="list-group-item title<? if(in_array($title, $collapsedFacets)): ?> collapsed<? endif ?>" data-toggle="collapse" href="#side-collapse-<?=$this->escapeHtmlAttr($title) ?>" >
         <?=$this->transEsc($cluster['label'])?>
-      </li>
+      </div>
       <div id="side-collapse-<?=$this->escapeHtmlAttr($title) ?>" class="collapse<? if(!in_array($title, $collapsedFacets)): ?> in<? endif ?>">
         <? if (isset($rangeFacets[$title])): ?>
-          <li class="list-group-item">
+          <div class="list-group-item">
             <form action="" name="<?=$this->escapeHtmlAttr($title)?>Filter" id="<?=$this->escapeHtmlAttr($title)?>Filter">
               <?=$results->getUrlQuery()->asHiddenFields(array('page' => "/./", 'filter' => "/^{$title}:.*/"))?>
               <input type="hidden" name="<?=$this->escapeHtmlAttr($rangeFacets[$title]['type'])?>range[]" value="<?=$this->escapeHtmlAttr($title)?>"/>
@@ -86,7 +86,7 @@
               <? endif; ?>
               <input class="btn btn-default" type="submit" value="<?=$this->transEsc('Set')?>"/>
             </form>
-          </li>
+          </div>
           <? if ($rangeFacets[$title]['type'] == 'date'): ?>
             <? $this->headScript()->appendFile('vendor/bootstrap-slider.js'); ?>
             <?
@@ -173,7 +173,7 @@ JS;
             <? else: ?>
               <? $addURL = $this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator']); ?>
               <? if ($allowExclude): ?>
-                <li class="list-group-item facet<?=$thisFacet['operator'] ?><? if ($i>5): ?> <?=$moreClass ?><?endif ?>">
+                <div class="list-group-item facet<?=$thisFacet['operator'] ?><? if ($i>5): ?> <?=$moreClass ?><?endif ?>">
               <? else: ?>
                 <a href="<?=$addURL ?>" class="list-group-item facet<?=$thisFacet['operator'] ?><? if ($i>5): ?> <?=$moreClass ?><?endif ?>">
               <? endif; ?>
@@ -192,7 +192,7 @@ JS;
               <?=$this->escapeHtml($thisFacet['displayText'])?>
               <? if ($allowExclude): ?>
                   </a>
-                </li>
+                </div>
               <? else: ?>
                 </a>
               <? endif; ?>
@@ -204,6 +204,6 @@ JS;
           </noscript>
         <? endif; ?>
       </div>
-    </ul>
+    </div>
   <? endforeach; ?>
 <? endif; ?>
\ No newline at end of file
diff --git a/themes/bootstrap3/templates/Recommend/SummonResults.phtml b/themes/bootstrap3/templates/Recommend/SummonResults.phtml
index c76f45ffd9f..1995f77ab7a 100644
--- a/themes/bootstrap3/templates/Recommend/SummonResults.phtml
+++ b/themes/bootstrap3/templates/Recommend/SummonResults.phtml
@@ -1,8 +1,8 @@
 <? $searchObject = $this->recommend->getResults(); $results = $searchObject->getResults(); if (!empty($results)): ?>
   <h4><?=$this->transEsc('Summon Results')?></h4>
-  <ul class="list-group">
+  <div class="list-group">
     <? foreach ($results as $driver): ?>
-      <li class="list-group-item">
+      <div class="list-group-item">
         <span>
           <? $formats = $driver->getFormats(); $format = isset($formats[0]) ? $formats[0] : ''; ?>
           <a href="<?=$this->recordLink()->getUrl($driver)?>" class="title <?=$this->record($driver)->getFormatClass($format)?>">
@@ -32,8 +32,8 @@
           </span>
           <? endif; ?>
         </span>
-      </li>
+      </div>
     <? endforeach; ?>
     <a class="list-group-item" href="<?=$this->url($searchObject->getOptions()->getSearchAction()) . $searchObject->getUrlQuery()->setLimit($searchObject->getOptions()->getDefaultLimit())?>"><?=$this->transEsc('More Summon results')?>...</a>
-  </ul>
+  </div>
 <? endif ?>
\ No newline at end of file
diff --git a/themes/bootstrap3/templates/admin/menu.phtml b/themes/bootstrap3/templates/admin/menu.phtml
index 7bfae893202..404fbdfc95b 100644
--- a/themes/bootstrap3/templates/admin/menu.phtml
+++ b/themes/bootstrap3/templates/admin/menu.phtml
@@ -1,8 +1,8 @@
-<ul class="list-group">
+<div class="list-group">
   <a href="<?=$this->url('admin')?>" class="list-group-item<?=strtolower($this->layout()->templateName) == "home" ? ' active' : ''?>"><?=$this->transEsc('Home')?></a>
   <a href="<?=$this->url('admin/social')?>" class="list-group-item<?=strtolower($this->layout()->templateName) == "socialstats" ? ' active' : ''?>"><?=$this->transEsc('Social Statistics')?></a>
   <a href="<?=$this->url('admin/statistics')?>" class="list-group-item<?=strtolower($this->layout()->templateName) == "statistics" ? ' active' : ''?>"><?=$this->transEsc('Statistics')?></a>
   <a href="<?=$this->url('admin/config')?>" class="list-group-item<?=strtolower($this->layout()->templateName) == "config" ? ' active' : ''?>"><?=$this->transEsc('Configuration')?></a>
   <a href="<?=$this->url('admin/maintenance')?>" class="list-group-item<?=strtolower($this->layout()->templateName) == "maintenance" ? ' active' : ''?>"><?=$this->transEsc('System Maintenance')?></a>
   <a href="<?=$this->url('admin/tags')?>" class="list-group-item<?=strtolower($this->layout()->templateName) == "tags" ? ' active' : ''?>"><?=$this->transEsc('Tag Maintenance')?></a>
-</ul>
+</div>
diff --git a/themes/bootstrap3/templates/browse/home.phtml b/themes/bootstrap3/templates/browse/home.phtml
index 23c32762428..4533145aa2d 100644
--- a/themes/bootstrap3/templates/browse/home.phtml
+++ b/themes/bootstrap3/templates/browse/home.phtml
@@ -11,17 +11,17 @@
 <? endif; ?>
 
 <div class="row">
-  <ul class="browse list-group col-sm-3<? if (!empty($this->categoryList)): ?> hidden-xs<? endif ?>" id="list1">
+  <div class="browse list-group col-sm-3<? if (!empty($this->categoryList)): ?> hidden-xs<? endif ?>" id="list1">
     <? foreach ($this->browseOptions as $item=>$currentOption): ?>
       <a href="<?=$this->url('browse-' . strtolower($currentOption['action'])); ?>" class="list-group-item<? if($currentOption['action'] == $this->currentAction): ?> active<? endif; ?>">
         <?=$this->transEsc($currentOption['description']) ?>
         <span class="pull-right"><i class="fa fa-angle-right"></i></span>
       </a>
     <? endforeach; ?>
-  </ul>
+  </div>
 
   <? if (!empty($this->categoryList)): ?>
-    <ul class="browse list-group col-sm-3<? if (!empty($this->secondaryList) || !empty($this->resultList)): ?> hidden-xs<? endif ?>" id="list2">
+    <div class="browse list-group col-sm-3<? if (!empty($this->secondaryList) || !empty($this->resultList)): ?> hidden-xs<? endif ?>" id="list2">
       <? foreach($this->categoryList as $findby=>$category): ?>
         <a href="<?=$BROWSE_BASE ?>?findby=<?=urlencode($findby) ?>&query_field=<?=$this->browse()->getSolrField($findby, $this->currentAction) ?>" class="list-group-item clearfix<? if ($this->findby == $findby): ?> active<? endif; ?>">
           <? if(is_string($category)): ?>
@@ -33,11 +33,11 @@
           <? endif; ?>
         </a>
       <? endforeach; ?>
-    </ul>
+    </div>
   <? endif; ?>
 
   <? if (!empty($this->secondaryList)): ?>
-    <ul class="browse list-group col-sm-3<? if (!empty($this->resultList)): ?> hidden-xs<? endif ?>" id="list3">
+    <div class="browse list-group col-sm-3<? if (!empty($this->resultList)): ?> hidden-xs<? endif ?>" id="list3">
     <? foreach($this->secondaryList as $secondary): ?>
       <? $url = $BROWSE_BASE . '?findby=' . urlencode($this->findby)
           . '&category=' . urlencode($this->category)
@@ -64,18 +64,18 @@
         <a class="list-group-item view-record" href="<?=$SEARCH_BASE ?>?lookfor=<? if ($this->filter): ?>&filter[]=<?=urlencode($this->filter) ?>%3A<?=str_replace('+AND+','&filter[]=', urlencode($secondary['value'])) ?><? endif; ?>&filter[]=<?=$this->browse()->getSolrField($this->currentAction) ?>%3A[* TO *]"><?=$this->transEsc('View Records') ?></a>
       <? endif; ?>
     <? endforeach; ?>
-    </ul>
+    </div>
   <? endif; ?>
 
   <? if (!empty($this->resultList)): ?>
-    <ul class="browse list-group col-sm-3" id="list4">
+    <div class="browse list-group col-sm-3" id="list4">
     <? foreach($this->resultList as $result): ?>
       <a class="list-group-item clearfix" href="<?=$SEARCH_BASE ?>?<?=$this->paramTitle ?><?=urlencode($result['result']) ?><? if ($this->searchParams): foreach($this->searchParams as $var=>$val): ?>&<?=$var ?>=<?=urlencode($val) ?><? endforeach;endif; ?>">
         <?=$this->escapeHtml($result['result'])?>
         <span class="badge"><?=number_format($result['count']) ?></span>
       </a>
     <? endforeach; ?>
-    </ul>
+    </div>
   <? elseif (isset($this->query)): ?>
     <ul class="browse list-group col-sm-3" id="list4">
       <li class="list-group-item"><?=$this->transEsc('nohit_heading') ?></li>
diff --git a/themes/bootstrap3/templates/collections/list.phtml b/themes/bootstrap3/templates/collections/list.phtml
index 54a82fca8d5..c43957ef32c 100644
--- a/themes/bootstrap3/templates/collections/list.phtml
+++ b/themes/bootstrap3/templates/collections/list.phtml
@@ -1,4 +1,4 @@
-<ul class="list-group">
+<div class="list-group">
   <? foreach ($result as $i => $item): ?>
     <a class="list-group-item" href="<?=$this->url('collection', array('id' => $item['value']))?>">
       <strong><?=$this->escapeHtml($item['displayText'])?></strong>
@@ -8,4 +8,4 @@
       </span>
     </a>
   <? endforeach; ?>
-</ul>
\ No newline at end of file
+</div>
\ No newline at end of file
diff --git a/themes/bootstrap3/templates/search/advanced/layout.phtml b/themes/bootstrap3/templates/search/advanced/layout.phtml
index 3a479e488bf..29f679554cf 100644
--- a/themes/bootstrap3/templates/search/advanced/layout.phtml
+++ b/themes/bootstrap3/templates/search/advanced/layout.phtml
@@ -71,9 +71,9 @@
       <? endif ?>
       <? if (!empty($searchFilters)): ?>
         <h4><?=$this->transEsc("adv_search_filters")?></h4>
-        <ul class="list-group">
+        <div class="list-group">
           <label class="list-group-item checkbox"><?=$this->transEsc("adv_search_select_all")?> <input type="checkbox" checked="checked" class="checkbox-select-all"/></label>
-        </ul>
+        </div>
         <? foreach ($searchFilters as $field => $data): ?>
           <ul class="list-group">
             <li class="list-group-item title"><?=$this->transEsc($field)?></li>
@@ -85,10 +85,10 @@
       <? endif; ?>
       <div class="sidegroup">
         <h4><?=$this->transEsc("Search Tips")?></h4>
-        <ul class="list-group">
+        <div class="list-group">
           <a class="list-group-item help-link" href="<?=$this->url('help-home')?>?topic=advsearch" title="<?=$this->transEsc('Help with Advanced Search')?>"><?=$this->transEsc("Help with Advanced Search")?></a>
           <a class="list-group-item help-link" href="<?=$this->url('help-home')?>?topic=search" title="<?=$this->transEsc('Help with Search Operators')?>"><?=$this->transEsc("Help with Search Operators")?></a>
-        </ul>
+        </div>
       </div>
     </div>
   </div>
-- 
GitLab