Skip to content

Commit

Permalink
Update views to use dl format introduced in 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdryden committed Apr 13, 2023
1 parent f2e4101 commit 4f975e3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 20 deletions.
23 changes: 15 additions & 8 deletions view/teams/index/role-detail.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ $role = $this->role;
$team_users = $this->team_users;
$translate = $this->plugin('translate');
$escape = $this->plugin('escapeHtml');
$this->htmlElement('body')->appendAttribute('class', 'items show');

$sectionNavs = [
'item-metadata' => $translate('Info'),
Expand All @@ -21,14 +22,20 @@ $sectionNavs = [
</div>

<div id="item-metadata" class="active section">
<div class="meta-group">
<h4><?php echo $translate('Name'); ?></h4>
<div class="value"><?php echo $escape($role->getName()); ?></div>
</div>
<div class="meta-group">
<h4><?php echo $translate('Comment'); ?></h4>
<div class="value"><?php echo $escape($role->getComment()); ?></div>
</div>
<dl>
<div class="property">
<dt><?php echo $translate('Name'); ?></dt>
<dd class="value">
<span class="value-content"><?php echo $escape($role->getName()); ?></span>
</dd>
</div>
<div class="property">
<dt><?php echo $translate('Description'); ?></dt>
<dd class="value">
<span class="value-content"><?php echo $escape($role->getComment()); ?></span>
</dd>
</div>
</dl>
</div>

<div id="item-linked" class="section">
Expand Down
1 change: 0 additions & 1 deletion view/teams/index/team-detail.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ $sectionNavs = [
<?php endif; ?>
</div>
<div id="item-metadata" class="active section">

<dl>
<div class="property">
<dt><?php echo $translate('Name'); ?></dt>
Expand Down
20 changes: 9 additions & 11 deletions view/teams/partial/user/view.phtml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@

<div class="property">
<h4>Teams</h4>
<?php foreach ($this->team_users as $team_user):
?>
<div class="values">
<?php echo sprintf('%s (%s)<br>', $team_user->getTeam()->getName(), $team_user->getRole()->getName());
?>
<dl >
<div class="property">
<dt>Team(s)</dt>
<?php foreach ($this->team_users as $team_user): ?>
<dd class="value">
<?php echo sprintf('%s (%s)<br>', $team_user->getTeam()->getName(), $team_user->getRole()->getName()); ?>
</dd>
<?php endforeach; ?>
</div>
<?php endforeach;
?>

</div>
</dl>

0 comments on commit 4f975e3

Please sign in to comment.