Skip to content

Commit

Permalink
Merge pull request #1932 from tomudding/feature/improved-detailed-bod…
Browse files Browse the repository at this point in the history
…y-overview

feat: improved detailed overview of BM/GMM bodies
  • Loading branch information
tomudding authored Nov 29, 2024
2 parents 1359d9f + 8f82826 commit da43dc2
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 48 deletions.
12 changes: 9 additions & 3 deletions module/Application/language/en.po

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions module/Application/language/gewisweb.pot

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions module/Application/language/nl.po

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

95 changes: 58 additions & 37 deletions module/Decision/view/decision/organ/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -17,44 +17,65 @@ $this->headTitle($this->translate('Organ list'));
?>
<section class="section">
<div class="container">
<table class="table table-hover">
<thead>
<tr>
<th><?= $this->translate('Abbreviation') ?></th>
<th><?= $this->translate('Name') ?></th>
<th><?= $this->translate('Type') ?></th>
<?php if ($historical): ?>
<th><?= $this->translate('Abrogation Date') ?></th>
<?php endif; ?>
</tr>
</thead>
<tbody>
<?php foreach ($organs as $organ): ?>
<?php $url = $this->url('organs/view', ['organ' => $organ->getId()]) ?>
<tr>
<td>
<a style="display: block; height: 100%; width:100%" href="<?= $url ?>">
<?= $organ->getAbbr() ?>
<div class="row">
<div class="col-md-5 col-sm-5 col-xs-12">
<ul class="nav nav-pills">
<li role="presentation" class="<?= $historical ? 'active' : '' ?>">
<a href="<?= $this->url('organs') ?>">
<?= $this->translate('Active') ?>
</a>
</td>
<td>
<a style="display: block; height: 100%; width:100%" href="<?= $url ?>">
<?= $organ->getName() ?>
</li>
<li role="presentation" class="<?= !$historical ? 'active' : '' ?>">
<a href="<?= $this->url('organs/history') ?>">
<?= $this->translate('Abrogated') ?>
</a>
</td>
<td>
<a style="display: block; height: 100%; width:100%" href="<?= $url ?>">
<?= $organ->getType()->getName($this->plugin('translate')->getTranslator()) ?>
</a>
</td>
<?php if ($historical): ?>
<td>
<?= $organ->getAbrogationDate()?->format('Y-m-d') ?>
</td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</li>
</ul>
</div>
</div>
<br>
<div class="row">
<div class="col-md-12">
<table class="table table-hover">
<thead>
<tr>
<th><?= $this->translate('Abbreviation') ?></th>
<th><?= $this->translate('Name') ?></th>
<th><?= $this->translate('Type') ?></th>
<?php if ($historical): ?>
<th><?= $this->translate('Abrogation Date') ?></th>
<?php endif; ?>
</tr>
</thead>
<tbody>
<?php foreach ($organs as $organ): ?>
<?php $url = $this->url('organs/view', ['organ' => $organ->getId()]) ?>
<tr>
<td>
<a style="display: block; height: 100%; width:100%" href="<?= $url ?>">
<?= $this->escapeHtml($organ->getAbbr()) ?>
</a>
</td>
<td>
<a style="display: block; height: 100%; width:100%" href="<?= $url ?>">
<?= $this->escapeHtml($organ->getName()) ?>
</a>
</td>
<td>
<a style="display: block; height: 100%; width:100%" href="<?= $url ?>">
<?= $organ->getType()->getName($this->plugin('translate')->getTranslator()) ?>
</a>
</td>
<?php if ($historical): ?>
<td>
<?= $organ->getAbrogationDate()?->format('Y-m-d') ?>
</td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</section>
15 changes: 14 additions & 1 deletion module/Decision/view/decision/organ/view.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,20 @@ $this->headTitle($organ->getName());
<section class="section">
<div class="container">
<div class="row">
<h1><?= $this->escapeHtml($organ->getName()) ?> (<?= $this->escapeHtml($organ->getAbbr()) ?>)</h1>
<div class="page-header">
<div class="btn-toolbar pull-right">
<a href="<?= $this->url(
'home/organ',
[
'abbr' => $organ->getAbbr(),
'type' => $organ->getType()->value,
],
) ?>" class="btn btn-default">
<span class="fas fa-share-nodes"></span> <?= $this->translate('Go to public page') ?>
</a>
</div>
<h1><?= $this->escapeHtml($organ->getName()) ?> <small>(<?= $this->escapeHtml($organ->getAbbr()) ?>)</small></h1>
</div>
<div class="col-md-4">
<?php if (!empty($activeMembers)): ?>
<h2><?= $this->translate('Active members') ?></h2>
Expand Down
2 changes: 1 addition & 1 deletion module/Frontpage/view/frontpage/organ/organ.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function getOrganDescription($organInformation, $lang)
<?php endif ?>
<div class="row">
<div class="col-md-8">
<h1 class="h-wrap"><?= $organ->getName() ?></h1>
<h1 class="h-wrap"><?= $this->escapeHtml($organ->getName()) ?></h1>
<?php echo getOrganDescription($organInformation, $lang) ?>
</div>
<div class="col-md-4">
Expand Down
4 changes: 2 additions & 2 deletions module/Frontpage/view/partial/organ-card.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $organInformation = $organ->getApprovedOrganInformation()
<?php if (null !== $organInformation && null !== $organInformation->getThumbnailPath()): ?>
<img class="img-responsive" src="<?= $this->fileUrl($organInformation->getThumbnailPath()) ?>">
<?php endif ?>
<span class="card-title"><?= $organ->getAbbr() ?></span>
<span class="card-title"><?= $this->escapeHtml($organ->getAbbr()) ?></span>
<div class="card-details">
<?php if (null !== $organInformation): ?>
<?= $lang === 'en' ? $organInformation->getShortEnglishDescription() : $organInformation->getShortDutchDescription() ?>
Expand All @@ -30,7 +30,7 @@ $organInformation = $organ->getApprovedOrganInformation()
</div><!-- card image -->

<div class="card-content">
<span><?= $organ->getName() ?>
<span><?= $this->escapeHtml($organ->getName()) ?>
<?php if (null !== $organInformation && $this->acl('decision_service_acl')->isAllowed('organ', 'view')): ?>
<a href="mailto:<?= $organInformation->getEmail() ?>" class="pull-right">
<span class="fas fa-envelope"></span>
Expand Down

0 comments on commit da43dc2

Please sign in to comment.