Skip to content
Snippets Groups Projects
Commit 04235f20 authored by Robert Lange's avatar Robert Lange
Browse files

refs #23443 [finc] use responsive table for library cards overview

* add title for heading
* code styles
parent 882c6187
Branches
Tags
No related merge requests found
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<div><?=$this->transEsc('You do not have any library cards')?></div> <div><?=$this->transEsc('You do not have any library cards')?></div>
<?php else: ?> <?php else: ?>
<?php /* finc: this table works without further responsiveness code inserted - CK */ ?> <?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> <caption class="sr-only"><?=$this->transEsc('Library Cards')?></caption>
<tr> <tr>
<th><?=$this->transEsc('Library Card Name')?></th> <th><?=$this->transEsc('Library Card Name')?></th>
...@@ -31,20 +31,21 @@ ...@@ -31,20 +31,21 @@
</tr> </tr>
<?php foreach ($this->libraryCards as $record): ?> <?php foreach ($this->libraryCards as $record): ?>
<tr> <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 $username = $record['cat_username']; if ($this->multipleTargets): ?>
<?php $target = ''; ?> <?php $target = ''; ?>
<?php if (strstr($username, '.')): ?> <?php if (strstr($username, '.')): ?>
<?php list($target, $username) = explode('.', $username, 2); ?> <?php [$target, $username] = explode('.', $username, 2); ?>
<?php endif; ?> <?php endif; ?>
<td><?=$target ? $this->transEsc("source_$target", null, $target) : '&nbsp;' ?></td> <td data-title="<?=$this->transEsc('login_target')?>:"><?=$target ? $this->transEsc("source_$target", null, $target) : '&nbsp;' ?></td>
<?php endif; ?> <?php endif; ?>
<td><?=$this->escapeHtml($username)?></td> <td data-title="<?=$this->transEsc('Username')?>:"><?=$this->escapeHtml($username)?></td>
<td> <td>
<div class="btn-group"> <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'])?>"> <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')?> &nbsp;<i class="fa fa-trash-o" aria-hidden="true"></i> <?=$this->transEsc('Delete')?>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="<?=$this->url('librarycards-deletecard') ?>?cardID=<?=urlencode($record['id'])?>&amp;confirm=1" data-clear-account-cache><?=$this->transEsc('confirm_dialog_yes') ?></a></li> <li><a href="<?=$this->url('librarycards-deletecard') ?>?cardID=<?=urlencode($record['id'])?>&amp;confirm=1" data-clear-account-cache><?=$this->transEsc('confirm_dialog_yes') ?></a></li>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment