The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit d104bec6 authored by Chris Hallberg's avatar Chris Hallberg Committed by Robert Lange
Browse files

Improve record toolbar dropdown roles.

parent 88bdb7dd
No related merge requests found
......@@ -4,44 +4,42 @@
$this->headScript()->appendFile('https://s7.addthis.com/js/250/addthis_widget.js?pub=' . urlencode($addThis));
}
?>
<nav class="record-nav">
<ul class="action-toolbar">
<?php if (count($this->driver->getCitationFormats()) > 0): ?>
<li><a class="cite-record toolbar-btn btn-type-cite" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Cite')?>" rel="nofollow"><?=$this->transEsc('Cite this')?></a></li>
<?php endif; ?>
<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->recordLink()->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->recordLink()->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->recordLink()->getActionUrl($this->driver, 'Email')?>" rel="nofollow"><i class="fa fa-envelope" aria-hidden="true"></i> <?=$this->transEsc('Email this')?></a></li>
<?php if ($this->accountCapabilities()->getSmsSetting() !== 'disabled'): ?>
<li><a class="sms-record toolbar-btn btn-type-phone" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'SMS')?>" rel="nofollow"><?=$this->transEsc('Text this')?></a></li>
<?php endif; ?>
<?php $exportFormats = $this->export()->getFormatsForRecord($this->driver); ?>
<?php if(count($exportFormats) > 0): ?>
<li class="dropdown">
<a class="export-toggle dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" href="<?=$this->recordLink()->getActionUrl($this->driver, 'Export')?>" rel="nofollow" aria-expanded="false" aria-controls="export-options"><i class="fa fa-list-alt" aria-hidden="true"></i> <?=$this->transEsc('Export Record') ?></a>
<ul class="dropdown-menu" id="export-options" role="menu">
<?php foreach ($exportFormats as $exportFormat): ?>
<li role="none">
<a <?php if ($this->export()->needsRedirect($exportFormat)): ?>target="<?=$this->escapeHtmlAttr($exportFormat)?>Main" <?php endif; ?>href="<?=$this->recordLink()->getActionUrl($this->driver, 'Export')?>?style=<?=$this->escapeHtmlAttr($exportFormat)?>" rel="nofollow" role="menuitem">
<?=$this->transEsc('Export to')?> <?=$this->transEsc($this->export()->getLabelForFormat($exportFormat))?>
</a>
</li>
<?php endforeach; ?>
</ul>
</li>
<?php endif; ?>
<li><a class="mail-record toolbar-btn btn-type-email" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Email')?>" rel="nofollow"><?=$this->transEsc('Email this')?></a></li>
<li><a class="print-record toolbar-btn btn-type-print" href="<?=$this->url()->addQueryParameters(['print' => true])?>" rel="nofollow"><?=$this->transEsc('Print')?></a></li>
<?php $exportFormats = $this->export()->getFormatsForRecord($this->driver); ?>
<?php if(count($exportFormats) > 0): ?>
<li class="dropdown">
<a class="export-toggle toolbar-btn btn-type-export dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" href="<?=$this->recordLink()->getActionUrl($this->driver, 'Export')?>" rel="nofollow"><?=$this->transEsc('Export Record') ?></a>
<ul class="dropdown-menu" role="menu">
<?php foreach ($exportFormats as $exportFormat): ?>
<li role="none"><a <?php if ($this->export()->needsRedirect($exportFormat)): ?>target="<?=$this->escapeHtmlAttr($exportFormat)?>Main" <?php endif; ?>href="<?=$this->recordLink()->getActionUrl($this->driver, 'Export')?>?style=<?=$this->escapeHtmlAttr($exportFormat)?>" rel="nofollow" role="menuitem"><?=$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>
<?php if ($this->permission()->allowDisplay('feature.Favorites')): ?>
<a class="save-record toolbar-btn btn-type-save" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" rel="nofollow"><?=$this->transEsc('Add to favorites')?></a>
<?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?>
<?=$block?>
<?php endif; ?>
</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>
</nav>
<?php if ($this->userlist()->getMode() !== 'disabled'): ?>
<li>
<?php if ($this->permission()->allowDisplay('feature.Favorites')): ?>
<a class="save-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" rel="nofollow"><i class="fa fa-star" aria-hidden="true"></i> <?=$this->transEsc('Add to favorites')?></a>
<?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?>
<?=$block?>
<?php endif; ?>
</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>
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