From ce22a99c930c63a5dd6b0d7f6513fff82a388f68 Mon Sep 17 00:00:00 2001 From: Claas Kazzer <kazzer@uni-leipzig.de> Date: Mon, 17 May 2021 09:42:22 +0200 Subject: [PATCH] refs #19414 [FINC: layout tables issue] * fixes layout tables in branchinfo * removes caption in holdingsils * adds margin to holdings tab alerts for better looks --- themes/finc/scss/compiled.scss | 8 + .../finc/templates/Helpers/branchinfo.phtml | 155 +++++++++--------- .../RecordDriver/DefaultRecord/toolbar.phtml | 4 +- .../templates/RecordTab/holdingsils.phtml | 6 +- 4 files changed, 91 insertions(+), 82 deletions(-) diff --git a/themes/finc/scss/compiled.scss b/themes/finc/scss/compiled.scss index 5ef3c469f8f..02f339e2d13 100644 --- a/themes/finc/scss/compiled.scss +++ b/themes/finc/scss/compiled.scss @@ -823,6 +823,14 @@ span.notation ul { &.alert-warning a { color: $oil; } + + // Holdings tab + .holding-info & { + margin-left: 15px; + margin-right: 15px; + margin-top: 15px; + } + } ////// Alert Text Colors diff --git a/themes/finc/templates/Helpers/branchinfo.phtml b/themes/finc/templates/Helpers/branchinfo.phtml index 5ae9247f652..7fd13bebb82 100644 --- a/themes/finc/templates/Helpers/branchinfo.phtml +++ b/themes/finc/templates/Helpers/branchinfo.phtml @@ -1,84 +1,83 @@ -<!-- helpers - branchinfo.phtml --> -<table> - <caption><span class="sr-only"><?= $this->transEsc('Address-Contact-Hours') ?></span> - </caption> - <tr class="holding-info"> - <td colspan="4"> - <?php /* Keep the accordion-toggler! It makes the link appear as an accordion header - CK */ ?> - <a href="#<?= $info['branchno'] ?>" class="accordion-toggler" data-toggle="collapse" aria-expanded="false"><?= $this->transEsc('Address-Contact-Hours') ?></a> - <div id="<?= $info['branchno'] ?>" class="collapse" aria-expanded="false"> - <div class="branch-address col-xs-12 col-sm-6"> - <strong><?= $info['branch'] ?></strong><br/> - <?= $info['streetaddress'] ?><br/> - <?= $info['postalcode'] ?> <?= $info['city'] ?> - </div> - <div class="branch-contact col-xs-12 col-sm-6"> - <?php if (isset($info['tel'])): ?> - <?php if (is_array($info['tel'])): ?> - <?php foreach ($info['tel'] as $tel): ?> - <?= $this->transEsc('Tel') ?>: <?= $tel ?><br/> - <?php endforeach; ?> - <?php else: ?> - <?= $this->transEsc('Tel') ?>: <?= $info['tel'] ?><br/> - <?php endif; ?> - <?php endif; ?> - <?php if (isset($info['fax'])): ?> - <?= $this->transEsc('Fax') ?>: <?= $info['fax'] ?><br/> - <?php endif; ?> - <?php if ( +<!-- finc - helpers - branchinfo --> +<div class="holding-info"> + <?php /* + Dont use Tables here! + Keep the accordion-toggler class! It makes the link appear as an accordion header - CK + */ + ?> + <a href="#<?= $info['branchno'] ?>" class="accordion-toggler" data-toggle="collapse" aria-expanded="false"><?= $this->transEsc('Address-Contact-Hours') ?></a> + <div id="<?= $info['branchno'] ?>" class="collapse" aria-expanded="false"> + <div class="branch-address col-xs-12 col-sm-6"> + <strong><?= $info['branch'] ?></strong><br/> + <?= $info['streetaddress'] ?><br/> + <?= $info['postalcode'] ?> <?= $info['city'] ?> + </div> + <div class="branch-contact col-xs-12 col-sm-6"> + <?php if (isset($info['tel'])): ?> + <?php if (is_array($info['tel'])): ?> + <?php foreach ($info['tel'] as $tel): ?> + <?= $this->transEsc('Tel') ?>: <?= $tel ?><br/> + <?php endforeach; ?> + <?php else: ?> + <?= $this->transEsc('Tel') ?>: <?= $info['tel'] ?><br/> + <?php endif; ?> + <?php endif; ?> + <?php if (isset($info['fax'])): ?> + <?= $this->transEsc('Fax') ?>: <?= $info['fax'] ?><br/> + <?php endif; ?> + <?php if ( isset($info['email']) && is_array($info['email']) && count($info['email']) > 0 ): ?> - <?php foreach ($info['email'] as $email): ?> - <?= $this->transEsc('Email') ?>: <?= $email ?><br/> - <?php endforeach; ?> - <?php else: ?> - <?= $this->transEsc('Email') ?>: <?= $info['email'] ?><br/> - <?php endif; ?> - <?php if (isset($info['url'])): ?> - <a href="<?= $info['url'] ?>" title="<?= $info['branch'] ?>"> - <?php if (isset($info['branch'])): ?> - <?= $this->transEsc('Link to') ?> - <?php else: ?> - <?= $info['url'] ?> - <?php endif; ?> - </a> - <?php endif; ?> - </div> - <div class="branch-hours col-xs-12"> - <?php if ( - isset($info['openinghours']) - && is_array($info['openinghours']) - && count($info['openinghours']) > 0 - ): ?> - <?php if (isset($info['branchpart'])): ?> - <strong><?= $info['branchpart'] ?></strong> - <?php endif; ?> - <?php if ($info['branchno'] != 'zw02'): ?> - <?= $this->transEsc('Opening hours') ?><br/> - <?php endif; ?> - <?php foreach ($info['openinghours'] as $line): ?> - <?= $line['days'] ?>: <?= $line['open'] ?> – <?= $line['close'] ?><br/> - <?php endforeach; ?> - <?php endif; ?> - </div> - </div> - <div class="row"> - <?php if (isset($info['note'])): ?> - <p class="branch-note alert alert-info"> - <?php if (is_array($info['note'])): ?> - <?php foreach ($info['note'] as $notes): ?> - <?= $notes ?> - <?php endforeach; ?> - <?php else: ?> - <?= $info['note'] ?> - <?php endif; ?> - </p> + <?php foreach ($info['email'] as $email): ?> + <?= $this->transEsc('Email') ?>: <?= $email ?><br/> + <?php endforeach; ?> + <?php else: ?> + <?= $this->transEsc('Email') ?>: <?= $info['email'] ?><br/> + <?php endif; ?> + <?php if (isset($info['url'])): ?> + <a href="<?= $info['url'] ?>" title="<?= $info['branch'] ?>"> + <?php if (isset($info['branch'])): ?> + <?= $this->transEsc('Link to') ?> + <?php else: ?> + <?= $info['url'] ?> + <?php endif; ?> + </a> + <?php endif; ?> + </div> + <div class="branch-hours col-xs-12"> + <?php if ( + isset($info['openinghours']) + && is_array($info['openinghours']) + && count($info['openinghours']) > 0 + ): ?> + <?php if (isset($info['branchpart'])): ?> + <strong><?= $info['branchpart'] ?></strong> + <?php endif; ?> + <?php if ($info['branchno'] != 'zw02'): ?> + <?= $this->transEsc('Opening hours') ?><br/> <?php endif; ?> - </div> - </td> - </tr> -</table> + <?php foreach ($info['openinghours'] as $line): ?> + <?= $line['days'] ?>: <?= $line['open'] ?> – <?= $line['close'] ?><br/> + <?php endforeach; ?> + <?php endif; ?> + </div> + </div> + <div class="row"> + <?php if (isset($info['note'])): ?> + <p class="branch-note alert alert-info"> + <?php if (is_array($info['note'])): ?> + <?php foreach ($info['note'] as $notes): ?> + <?= $notes ?> + <?php endforeach; ?> + <?php else: ?> + <?= $info['note'] ?> + <?php endif; ?> + </p> + <?php endif; ?> + </div> +</div> + <?= $this->headScript() ?> -<!-- helpers - branchinfo.phtml - END --> +<!-- finc - helpers - branchinfo - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml index c0fc17e570a..09fb37618de 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml @@ -18,7 +18,9 @@ <nav class="record-nav hidden-print"> <ul class="nav nav-pills nav-stacked hidden-print" aria-label="<?= $this->transEsc('ajaxview_label_tools'); ?>"> <?php if (count($this->driver->getCitationFormats()) > 0): ?> - <li role="none"><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> + <li role="none"> + <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 /* finc: we don't use sms, CK */ /* diff --git a/themes/finc/templates/RecordTab/holdingsils.phtml b/themes/finc/templates/RecordTab/holdingsils.phtml index f83b8b0688e..d929e6b59b9 100644 --- a/themes/finc/templates/RecordTab/holdingsils.phtml +++ b/themes/finc/templates/RecordTab/holdingsils.phtml @@ -104,9 +104,9 @@ if (!empty($holdingTitleHold)): ?> <?=$this->branchInfo($this->driver)->getBranchInfo($holding['locationid']);?> <?php endif; ?> <?php /* finc: this next section produces an empty table in some cases - the table borders collapse, producing a thick line - should be solved more elegantly - Fixme. - include responsive data table - CK */ ?> - <table class="table table-striped table-resp-data"> - <caption><span class="sr-only"><?=$this->transEsc('holdings_details_from', ['%%location%%' => $this->transEsc($holding['location'])])?></span></caption> + include responsive data table - CK + layout tables must not contain caption - CK */ ?> + <table class="table table-striped table-resp-data" aria-label="<?=$this->transEsc('holdings_details_from', ['%%location%%' => $this->transEsc($holding['location'])])?>"> <?php /* finc: change order and structure of table #13606 - VE */ ?> <?php foreach ($holding['items'] as $row): ?> <?php -- GitLab