Skip to content

Commit

Permalink
Check for export properly
Browse files Browse the repository at this point in the history
  • Loading branch information
LuomaJuha committed Jan 15, 2025
1 parent ece86eb commit 4e760d5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions themes/finna2/templates/myresearch/bulk-action-buttons.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
$cartEnabled = $this->cartEnabled ?? $this->cart()->isActive();
$lists = $this->lists ?? [];
$email = $this->email ?? true;
$export = $this->export ?? true;
$export = $this->export ?? (count($this->export()->getActiveFormats('bulk')) > 0);
$displayBulkCheckboxes = $canDelete || $cartEnabled || $lists || $email || $export;
?>
<div class="bulk-action-buttons-row hidden-print">
Expand All @@ -25,8 +25,7 @@
<?php if ($email): ?>
<button id="button_email" class="btn btn-primary" type="submit" name="email" value="<?=$this->transEscAttr('Email')?>" title="<?=$this->transEscAttr('bulk_email')?>" disabled<?php if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<?php endif; ?>><?=$this->transEsc('Email')?></button>
<?php endif; ?>
<?php $exportOptions = $this->export()->getActiveFormats('bulk');
if ($export && count($exportOptions) > 0): ?>
<?php if ($export): ?>
<button class="btn btn-primary" type="submit" name="export" value="<?=$this->transEscAttr('Export')?>" title="<?=$this->transEscAttr('bulk_export')?>" disabled<?php if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<?php endif; ?>><?=$this->transEsc('Export')?></button>
<?php endif; ?>
<?php if ($canDelete): ?>
Expand Down

0 comments on commit 4e760d5

Please sign in to comment.