-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
96 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
themes/bootstrap3/templates/_ui/components/hide-offcanvas-button.phtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 31 additions & 11 deletions
42
themes/bootstrap3/templates/_ui/components/show-sidebar-button.phtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,31 @@ | ||
<?php if (null === ($side = $this->config()->offcanvasSide())): ?> | ||
<a class="search-filter-toggle" href="#<?=$this->escapeHtmlAttr($this->targetId)?>" title="<?=$this->transEscAttr($this->title ?? 'sidebar_expand') ?>"> | ||
<?=$this->transEsc($this->linkText) ?> | ||
</a> | ||
<?php else: ?> | ||
<a class="search-filter-toggle icon-link" href="#<?=$this->escapeHtmlAttr($this->targetId)?>" data-toggle="vufind-offcanvas" title="<?=$this->transEscAttr($this->title ?? 'sidebar_expand')?>"> | ||
<?='left' === $side ? $this->icon($this->layout()->rtl ? 'offcanvas-show-right' : 'offcanvas-show-left', 'icon-link__icon') : ''?> | ||
<span class="icon-link__label"><?=$this->transEsc($this->linkText) ?></span> | ||
<?='right' === $side ? $this->icon($this->layout()->rtl ? 'offcanvas-show-left' : 'offcanvas-show-right', 'icon-link__icon') : ''?> | ||
</a> | ||
<?php endif; ?> | ||
<?php | ||
$side = $this->config()->offcanvasSide(); | ||
$aAttrs = [ | ||
'class' => 'search-filter-toggle ' . $this->_componentClass, | ||
'title' => $this->translate($this->title ?? 'sidebar_expand'), | ||
'href' => '#' . $this->targetId, | ||
]; | ||
$iconBefore = ''; | ||
$iconAfter = ''; | ||
$spanAttrs = []; | ||
if ($side) { | ||
$aAttrs['class'] .= ' icon-link'; | ||
$aAttrs['data-toggle'] = 'vufind-offcanvas'; | ||
if ($side === 'left') { | ||
$iconBefore = $this->icon($this->layout()->rtl ? 'offcanvas-show-right' : 'offcanvas-show-left', 'icon-link__icon'); | ||
} else { | ||
$iconAfter = $this->icon($this->layout()->rtl ? 'offcanvas-show-left' : 'offcanvas-show-right', 'icon-link__icon'); | ||
} | ||
$spanAttrs = [ | ||
'class' => 'icon-link__label', | ||
]; | ||
} | ||
?> | ||
|
||
<a<?=$this->htmlAttributes($aAttrs)?>> | ||
<?php if ($spanAttrs): ?> | ||
<?=$iconBefore?><span<?=$this->htmlAttributes($spanAttrs)?>><?=$this->transEsc($this->linkText);?></span><?=$iconAfter?> | ||
<?php else: ?> | ||
<?=$this->transEsc($this->linkText);?> | ||
<?php endif; ?> | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
themes/bootstrap5/templates/_ui/components/hide-offcanvas-button.phtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 31 additions & 11 deletions
42
themes/bootstrap5/templates/_ui/components/show-sidebar-button.phtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,31 @@ | ||
<?php if (null === ($side = $this->config()->offcanvasSide())): ?> | ||
<a class="search-filter-toggle" href="#<?=$this->escapeHtmlAttr($this->targetId)?>" title="<?=$this->transEscAttr($this->title ?? 'sidebar_expand') ?>"> | ||
<?=$this->transEsc($this->linkText) ?> | ||
</a> | ||
<?php else: ?> | ||
<a class="search-filter-toggle icon-link" href="#<?=$this->escapeHtmlAttr($this->targetId)?>" data-toggle="vufind-offcanvas" title="<?=$this->transEscAttr($this->title ?? 'sidebar_expand')?>"> | ||
<?='left' === $side ? $this->icon($this->layout()->rtl ? 'offcanvas-show-right' : 'offcanvas-show-left', 'icon-link__icon') : ''?> | ||
<span class="icon-link__label"><?=$this->transEsc($this->linkText) ?></span> | ||
<?='right' === $side ? $this->icon($this->layout()->rtl ? 'offcanvas-show-left' : 'offcanvas-show-right', 'icon-link__icon') : ''?> | ||
</a> | ||
<?php endif; ?> | ||
<?php | ||
$side = $this->config()->offcanvasSide(); | ||
$aAttrs = [ | ||
'class' => 'search-filter-toggle ' . $this->_componentClass, | ||
'title' => $this->translate($this->title ?? 'sidebar_expand'), | ||
'href' => '#' . $this->targetId, | ||
]; | ||
$iconBefore = ''; | ||
$iconAfter = ''; | ||
$spanAttrs = []; | ||
if ($side) { | ||
$aAttrs['class'] .= ' icon-link'; | ||
$aAttrs['data-toggle'] = 'vufind-offcanvas'; | ||
if ($side === 'left') { | ||
$iconBefore = $this->icon($this->layout()->rtl ? 'offcanvas-show-right' : 'offcanvas-show-left', 'icon-link__icon'); | ||
} else { | ||
$iconAfter = $this->icon($this->layout()->rtl ? 'offcanvas-show-left' : 'offcanvas-show-right', 'icon-link__icon'); | ||
} | ||
$spanAttrs = [ | ||
'class' => 'icon-link__label', | ||
]; | ||
} | ||
?> | ||
|
||
<a<?=$this->htmlAttributes($aAttrs)?>> | ||
<?php if ($spanAttrs): ?> | ||
<?=$iconBefore?><span<?=$this->htmlAttributes($spanAttrs)?>><?=$this->transEsc($this->linkText);?></span><?=$iconAfter?> | ||
<?php else: ?> | ||
<?=$this->transEsc($this->linkText);?> | ||
<?php endif; ?> | ||
</a> |