Skip to content

Commit

Permalink
Fix button styles in library card list.
Browse files Browse the repository at this point in the history
  • Loading branch information
EreMaijala committed Dec 18, 2024
1 parent c89dfe9 commit d4a0bcd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
4 changes: 4 additions & 0 deletions themes/finna2/scss/finna/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,10 @@ ol {
.btn-unstyled {
border: none;
background-color: transparent;
&:hover, .btn-group.open & {
box-shadow: none;
}

}

// A general-purpose flexbox layout mixin for switching between a horizontal
Expand Down
18 changes: 14 additions & 4 deletions themes/finna2/templates/librarycards/home.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<span>
<?=$this->transEsc('Library Card name missing')?>
<?php if ($this->auth()->getManager()->allowsUserIlsLogin()): ?>
<a class="btn-link" href="<?=$this->url('editLibraryCard') . $this->escapeHtmlAttr($record['id']) ?>" title="<?=$this->transEsc('Edit Library Card')?>"> <?=$this->transEsc('Add name')?></a>
<a href="<?=$this->url('editLibraryCard') . $this->escapeHtmlAttr($record['id']) ?>" title="<?=$this->transEscAttr('Edit Library Card')?>"> <?=$this->transEsc('Add name')?></a>
<?php endif; ?>
</span>
<?php endif; ?>
Expand All @@ -76,18 +76,28 @@
<td data-label="<?=$this->transEsc('Actions')?>" class="library-card-actions">
<div>
<?php if ($this->ils()->checkFunction('changePassword', (array)$record)): ?>
<a class="btn-link change-library-card-password" href="<?=$this->url('newLibraryCardPassword') ?>?id=<?=$this->escapeHtmlAttr($record['id']) ?>" data-lightbox title="<?=$this->transEsc('Change Password')?>"><?=$this->icon('library-card-password') ?> <?=$this->transEsc('Change Password')?></a>
<a class="icon-link change-library-card-password" href="<?=$this->url('newLibraryCardPassword') ?>?id=<?=$this->escapeHtmlAttr($record['id']) ?>" data-lightbox title="<?=$this->transEscAttr('Change Password')?>">
<?=$this->icon('library-card-password', 'icon-link__icon') ?>
<span class="icon-link__label">
<?=$this->transEsc('Change Password')?>
</span>
</a>
<?php endif; ?>
<?php if ($this->auth()->getManager()->allowsUserIlsLogin()): ?>
<a class="btn-link edit-library-card" href="<?=$this->url('editLibraryCard') . $this->escapeHtmlAttr($record['id']) ?>" title="<?=$this->transEsc('Edit Library Card')?>"><?=$this->icon('library-card-edit') ?> <?=$this->transEsc('Update Card Details')?></a>
<a class="icon-link edit-library-card" href="<?=$this->url('editLibraryCard') . $this->escapeHtmlAttr($record['id']) ?>" title="<?=$this->transEscAttr('Edit Library Card')?>">
<?=$this->icon('library-card-edit', 'icon-link__icon') ?>
<span class="icon-link__label">
<?=$this->transEsc('Update Card Details')?>
</span>
</a>
<?php endif; ?>
<?=
$this->component(
'confirm-button',
[
'buttonLink' => $this->url('librarycards-deletecard', [], ['query' => ['cardID' => $record['id']]]),
'buttonLabelHtml' => $this->icon('library-card-disconnect') . ' ' . $this->translate('Disconnect Library Card'),
'buttonClass' => 'btn-link',
'buttonClass' => 'btn-unstyled',
'confirmLink' => $this->url('librarycards-deletecard', [], ['query' => ['cardID' => $record['id'], 'confirm' => 1]]),
'header' => 'confirm_delete_library_card_brief',
'clearAccountCache' => true,
Expand Down

0 comments on commit d4a0bcd

Please sign in to comment.