Skip to content

Commit

Permalink
[FINNA-1432] Fix bootstrap btn and alert class usage (#3115)
Browse files Browse the repository at this point in the history
  • Loading branch information
EreMaijala authored Dec 19, 2024
1 parent 8bdb9a9 commit ebf7a9e
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 11 deletions.
2 changes: 1 addition & 1 deletion local/languages/finna/ReservationList/en-gb.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Order List = "Order list"
Reservation Lists = "Reservation Lists"
Reservation List = "Reservation List"
Reserve to Research Room = "Reserve to research room"
request_post_info_html = '<div class="alert-danger" style="padding: 2px"><b>NOTE:</b> You cannot add materials to the reservation after it has been sent. The reservation is saved to your account.</div>'
request_post_info_html = '<div class="alert alert-danger" style="padding: 2px"><b>NOTE:</b> You cannot add materials to the reservation after it has been sent. The reservation is saved to your account.</div>'
request_pre_info_html = ""
Reservation List Name = "Reservation lists name"
Send Reservation Request = "Send reservation request"
Expand Down
2 changes: 1 addition & 1 deletion local/languages/finna/ReservationList/fi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Order List = "Tilaa lista"
Reservation Lists = "Varauslistat"
Reservation List = "Varauslista"
Reserve to Research Room = "Varaa luku- tai tutkijasaliin"
request_post_info_html = '<div class="alert-info" style="padding: 2px"><b>Huomioithan</b> ettet voi lisätä varaukseen aineistoja lähetyksen jälkeen. Varaus jää talteen Omaan tiliisi.</div>'
request_post_info_html = '<div class="alert alert-info" style="padding: 2px"><b>Huomioithan</b> ettet voi lisätä varaukseen aineistoja lähetyksen jälkeen. Varaus jää talteen Omaan tiliisi.</div>'
request_pre_info_html = ""
Reservation List Name = "Varauslistan nimi"
Send Reservation Request = "Lähetä varauspyyntö"
Expand Down
2 changes: 1 addition & 1 deletion local/languages/finna/ReservationList/sv.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Order List = "Boka listan"
Reservation Lists = "Bokningslistor"
Reservation List = "Bokningslista"
Reserve to Research Room = "Boka till forskarsal"
request_post_info_html = '<div class="alert-danger" style="padding: 2px"><b>OBS:</b> Du kan inte lägga till material i bokningen efter att den har skickats. Bokningen sparas på ditt konto.</div>'
request_post_info_html = '<div class="alert alert-danger" style="padding: 2px"><b>OBS:</b> Du kan inte lägga till material i bokningen efter att den har skickats. Bokningen sparas på ditt konto.</div>'
request_pre_info_html = ""
Reservation List Name = "Namn för bokningslista"
Send Reservation Request = "Skicka bokningsförfrågan"
Expand Down
3 changes: 3 additions & 0 deletions themes/finna2/scss/finna/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,9 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ return;
<?php endforeach; ?>
<?php if ($listsContainingRecord = $this->reservationList($user)->getListsContainingRecord($this->driver)): ?>
<div class="holdings-group saved-reservation-lists">
<div class="alert-info savedLists loaded">
<div class="alert alert-info savedLists loaded">
<strong><?=$this->transEsc('Saved in')?>:</strong><br/>
<ul>
<?php foreach ($listsContainingRecord as $list): ?>
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
2 changes: 1 addition & 1 deletion themes/finna2/templates/myresearch/login.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<?php else: ?>
<?php if ($this->fromTermsPage): ?>
<?php // Force lightbox login to display ?>
<div class="flash-message alert-danger hidden"></div>
<div class="flash-message alert alert-danger hidden"></div>
<?php endif; ?>
<?=$this->auth()->getLogin()?>
<?php endif; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<option value="3" <?= $user->getFinnaDueDateReminder() == 3 ? 'selected="selected"' : '' ?>><?=$this->transEsc('due_date_reminder_three_days') ?></option>
</select>
<?php if ($user->getFinnaDueDateReminder() && empty($user->getEmail())): ?>
<span class="alert-danger"><?=$this->transEsc('no_email_address')?></span>
<span class="alert alert-danger"><?=$this->transEsc('no_email_address')?></span>
<?php endif; ?>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- START of: finna - search/advanced/usage_rights_ext_str_mv-facet-information-footer.phtml -->
<div class="information additional-info alert-info">
<div class="information additional-info alert alert-info">
<p class="information-text"><?=$this->transEsc('usage_rights_ext_info')?></p>
<a class="information-text" href="<?=$this->url('content-page', ['page' => 'terms'])?>#terms"><?=$this->transEsc('usage_rights_ext_info_more_link')?></a>
</div>
Expand Down

0 comments on commit ebf7a9e

Please sign in to comment.