<?php
  $addThis = $this->addThis();
  if (!empty($addThis)) {
    $this->headScript()->appendFile('https://s7.addthis.com/js/250/addthis_widget.js?pub=' . urlencode($addThis));
  }
?>
<div id="ergebnisfunktion" class="ergebnisfunktion">
    <span><?=$this->transEsc("Result Selection")?></span>
</div>
<div id="suchauswahl" class="show-content suchauswahl">
<ul class="record-nav nav nav-pills hidden-print">
  <?php if (count($this->driver->getCitationFormats()) > 0): ?>
    <li><a class="cite-record" data-lightbox href="<?=$this->recordLinker($this->results)->getActionUrl($this->driver, 'Cite')?>" rel="nofollow"><i class="fa fa-asterisk" aria-hidden="true"></i> <?=$this->transEsc('Cite this')?></a></li>
  <?php endif; ?>
  <?php if ($this->accountCapabilities()->getSmsSetting() !== 'disabled'): ?>
    <li><a class="sms-record" data-lightbox href="<?=$this->recordLinker($this->results)->getActionUrl($this->driver, 'SMS')?>" rel="nofollow"><i class="fa fa-mobile" aria-hidden="true"></i> <?=$this->transEsc('Text this')?></a></li>
  <?php endif; ?>
  <li><a class="mail-record" data-lightbox href="<?=$this->recordLinker($this->results)->getActionUrl($this->driver, 'Email')?>" rel="nofollow"><i class="fa fa-envelope" aria-hidden="true"></i> <?=$this->transEsc('Email this')?></a></li>

  <?php $exportFormats = $this->export()->getFormatsForRecord($this->driver); ?>
  <?php if(count($exportFormats) > 0): ?>
    <li class="dropdown">
      <a class="export-toggle dropdown-toggle" data-toggle="dropdown" href="<?=$this->recordLinker($this->results)->getActionUrl($this->driver, 'Export')?>" rel="nofollow"><i class="fa fa-list-alt" aria-hidden="true"></i> <?=$this->transEsc('Export Record') ?></a>
      <ul class="dropdown-menu" role="menu">
        <?php foreach ($exportFormats as $exportFormat): ?>
          <li><a <?php if ($this->export()->needsRedirect($exportFormat)): ?>target="<?=$this->escapeHtmlAttr($exportFormat)?>Main" <?php endif; ?>href="<?=$this->recordLinker($this->results)->getActionUrl($this->driver, 'Export')?>?style=<?=$this->escapeHtmlAttr($exportFormat)?>" rel="nofollow"><?=$this->transEsc('Export to')?> <?=$this->transEsc($this->export()->getLabelForFormat($exportFormat))?></a></li>
        <?php endforeach; ?>
      </ul>
    </li>
  <?php endif; ?>

  <?php if ($this->userlist()->getMode() !== 'disabled'): ?>
    <li><a class="save-record" data-lightbox href="<?=$this->recordLinker($this->results)->getActionUrl($this->driver, 'Save')?>" rel="nofollow"><i class="fa fa-star" aria-hidden="true"></i> <?=$this->transEsc('Add to favorites')?></a></li>
  <?php endif; ?>
  <?php if (!empty($addThis)): ?>
    <li><a class="addThis addthis_button" href="https://www.addthis.com/bookmark.php?v=250&amp;pub=<?=urlencode($addThis)?>"><i class="fa fa-bookmark" aria-hidden="true"></i> <?=$this->transEsc('Bookmark')?></a></li>
  <?php endif; ?>
  <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]); ?>
</ul>
</div>
