Skip to content
Snippets Groups Projects
Commit 66cb6b2f authored by Demian Katz's avatar Demian Katz
Browse files

Revert "Move record number to label to prevent empty labels. May need additional styling."

This reverts commit aeaa5100.
parent 1877d143
No related merge requests found
......@@ -414,12 +414,13 @@ class Record extends AbstractHelper
*
* @return string
*/
public function getCheckbox($idPrefix = '', $formAttr = false, $number = null)
public function getCheckbox($idPrefix = '', $formAttr = false)
{
static $checkboxCount = 0;
$id = $this->driver->getSourceIdentifier() . '|'
. $this->driver->getUniqueId();
$context
= ['id' => $id, 'count' => $number, 'prefix' => $idPrefix];
= ['id' => $id, 'count' => $checkboxCount++, 'prefix' => $idPrefix];
if ($formAttr) {
$context['formAttr'] = $formAttr;
}
......
<label class="record-checkbox hidden-print">
<input class="checkbox-select-item" type="checkbox" name="ids[]" value="<?=$this->escapeHtmlAttr($this->id) ?>"<? if(isset($this->formAttr)): ?> form="<?=$this->formAttr ?>"<? endif; ?>/>
<span class="checkbox-icon"></span>
<?=$this->count ?>
</label>
<input type="hidden" name="idsAll[]" value="<?=$this->escapeHtmlAttr($this->id) ?>"<? if(isset($this->formAttr)): ?> form="<?=$this->formAttr ?>"<? endif; ?>/>
......@@ -4,8 +4,11 @@
<? $recordNumber = $this->results->getStartRecord() + $i-$this->indexStart; ?>
<div id="result<?=$i++ ?>" class="result<?=$current->supportsAjaxStatus()?' ajaxItem':''?>">
<? if (isset($this->showCheckboxes) && $this->showCheckboxes): ?>
<?=$this->record($current)->getCheckbox('', 'search-cart-form', $recordNumber)?>
<?=$this->record($current)->getCheckbox('', 'search-cart-form')?>
<? endif; ?>
<div class="record-number">
<?=$recordNumber ?>
</div>
<?=$this->record($current)->getSearchResult('list')?>
</div>
<? endforeach; ?>
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -26,10 +26,6 @@
.media-left { padding-left: 0; }
.media-right { padding-right: 0; }
.record-cover img { border: 1px solid @gray-lighter; }
.record-checkbox {
flex: 0 3rem;
text-align: center;
}
.record-number {
font-size: @reduced-font-size;
font-weight: bold;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment