From 04235f20a5b5d766e44f92d1e4d88c2f436c15b3 Mon Sep 17 00:00:00 2001 From: Robert Lange <robert.lange@uni-leipzig.de> Date: Wed, 19 Apr 2023 16:36:32 +0200 Subject: [PATCH] refs #23443 [finc] use responsive table for library cards overview * add title for heading * code styles --- themes/finc/templates/librarycards/home.phtml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/themes/finc/templates/librarycards/home.phtml b/themes/finc/templates/librarycards/home.phtml index 8e91d9cd034..7ba2bb5db0b 100644 --- a/themes/finc/templates/librarycards/home.phtml +++ b/themes/finc/templates/librarycards/home.phtml @@ -19,7 +19,7 @@ <div><?=$this->transEsc('You do not have any library cards')?></div> <?php else: ?> <?php /* finc: this table works without further responsiveness code inserted - CK */ ?> - <table class="table table-striped"> + <table class="table table-striped table-resp-data"> <caption class="sr-only"><?=$this->transEsc('Library Cards')?></caption> <tr> <th><?=$this->transEsc('Library Card Name')?></th> @@ -31,20 +31,21 @@ </tr> <?php foreach ($this->libraryCards as $record): ?> <tr> - <td><?=$this->escapeHtml($record['card_name'])?></td> + <td data-title="<?=$this->transEsc('Library Card Name')?>:"><?=$this->escapeHtml($record['card_name'])?></td> <?php $username = $record['cat_username']; if ($this->multipleTargets): ?> <?php $target = ''; ?> <?php if (strstr($username, '.')): ?> - <?php list($target, $username) = explode('.', $username, 2); ?> + <?php [$target, $username] = explode('.', $username, 2); ?> <?php endif; ?> - <td><?=$target ? $this->transEsc("source_$target", null, $target) : ' ' ?></td> + <td data-title="<?=$this->transEsc('login_target')?>:"><?=$target ? $this->transEsc("source_$target", null, $target) : ' ' ?></td> <?php endif; ?> - <td><?=$this->escapeHtml($username)?></td> + <td data-title="<?=$this->transEsc('Username')?>:"><?=$this->escapeHtml($username)?></td> <td> <div class="btn-group"> - <a class="btn btn-link" href="<?=$this->url('editLibraryCard') . $this->escapeHtmlAttr($record['id']) ?>" title="<?=$this->transEscAttr('Edit Library Card')?>"><i class="fa fa-edit" aria-hidden="true"></i> <?=$this->transEsc('Edit')?></a> + <a class="btn btn-link" href="<?=$this->url('editLibraryCard') . $this->escapeHtmlAttr($record['id']) ?>" title="<?=$this->transEscAttr('Edit Library Card')?>"> + <i class="fa fa-edit" aria-hidden="true"></i> <?=$this->transEsc('Edit')?></a> <a class="btn btn-link dropdown-toggle" data-toggle="dropdown" href="<?=$this->url('librarycards-deletecard') ?>?cardID=<?=urlencode($record['id'])?>"> - <i class="fa fa-trash-o" aria-hidden="true"></i> <?=$this->transEsc('Delete')?> + <i class="fa fa-trash-o" aria-hidden="true"></i> <?=$this->transEsc('Delete')?> </a> <ul class="dropdown-menu"> <li><a href="<?=$this->url('librarycards-deletecard') ?>?cardID=<?=urlencode($record['id'])?>&confirm=1" data-clear-account-cache><?=$this->transEsc('confirm_dialog_yes') ?></a></li> -- GitLab