From 2872463bbadac2b26a7daafb5f820023b3bfeccd Mon Sep 17 00:00:00 2001 From: Dorian Merz <merz@ub.uni-leipzig.de> Date: Wed, 14 Apr 2021 09:47:20 +0200 Subject: [PATCH] refs #19641 [fid_bbi] show edit links in user overview table again * introduce BBI specific admin/list template --- themes/fid_bbi/templates/fid/admin/list.phtml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 themes/fid_bbi/templates/fid/admin/list.phtml diff --git a/themes/fid_bbi/templates/fid/admin/list.phtml b/themes/fid_bbi/templates/fid/admin/list.phtml new file mode 100644 index 00000000000..9ab2b6767b1 --- /dev/null +++ b/themes/fid_bbi/templates/fid/admin/list.phtml @@ -0,0 +1,48 @@ +<!-- fid_bbi - user - admin - list --> +<?php +/** + * copied from fid theme + * replaces fa icons by SVG + */ + +/* #16383: added tablesorter - GG*/ +$this->headScript()->appendFile('jquery.tablesorter.min.js'); +$script = <<<JS +$(document).ready(function() { + // Tablesorter + $('table').tablesorter({ + sortList: [[0,1]], + // widgets: ['zebra', 'filter'] + }); + }); +JS; +echo $this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET'); +?> +<?=$this->translate('Users')?> +<?= $this->flashmessages() ?> +<?php if (!empty($this->list)): ?> + <table class="fid fid-admin table user-table table-striped"> + <?php /* #16383 */ ?> + <thead> + <tr> + <td><!-- empty cell --></td> + <th>#</th> + <?php foreach ($fields as $fieldname): ?> + <th><?=$this->translate('fid::'.$fieldname)?></th> + <?php endforeach; ?> + </tr> + <?php /* #16383 */ ?> + </thead> + <tbody> + <?php foreach ($list as $id => $user):?> + <?php $tooltip = $this->translate('fid::user_edit',['%%userid%%' => $id]); ?> + <tr><td><a href="<?=$this->url('fid/admin/edit',['userid' => $id])?>" title="<?=$tooltip?>"><?=$this->icon('pen')?><span class="sr-only"><?=$tooltip?></span></a></td><th><?=$id?></th><?= $this->render('fid/admin/list-entry',['user' => $user,'fields'=>$fields, 'config' => $config]) ?></tr> + <?php endforeach; ?> + <?php /* #16383 */ ?> + </tbody> + </table> + <a href="<?=$this->url('fid/admin/exportList')?>" class="btn btn-primary" target="_blank"><?=$this->icon('download')?> <?=$this->translate('fid::user_list_export')?></a> +<?php else: ?> + <?= $this->translate('fid::user_list_empty') ?> +<?php endif; ?> +<!-- fid_bbi - user - admin - list - END --> \ No newline at end of file -- GitLab