From 18d3b1463cfb01c4ffbebea6baf28f51637c8597 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Tue, 8 Apr 2014 11:53:39 -0400
Subject: [PATCH] Hide cart checkboxes when disabled.

---
 themes/blueprint/templates/search/list-grid.phtml | 2 +-
 themes/blueprint/templates/search/list-list.phtml | 2 +-
 themes/bootprint/templates/search/list-list.phtml | 2 +-
 themes/bootstrap/templates/search/list-list.phtml | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/themes/blueprint/templates/search/list-grid.phtml b/themes/blueprint/templates/search/list-grid.phtml
index 72bda891182..0161c432ba2 100644
--- a/themes/blueprint/templates/search/list-grid.phtml
+++ b/themes/blueprint/templates/search/list-grid.phtml
@@ -2,7 +2,7 @@
   <tr>
     <? $i = 0; foreach ($this->results->getResults() as $current): ?>
       <td id="result<?=$i ?>" class="gridCell gridCellHover">
-        <span class="recordNumber"><?=$this->results->getStartRecord()+(++$i)-1?><? if ($this->cart()->isActive()): ?><?=$this->record($current)->getCheckbox()?><? endif; ?></span>
+        <span class="recordNumber"><?=$this->results->getStartRecord()+(++$i)-1?><? if (!isset($this->hideCartControls) && $this->cart()->isActive()): ?><?=$this->record($current)->getCheckbox()?><? endif; ?></span>
         <?=$this->record($current)->getSearchResult('grid')?>
       </td>
       <?=($i%4==0)?'</tr><tr>':''?>
diff --git a/themes/blueprint/templates/search/list-list.phtml b/themes/blueprint/templates/search/list-list.phtml
index 7886e5fd32b..a404dc52992 100644
--- a/themes/blueprint/templates/search/list-list.phtml
+++ b/themes/blueprint/templates/search/list-list.phtml
@@ -3,7 +3,7 @@
   <? $i = $this->indexStart; foreach ($this->results->getResults() as $current):
   $recordNumber = $this->results->getStartRecord()+$i-$this->indexStart; ?>
   <li id="result<?=$i ?>" class="result<?=(++$i % 2 == 0) ? ' alt' : ''?>">
-    <span class="recordNumber"><?=$recordNumber?><? if ($this->cart()->isActive()): ?><?=$this->record($current)->getCheckbox()?><? endif; ?></span>
+    <span class="recordNumber"><?=$recordNumber?><? if (!isset($this->hideCartControls) && $this->cart()->isActive()): ?><?=$this->record($current)->getCheckbox()?><? endif; ?></span>
     <?=$this->record($current)->getSearchResult('list')?>
   </li>
   <? endforeach; ?>
diff --git a/themes/bootprint/templates/search/list-list.phtml b/themes/bootprint/templates/search/list-list.phtml
index db3370df3f4..2e417b420da 100644
--- a/themes/bootprint/templates/search/list-list.phtml
+++ b/themes/bootprint/templates/search/list-list.phtml
@@ -2,7 +2,7 @@
 <? $i = $this->indexStart; foreach ($this->results->getResults() as $current):
   $recordNumber = $this->results->getStartRecord()+$i-$this->indexStart; ?>
   <div id="result<?=$i++ ?>" class="result row-fluid clearfix">
-    <label class="checkbox pull-left"><? if ($this->cart()->isActive()): ?><?=$this->record($current)->getCheckbox()?><? endif; ?><?=$recordNumber?></label>
+    <label class="checkbox pull-left"><? if (!isset($this->hideCartControls) && $this->cart()->isActive()): ?><?=$this->record($current)->getCheckbox()?><? endif; ?><?=$recordNumber?></label>
     <?=$this->record($current)->getSearchResult('list')?>
   </div>
 <? endforeach; ?>
\ No newline at end of file
diff --git a/themes/bootstrap/templates/search/list-list.phtml b/themes/bootstrap/templates/search/list-list.phtml
index 714a826c166..306e479b8cc 100644
--- a/themes/bootstrap/templates/search/list-list.phtml
+++ b/themes/bootstrap/templates/search/list-list.phtml
@@ -3,7 +3,7 @@
   $recordNumber = $this->results->getStartRecord()+$i-$this->indexStart; ?>
   <hr/>
   <div id="result<?=$i++ ?>" class="row-fluid clearfix">
-    <label class="checkbox pull-left small"><? if ($this->cart()->isActive()): ?><?=$this->record($current)->getCheckbox()?><? endif; ?><?=$recordNumber?></label>
+    <label class="checkbox pull-left small"><? if (!isset($this->hideCartControls) && $this->cart()->isActive()): ?><?=$this->record($current)->getCheckbox()?><? endif; ?><?=$recordNumber?></label>
     <?=$this->record($current)->getSearchResult('list')?>
   </div>
 <? endforeach; ?>
\ No newline at end of file
-- 
GitLab